Sending a JMS Message from Oracle Database on DML

2019-01-28 08:09发布

问题:

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.

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.

回答1:

You could use an Oracle trigger which calls a Java stored procedure.

The Java stored procedure in turn could send a message using JMS.

Have a look at this example.