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 - Archives for: September 2010

Archives for: September 2010

09/23/10

Permalink 12:50:03 am, by david Email , 1662 words, 78399 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

09/16/10

Permalink 10:45:20 pm, by david Email , 1065 words, 17421 views   English (US)
Categories: SOA Solutions in South East Asia

Oracle vs Google on Java... Overblown?

After considering some of the posts I have read around the place and some of the real issues at hand in the suit Oracle has started against Google regarding alleged infringements on Java patents/copyright etc. with Android one has to ask themselves whether the whole thing is being blown out of proportion by the community and exploited by Larry bashers (the industry has seen an age of Larry bashing… Bill is off the scene now so Larry is one of few pre-internet dinosaurs left). The situation also begs the question as to whether Sun was poised to launch exactly the same action at this juncture. Considering some of the comments in articles and links I have read (written by people such as James Gosling and Jonathan Schwartz) as well as considering Suns prior suit against Microsoft for infringements related to Java (they were awarded 1.6 billion in restitution I believe) it should be clear that Sun was probably in a position to move this action forward and that they had potentially used this as a basis for added value in the deal with Oracle. Afterall… let’s consider Suns desperate situation a mounting debt. Desperation tends to erode traditional values like a cancer.

From Oracle’s perspective you could hardly blame them for wanting to get some quick return on investment for their 7.4 billion as quickly as possible. Simplistically I would suspect that the additional first year top line revenues of around 1.6Bn, plus the 2.6Bn in cash and a healthy settlement from Google (presumably around 2Bn given the case history with MSFT) would really make the acquisition a no-brainer for Oracle.

In regard to the actual infringements in question, none of that is clear at present but what does seem evident is that this is not a normal OEM case in that Google have built a virtual machine that appears to process Java byte codes in way that may be infringing Oracle (formerly Sun) patents and copyright. It is pretty obvious that Google will be trying to drum up as much community sympathy as possible to find their way out of this and at least soften Oracle up for a settlement. Whether that sympathy is warranted is very questionable.

There are many posts around the place that discuss ‘ethics’ in the same sentence as large American corporations. To me this is kind of stupid as none of them ever seem to survive well when acting ethically and practically none of them act ethically in everyone’s definition. Oracle has always suffered from an image problem that stems from the approach the leadership there takes toward people. Maybe they would be better off longer term to try and change that a little. Sun was a very different company and perceived as community minded by many. Look where that got them!! It’s not like the community jumped in to save them when the going got tough now is it… These and other factors are probably some of the reasons why people seem to have a major problem with anything Larry does. When you look at trying to mix a culture like Sun’s with a culture like Oracle’s, it is something akin to trying to mix oil and water (an endeavor that one of our other loved behemoths has been trying in the Gulf for a while now). As for Google, their history as a darling startup has long passed. In my eyes they are just another big corporation that is hungry for profits as any other and probably just as ethical as the next corporation.

It is a risky proposition at best in making any distinction between any of these mega-corporations. From a personal standpoint I think it is a fundamental error in judgment. At the end of the day they are all very large corporations that for the most part have no tangible interest in furthering the cause of humanity, people or anything/anyone else other than earnings and share holders.

So really… who gives a shit if Oracle or Google wins or loses. It isn’t going to make any difference to my life and nobody is ever going to ask me to pay for a JVM. If they do then they will be disappointed as I will probably just use the open source JVM as it is licensed under the GPL (as Sun… now Oracle made it that way). Java is a cool programming language, it always will be as it was modeled using many lessons learned from many languages preceding it (maybe there are a few IP infringements in there too… Larry has plenty of money so give it a try). In respect to Java there are few (almost none) viable alternatives that have anywhere near the base of libraries Java has currently. Java has always been proprietary and always been licensed like most other languages in use today. It seems again we have to choose between two evils for enterprise development… anyone remember the COM vs CORBA or browser wars? How does IBM stay out of these conflicts and still make money?

From a practically engineering perspective I just don’t see the difference whether Oracle, Sun or any other large company owns Java or any other language. I have been in the IT industry for 28 years. I have used many languages in that time including Fortran, Basic, Pascal, C, CPP, Eiffel, Java, TCL and a bit of PHP to name but a few. Some of them survive for a while but others die. SOme of them are more open than others. ALL OF THEM WITHOUT EXCEPTION have embraced or copied concepts from one another at some point in time.

IMHO Oracle vs Google is another example of a society gone mad. Next thing you know somebody will be suing the world for patent infringements in the use of iteration. In summary… I think this suit and many coming before it are overblown results of an overly litigious society that is sick with greed for money and power. It really doesn’t have any impact on the future of Java as a language or any of the J2EE and contributor licensees as long as they play by the rules. I think Java will be around as a language for a long time to come. Don’t be foolish and try to dump it just because Larry owns it.

Who wins? Who loses? For gods sake… who cares?


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

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
September 2010
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
      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    

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: 17