Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/_main.inc.php on line 123

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/MODEL/generic/_genericelement.class.php on line 112

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/_blog_main.inc.php on line 306

Deprecated: Function ereg() is deprecated in /home/pwsconsu/public_html/blog/inc/_blog_main.inc.php on line 413

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/plugins/code_highlight_plugin/_code_highlight.plugin.php on line 528
The South East Asia SOA Weblog - WebLogic 11g JMS Transport for WSO2 ESB - Definitive Configuration Guide

WebLogic 11g JMS Transport for WSO2 ESB - Definitive Configuration Guide

09/23/10

Permalink 12:50:03 am, by david Email , 1662 words, 79470 views   English (US)
Categories: SOA Solutions in South East Asia

WebLogic 11g JMS Transport for WSO2 ESB - Definitive Configuration Guide

There are quite a number of posts around the place regarding this stack. None of the posts I found was successful or described a decent step by step method or guide for getting this done. Lately we have done quite a bit of work with WS-Eventing over HTTP(S) and found that protocol stack (at least on Axis) to be a little lacking in a number of areas (performance, stability, reliable delivery etc… actually most of the things you want out of a message transport). Ultimately this kind of drove us back to using JMS (due to it’s scalability, maturity, performance and reliability). We will be doing more work on WS-Eventing later and will keep you all updated regarding any new findings.

Our desire to use WSO2 as our ESB of choice (currently WSO2 ESB 3.0.0) has us making many choices and even some concessions currently but to me, using JMS as a transport is an obvious choice. We also have a strong background in WebLogic server and many of our customers also like WebLogic so that has essentially driven our choice of application server (at least in the interim). I am also particularly fond of the JMS server side implementation on WebLogic (that being said… the client leaves a lot to be desired). Whilst JMS is standardized, there is very poor documentation (and incorrect) on how to get a WebLogic JMS client confgiured that runs outside the JVM space of the server. On top of this, the documentation for configuring WSO2 ESB to use 3rd party JMS providers is also lean if not almost non-existent.

If you are not knowledgeable, experienced, tenacious, careful and detailed then doing this is probably not for you (maybe you can consider paying us to do it for you). Anyway… on with the steps….

1) The very first thing to do is to get rid of the existing geronimo JMS stack from WSO2. The reason for this is that it causes problems with the class loader. In our opinion Synapse (and WSO2) should get their act together with this. Any sane enterprise architect should realize that an ESB should be able to support multiple JMS providers easily… mv CARBON_HOME/repository/plugins/geronimo-jms_1.1_spec-1.1.0.wso2v1.jar ./temp

2) Next you will need to drop a few of the WLS jars into the classpath of the WSO2 server in the CARBON_HOME/lib/endorsed directory… these come from the WLS_HOME/server/lib directory of the server… wlclient.jar, wljmsclient.jar, wlthint3client.jar… be aware that there are several bad posts around the place on this. It took quite a bit of time, jar searching and debugging to get this right.

3) Set up the connection factories you intend to use in WebLogic (see another guide for this). It is pretty simple. Just go to the admin console and open services/messaging then add a JMS server, followed by a JMS module (targeting the server to which you want to deploy of course). You then should add the connection factories you wish to use (for the example below that would be “esbConnectionFactory” wih a JNDI name of “/jms/esbConnectionFactory".

4) We are only going to cover message consumption by a service here so best to use a topic for this unless you want to have a whole lot of serial processing going on in the ESB. Note that the topic (AKA transport.jms.Destination) is not specified below. This will be proxy service specific. Go ahead and add the topic into the JMSModule you just created and target it to an appropriate subdeployment (many alternatives for this depending on how you want to structure your messaging). For example just create a topic named “customerInfoTopic” with a JNDI name of “/jms/customerInfoTopic” in a subdeployment of “WSO2″.

5) Next you want to configure the JMS Transport Receiver in the CARBON_HOME/repository/conf/axis2.xml as follows.

Code:

<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
        <parameter name="myTopicConnectionFactory" locked="false">
          <parameter name="java.naming.factory.initial" locked="false">weblogic.jndi.WLInitialContextFactory</parameter>
          <parameter name="java.naming.provider.url" locked="false">t3://localhost:7101</parameter>
          <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">/jms/esbConnectionFactory</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
    <parameter name="transport.jms.UserName" locked="false">weblogic</parameter>
    <parameter name="transport.jms.Password" locked="false">weblogic1</parameter>
        </parameter>
 
        <parameter name="myQueueConnectionFactory" locked="false">
          <parameter name="java.naming.factory.initial" locked="false">weblogic.jndi.WLInitialContextFactory</parameter>
          <parameter name="java.naming.provider.url" locked="false">t3://localhost:7101</parameter>
          <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">/jms/esbConnectionFactory</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
    <parameter name="transport.jms.UserName" locked="false">weblogic</parameter>
    <parameter name="transport.jms.Password" locked="false">weblogic1</parameter>
        </parameter>
 
        <parameter name="default" locked="false">
          <parameter name="java.naming.factory.initial" locked="false">weblogic.jndi.WLInitialContextFactory</parameter>
          <parameter name="java.naming.provider.url" locked="false">t3://localhost:7101</parameter>
          <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">/jms/esbConnectionFactory</parameter>
    <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
    <parameter name="transport.jms.UserName" locked="false">weblogic</parameter>
    <parameter name="transport.jms.Password" locked="false">weblogic1</parameter>
        </parameter>
    </transportReceiver>

