This post is continuous to my previous post “Creating a JMS queue in oracle weblogic server 12C”.
For viewing my previous post ClickHere
Here we are discussing on publishing messages to the queue.
we will create a BPEL process which will publish messages to a JMS queue using a JMS adapter.
For creating this sample we need the below objects.
- Connection factory
- Connection Pool.
I already created Connection Factory and queue in my old post , here I will create a connection pool.
Login to weblogic server console .
Go to Deployments-> Jms Adapter
Open the JMS adapter and go to Configuration -> Outbound Connection Pools and create a new connection pool.
- Check the oracle.tip.adapter.jms.IJmsConnectionFactory check box and Next.
- Enter JNDI Name: eis/jms/TestQueue
for the connection instance, then press Finish.
- Expand oracle.tip.adapter.jms.IJmsConnectionFactory again and select (click on) eis/jms/TestQueue
Enter jms/TestConnectionFactory into the Property Value field for Connection Factory Location. After entering it, you must press Return/Enter then Save for the value to be accepted.
Now we need to redeploy the JMS adapter to reflect the changes.
Go to Deployments-> Select the check box next to Jms Adapter and click on UPDATE.
On the Update Application page, select “Redeploy this application using the following deployment files” and press Finish.
Once the deployments updated successfully, Activate the changes.
Create a Project with BPEL process and add the JMS adapter to publish the message in previously created queue.
My input schema looks like below.
Now in the External References drag a JMS adapter and configure it to point to Queue (jms/TestQueue).
Select the JMS provider as “Oracle Enterprise Messaging Service(oracle weblogic JMS)” and click on Next.
Select the Application Server connection and click on Next.
Select the Interface as “Define from operation and schema” and click on Next.
Select the Operation type as “Produce Message” and click on Next.
Select the JNDI name and click on Next. Select the schema and click on Next and Finish the set up.
Wire the JMS adapter to your BPEL process and assign the input to Jms adapter, Save and deploy .
Test the BPEL process and you can see the message in queue.