Oracle SOA Suite - BPEL to JMS JDeveloper Project

Sharing my quick notes on steps to create and test a JMS Project. Thought it might be useful for someone who is starting on Oracle SOA Product, part of Fusion Middle-ware. We will create a synchronous bpel process that exposes soap endpoint and then writes (invoke) the input message to a queue in the middle of business process and echoes the input message back the client using reply activity.

We will use Oracle JDeveloper and Weblogic server for the runtime. Before we create the process in jdeveloper, we will first configure the JMS Queue in Weblogic server. Here are the steps.

  1. Create JMS Queue and ConnectionFactory 

    1. Start Weblogic server and log on to the console (http://localhost:7001/console/) 
    2. In the Domain Structure tree on left, expand Service then click ‘JMS Modules’ (Figure 1) 
    3. Click SOAJMSModule (for development purposes, you can also create a new Module also) and then click ‘New’ button. 
    4. On the opened page, select ‘Queue’ radio button and click ‘Next’ 
    5. Specify queue name (say queueout) and JNDI Name (say, jms/queuein) and click ‘Next’ 
    6. Optional – for Sub-deployment, select ‘SOA Subdeployment’ and target keep the default. Click ‘Finish’ (Figure 2) 
    7. Follow above steps and create Connection Factory (select Connection Factory for step d and specify jndi name, say jms/jmstest-cf) 
  2. Create Connection Pool 

    1. Click ‘Deployments’ from the Domain Structure and then click JmsAdapter (Figure 3) 
    2. Select ‘Configuration’ tab and ‘Outbound’ sub-tab and then click ‘New’ (Figure 4) 
    3. Select existing ‘oracle.tip.adapter.jms.IJmsConnectionFactory’ radio button and click ‘Next’ (Figure 5) 
    4. Specify JNDI Name, say jmstest/jmstest-cp and click ‘Finish’. 
    5. Expand ‘oracle.tip.adapter.jms.IJmsConnectionFactory’ to verify and configure the newly created connection pool. 
    6. Click the Property Value column for ConnectionFactoryLocation row and enter the connection factory value. Press enter to accept the value. Click ‘Save’ to save the value. (Figure 6) 
  3. Create JDev Project 

    1. Open JDev and create a SOA Project. Select ‘Composite with BPEL Process’ Option. 
    2. For BPEL Process, select Synchronous Project. 
    3. Double click the composite and drag and drop JMS Adapter to the right swim lane (External Reference) 
    4. Configure the JMS Wizard – enter name, select Oracle Weblogic JMS, specify app server connection, specify operation type (Produce Message, in our case), browse the queue and specify the connection factory jndi. (Figure 7) 
    5. For the Step 8 of JMS Adapter Configration wizard, click the browse button to point to the xsd for the schema for the message to the queue (Figure 8).
    6. Upon completion of wizard, you will see JMS Outbound reference on composite. Also, JCA configuration file (_jms.jca) will with adapter configuration will be created.
    7. Connection the BPEL Process to the outbound reference created in above step. (Figure 9).
    8. Go to BPEL Process and drop assign, invoke and another assign activity between receive and reply activity. Double click invoke and browse partnerlink and pick the outbound_jms partnerlink. Create new variable for the invoke activity. Configure the first assign to copy the input to invoke variable. Also configure the second assign to copy the input to output variable.
    9. Build and deploy the application.

  4. Testing the Application 

    1. Open the Enterprise Manager (http://localhost:7001/em) 
    2. Expand SOA Node from left tree and click the deployed project. On the main page click ‘Tab’  
    3. Enter input message and click ‘Test Web Service’ (Figure 10). Click respose tab to verify the response. 
    4. To view the message to the queue, go back to the weblogic console ((http://localhost:7001/console/). Navigate to Services -> Messaging -> JMS Modules -> SOAJMSModule -> queueout. Click on Monitoring tab and select the queue and press ‘Show Messages’.

Figure 1
 Figure 2
 Figure 3
 Figure 4
 Figure 5
 Figure 6
 Figure 7
 Figure 8
 Figure 9
 Figure 10




Comments:

I am using Oracle SOA Suite 11gR1 Patch Set 2 (11.1.1.3.0).

In Development Environment (development mode installation) When I created custom Connection Factory (like yours jms/jmstest-cf), at runtime my JMS adapter were giving error. So I was forced to use default Connection Factory "weblogic.jms.XAConnectionFactory" in JMS Adapter.

Just to test my Connection factory, I created a Message Driven Bean (JMS Consumer) and it started receiving message using my Custom Connection Factory.

Not sure why the JMS Adapter doesn't liked the Custom Connection Factory.

When we moved to Production Env (production env clustered installation), I repeated the same steps and this time JMS Adapter liked the connection Factory.

Any guess why JMS Adapter may have issue with Connection factory.

Posted by Anand Vithalani on September 24, 2010 at 05:50 AM PDT #

Please try restarting the WLS server after the connector factory with the custom connection factory is created for the adapter. I believe it is a known issue and it may be resolved in a later versions of WLS server.

Posted by Malkit Bhasin on September 24, 2010 at 08:40 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Malkit works in software development at Oracle, Inc. working in Oracle Business Process Manager, part of Oracle Fusion Middleware. Malkit came to Oracle through Sun Microsystems acquisition, living and working in Los Angeles, California.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today