6) This step is critical. When the WebLogic JMS classes load, somehow behind the scene the java security manager is invoked. WSO2 requires a JMX connection back to the JVM and thus will now need permissions for this. Add the following to JAVA_HOME/jre/lib/security/java.policy for the JVM that loads WSO2:

Code:

grant {
// JMX Java Management eXtensions to support WLS JMS in WSO2
permission javax.management.MBeanTrustPermission "register";
};

7) At this point you should be able to start the ESB. Verify that there are no CNF or other exceptions etc. You will no doubt see some WARN’s like:

Code:

[2010-09-22 16:34:30,297]  WARN - JMSListener Unable to configure the service StockOrderProxy for the JMS transport: Service doesn't have configuration information for transport customerInfoQueueCF. This service is being marked as faulty and will not be available over the JMS transport.
[2010-09-22 16:34:30,298]  WARN - JMSListener Disabling the customerInfoQueueCF transport for the service StockOrderProxy, because it is not configured properly for the service
[2010-09-22 16:34:30,299]  WARN - JMSListener Unable to configure the service WSDLValidatorService for the JMS transport: Service doesn't have configuration information for transport jms. This service is being marked as faulty and will not be available over the JMS transport.

8) You may also notice that a number of ERROR’s occur when trying to lookup JNDI names that do not exist such as dynamicQueues/wso2carbon-sts etc. This is because WLS does not allow dynamic queue creation and the JMS transport has been added to all of the system services by default when added. This is kinf o adesign oversight by the WSO2 or Synapse team… anyway, you now have to fix this or put up with the errors (Daves rule… ALWAYS FIX IT)

9) Assuming the ESB starts then you can log into the admin console. What you have to do not is disengage the JMS transport from the existing proxy services that you do not wish to configure for JMS. This can be done through the admin console Services/List/echo etc. and then on the Transports menu. Simply remove the transport for each of them. This will become more intuitive over time when you use the ESB more.

10) You can now configure an ESB proxy service to use the new JMS transport and route the incoming message to a servlet (that we have already deployed of course). We will configure a proxy service named “JMSServletProxy” for this purpose. The easiest way to do this is through the Service Bus/Source View menu as follows:

Code:

<proxy name="JMSServletProxy" transports="jms http https" startOnLoad="true" trace="enable">
        <target>
            <endpoint name="endpoint_urn_uuid_6DAF8B66EB1F59CE805670013077601-492331472">
                <address uri="http://localhost:7101/pathway/testservlet"/>
            </endpoint>
            <inSequence>
                <property name="OUT_ONLY" value="true"/>
            </inSequence>
            <outSequence>
                <send/>
            </outSequence>
        </target>
        <parameter name="transport.jms.Destination">/jms/customerInfoTopic</parameter>
        <parameter name="transport.jms.ConnectionFactoryType">topic</parameter>
    </proxy>

As you can see above we did the following (A) Defined the transports as jms, http and https (just for the hell of it… would could just use jms). (B) We defined OUT_ONLY in the in sequence to make this a one way message (otherwise the ESB will try to send a response to the caller… not required for our config). © We defined a simple out sequence with /send to send the message to the end point (D) We defined a servlet URL as the end point (note that the urn_uuid is generated for us). (E) We defined the remaining two parameters for the JMS transport connection (the jms.transport.Destination and the jms.transport.ConnectionFactoryType).

11) Test and enjoy.

Any issues, questions or comments will be happily answered in this blog. Merry integration!

Oh ya… watch this space for our new EAI adapter framework. This framework is the result of 100’s of hours of development and many years of experience in integration. It is designed to work with multiple transports and multiple ESB’s including WSO2. PathWay is an easy way to conquer the complex challenge of custom enterprise applications adapters in J2EE. We may even decide to release PathWay in an open source model… stay tuned via RSS


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

Comment from: halaman facebook [Visitor] · http://www.caturbinagunapersada.com/halkomentar-141-21605.html
Hi, just wanted to mention, I loved this article. It was helpful.
Keep on posting!
http://pilihbaik.blogspot.co.id
PermalinkPermalink 11/06/15 @ 20:03
Comment from: obat ejakulasi dini [Visitor] · http://goo.gl/rOoufE
If you wish for to get a good deal from this paragraph then you have to apply
these techniques to your won blog.
PermalinkPermalink 11/27/15 @ 20:30
Where to buy proxies
PermalinkPermalink 12/21/15 @ 10:18
Comment from: bandar ceme [Visitor] · http://pokerdewa88.com/index.php
Hi! This is my 1st comment here so I just wanted to give a
quick shout out and tell you I genuinely enjoy reading your articles.
Can you suggest any other blogs/websites/forums that deal with the same topics?
Thanks for your time!
PermalinkPermalink 04/05/16 @ 11:45
This web site certainly has all the information and facts
I needed concerning this subject and didn't know
who to ask.
PermalinkPermalink 11/23/16 @ 22:57

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Hosted by:
hosted by PWS Consulting

The South East Asia SOA Weblog

The intention of this blog is to collect thoughts on the issues, paradigms, process, vendors, solutions, project and any other item related service oriented architecture in South East Asia.


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/plugins/_calendar.plugin.php on line 135
August 2018
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      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 31  

Search


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_linkblog.php on line 46

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 300