Pages

Thursday, April 26, 2012

Publish EDN JMS events from ADF BC

With ADF BC ( Business Components ) you can fire Event Delivery Network CRUD events from ADF BC entities which can be captured and handled by the Oracle SOA Suite. In this blogpost we will use the JMS implementation of EDN plus WebLogic Store and Forward for the reliable delivery to the SOA Suite server ( this way we can bounce SOA without effecting the Web Applications ).

To make this possible on a different ADF WebLogic server then the SOA Suite Server, we need to do the following steps.

First we need to add a WebLogic shared Library.  Copy the oracle.soa.fabric_11.1.1 and oracle.soa.workflow_11.1.1 folders from the SOA Suite Oracle Home (  Oracle_SOA1\soa\modules ) to your own WebLogic Middleware home. Put those two folders on the same level directory level.

Then we can add these jars to our own WebLogic Server. Go to deployments and add the following jar  oracle.soa.workflow_11.1.1\oracle.soa.workflow.wc.jar ( this contains a manifest which loads the other jars ). Target this shared library to the right WebLogic servers.



We need to add this shared library reference to the weblogic-application.xml deployment descriptor of the ADF Web application. This is the only place where it works ( WEB-INF/lib does not work )



Now we can create an EDN definition and add a publication to an ADF BC entity. Go the Business Events part of your entity editor.



We need to decide if we want to use EDN-AQ or EDN-JMS. The AQ implementation is the default EDN implementation but this requires some datasources to the soa-infra database. This can be Ok in a small server network but I don't want this dependency to this SOA Suite Server in my WebLogic Server. 

So I will go for the JMS implementation and create the required Queue and Connection Factories on my own WebLogic Server ( you can also do this with JMS Foreign Server ). 
Then those JMS message are stored locally and we will use WebLogic Store and Forward for the reliable delivery to the SOA Suite server. This way we can bounce the SOA Suite server without effecting our Web Applications.

For the EDN-AQ implementation read this blogpost

To enable the EDN-JMS implementation you need to do the following steps which are described in this blogpost

We need to create the following JMS artefacts.

Create a JMS Server with a file or jdbc persistence.
Create a JMS Modules with a sub-deployment targeted to this JMS server.

Create a JMS Connection Factory called EDNConnectionFactory with JNDI name jms/fabric/EDNConnectionFactory, disable XA and targeted this to your WebLogic server.

Create a JMS Connection Factory called xaEDNConnectionFactory with JNDI name jms/fabric/xaEDNConnectionFactory, enable XA and targeted this to your WebLogic server.

Create a Queue called EDNQueue with JNDI name jms/fabric/EDNQueue and use the subdeployment so its targeted to the JMS server.

When we start our ADF Web application and change some data, we can take a look at the Queue. Here we will see the EDN events.



Last step is to setup Store and Forward. For this we can follow this Middleware Magic blogpost

See this blogpost how to fire EDN events  from Java and OSB instead of ADF BC. 

cheers

3 comments:

  1. Hi Biemond,

    nice post..

    could you please help me in creating socket adapter i followed the example give by oracle but it is not taking input i mean the test button is greyed out.. can you suggest with an example

    ReplyDelete
    Replies
    1. did you find any solution to that? iam facing the same issue..

      Delete
  2. Hi Biemond,

    I have a question about BPEL Variable sensors, not sure whether to ask you here or somewhere else on this blog, so my question is: I have created a variable sensor to monitor a variable in a BPEL process, and this variable gets modified at many places in this particular BPEL process, when I test this process, all I see is last 2 occurrences of modifications to this variable on this sensor, is this behavior a standard or something we could change by some setting?

    ReplyDelete