Advertisements

Archive for October, 2011

TIBCO JMS from OSB – Issue

In the post, we have seen the required setup to be done in OSB to connect to remote TIBCO JMS queues. In OSB 11.1.1.3, we observed an issue while connecting to remote queues with the following error, though the correct username and password has been provided in foreign JMS server.

     invalid username/password.

Following are the workarounds we have done to overcome this issue:

  • Navigate to $DOMAIN_HOME/config/jms folder and open the xml file related to the JMS module. Replace the encrypted password highlighted in below screenshot with literal password text. I don’t recommend this workaround. Following it up with Oracle technical team by logging SR also would not yield any solution in the limited time we had.

                        TIBCO JMS Module

  • The issue is resolved automatically after upgrading OSB to 11.1.1.4 version.
Advertisements

Connecting to TIBCO JMS from OSB

One of the common integration scenarios is reading or writing messages to TIBCO JMS queues. In this post, we will go through the required setup for connecting to TIBCO JMS queues from OSB.

To connect to the queues hosted in remote server, following is the common design pattern. The message will be inserted into local queues which will be pushed on to remote TIBCO JMS queue automatically by WLS.

OSB -> Foreign JMS Queue in local WLS -> Actual Remote TIBCO JMS Queue

As we know that we always use the JMS queue in the context of connection factory in OSB, we need to create the following artefacts in our OSB WLS.

  • Foreign Server
  • Connection Factory
  • Foreign JMS Queues
  • Foreign JMS Module to store above artefacts

Keep the Tibjms.jar in $DOMAIN_DIR/lib directory which contains the connection factory class that we will create as part of this setup. Depending on requirements you may want to the following other TIBCO related jars.

Tibcrypt.jar

Tibjmsapp.jar

Tibjmsadmin.jar

Tibrvjms.jar

Setup in OSB WLS Console:

Navigate to Services -> Messaging -> JMS Modules and click on Next to create the JMS module.

         clip_image002

Enter the JMS module name and click on Next.

          clip_image004

Select the server to deploy the JMS module to and click on Next.

         clip_image006

          clip_image008

Click on Finish button and navigate to JMS module that we created by clicking on it as shown below.

          clip_image010

We need to create the required connection factory and queues within this JMS module. The first step is creating the foreign server. So click on New button and select foreign server as shown below and click on Next button.

         clip_image012

Enter meaningful name for foreign Server and click on Next button to proceed to next screen.

         clip_image014

Select the Admin server or other available server to deploy this JMS server so that it can be accessible and click on Finish button.

         clip_image016

Verify the foreign server is created and visible in Summary of Resource sections as shown below.

         clip_image018

Click on newly created foreign JMS server to bring up the following screen. And this is the screen where we enter the remote host name and related credentials hosting the TIBCO JMS queues that we want to connect to.

         clip_image020

Enter the values for these fields as shown below and click on Save button. And the context factory class used here is present in the Tibjms.jar that we put in the server class path.

JNDI Initial Context Factory: com.tibco.tibjms.naming.TibjmsInitialContextFactory

JNDI Connection URL : tibjmsnaming://<remote hostname>:port

                                    : ssl://<hostname>:port (if SSL enabled at remote host)

JNDI Properties Credentials : <<password to connect to remote TIBCO server>>

Confirm JNDI Properties Credentials : Re enter the password

JNDI Properties :

java.naming.security.principal=<<username to connect remote TIBCO server>>

com.tibco.tibjms.naming.security_protocol=ssl (if ssl enabled)

com.tibco.tibjms.naming.ssl_enable_verify_host=false (if ssl enabled)

Now Click on Connection Factories tab and click on New button to create the connection factory Enter the meaningful name for the connection factory and unique local JNDI name. Remote JNDI is the JNDI of the connection factory defined in remote TIBCO server. Click on OK once all the required details have been entered.

        clip_image022

Now Click on Destinations tab and click on New button to create the queues. Enter the meaningful name for the queue and unique local JNDI name. Remote JNDI is the JNDI of the JMS queue defined in remote TIBCO server. Click on OK once all the details have been entered. Create as many queues as required in the same way.

       clip_image024

Now We are done with the required setup. If you have a requirement of pushing the messages TIBCO JMS then create business service with JMS transport and give the url as shown below. If you have a requirement of polling the JMS queue then create a proxy service with JMS transport and give the url as shown below.

jms:///<<JNDI of local connection Factory>>/<< JNDI of local queue>>

Using BAM Adapter in OSB

OSB has support for BAM adapter since 11.1.1.3 release. This post talks about creating a business service using BAM JCA adapter that can push data into BAM Active Data Cache for displaying in real-time dashboards or in BAM reports. Before actually proceeding further i want to thank my colleague who allowed  me to take shameless copy of her screenshots.

This post assumes basic understanding of BAM and data objects.

To use the JCA BAM adapter we have to create the necessary JCA, WSDL and other files in JDeveloper and get them into OSB project. This procedure is same irrespective of the JCA adapter that we want to use with OSB as the Eclipse environment does not have support for this.

So the first step is creating BAM connection JDeveloper. To create BAM connection do File->New->Connections->BAM Connection.

                      image

Enter any meaningful name for BAM connection and click on Next.

                       image

Give the host name where the BAM server is hosted as shown in the following screenshot and click on Next.

                         image

In the next screen, do the Test Connection to make sure that Jdeveloper is able to connect to BAM server. This connection will be used in the BAM adapter wizard to select the required data object.

Now create a SOA project and drag the BAM adapter from Service Adapters section to External References section swim lane of the composite.xml to bring up adapter wizard as shown below.

                            image

Enter the meaningful name and click on Next. Select the operation that has to be performed on BAM data object as shown below.

                            image 

Click on the Browse button which fetches all the data objects that are created as shown below.

                            clip_image002

In my case, i have selected the operation ‘upset’ and ‘Testdataobject’. Select the columns from available list that have to be available to perform the selected operation from OSB.

                            clip_image004

Click on Next which brings the screen to enter the JNDI name of the connection pool. This connection pool has to be created in the WLS admin console for BAM Adapter in OSB. Enter eis/bam/soap as JNDI value  and click on Next and Finish to complete the wizard.

                             clip_image006

After finishing this wizard, we can see the WSDL, JCA and XSD files getting created in our SOA project. Copy these files into an OSB project and do right click on JCA file and select Oracle Service Bus –> Generate Service to create the business service as shown below.

                                image

Make sure that you have done the following configuration in OSB WLS Admin console i.e. required for connecting to BAM server. Login to WLS Admin Console and go to Deployments->OracleBamAdapter. Click on Configuration –> Outbound Connection Pools which brings up the following screen.

                              image

Click on eis/bam/soap and enter the BAM server details as shown below.

                               image

Now run the above created business service and verify.


Advertisements

Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 337 other followers

Enter your email address to follow this blog and receive notifications of new posts by email.