Search code examples
databaseoracle12ccomplex-event-processingoracle-soa

Oracle event processing. How to insert data into database?


I am trying to use OEP to read messages from a JMS queue and put the messages into the database. The processor seems to be reading from database only? I am not sure about this, but all the examples I can see are SELECT CQL queries. Is there any way I can have something like a database outbound adapter to put the messages into the database as the last step? Or I should use OEP eventBean with JDBC to do this. Thank you.


Solution

  • The CQL (Continuous Query Language) allows to continuously query events from Streams. Streams data are processed in memory, so there is not an INSERT clause in the CQL because there is not a database behind. You can define a database table as source for a processor and enrich your events joining Streams and Database data, but if you want to insert data into a Database you need to do it yourself using an event bean. The Oracle Event Processing installation includes the EclipseLink open source mapping and persistence framework to support the use of the Java Persistence API (JPA) in your applications. So in your event bean you can use JPA or of course JDBC to persist your events.