在 DML 事件上从 Oracle 数据库发送 JMS 消息
我正在尝试确定是否可以将 Oracle Database 11g 配置为在发生特定 DML 事件(例如对特定表的插入或更新)时向代理(在我的情况下为 ActiveMQ)发送 JMS 消息,以便我可以在外部的非 Oracle 应用程序中处理此事件.
I'm trying to determine if it is possible to configure Oracle Database 11g to send a JMS message to a broker (ActiveMQ in my case) when a particular DML event (say an insert or update to a particular table) occurs so that I can process this event in an external, non-Oracle application.
我进行了一些搜索,似乎 Oracle Streams 能够处理这个用例,因为它暗指 JMS,但文档似乎只关注 Oracle 数据库到 Oracle 数据库 JMS 消息发送.
I've done some searching and it seems like Oracle Streams is capable of this use case since it alludes to JMS, but the documentation seems to focus only on Oracle Database to Oracle Database JMS message sending.
我并没有特别询问如何做到这一点,但如果有可能的话,当然,如果您能向我介绍如何设置它的教程,我也会很感激.
I'm not particularly asking HOW to do this but if it is even possible at all, though of course if you could refer me to a tutorial on how to set it up I would be grateful for that as well.
推荐答案
您可以使用 Oracle 触发器,它调用 Java 存储过程.
You could use an Oracle trigger which calls a Java stored procedure.
Java 存储过程反过来可以使用 JMS 发送消息.
The Java stored procedure in turn could send a message using JMS.
看看这个示例.
相关文章