Can Hermes JMS work with WebSphere embedded JMS provider?

Using Hermes with the Embedded JMS from WebSphere AS 6.0 and above.

Can Hermes JMS work with WebSphere embedded JMS provider?

Postby johnifanx98 » Sun Dec 18, 2005 6:28 pm

Thank you!
johnifanx98
 
Posts: 1
Joined: Sun Dec 18, 2005 6:26 pm

Postby Colin » Mon Dec 19, 2005 7:56 pm

Hi - what versions of Hermes and WAS have you tried?

Last time it was tried that I know of, WAS had issues with a 1.5 client... doh.

Its not on my list of providers to maintain so if you can help out (or nudge IBM) then we're here to help...

Cheers,

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK

What version of WAS are you using?

Postby Mikeryan76 » Tue Jan 31, 2006 7:09 pm

The various versions of WAS have different implementations of the embedded JMS, and my guess would be that PreV6, the Hermes JMS should work fine as it used the Websphere MQ executables.
However I have only seen it used with WAS with embedded MQ or full MQ installs.
Mikeryan76
 
Posts: 4
Joined: Wed Sep 21, 2005 2:38 am

WAS embedded JMS provider

Postby bobbick » Mon Apr 24, 2006 2:15 pm

I tried using Hermes 1.10 with the Client for JMS on J2SE with IBM WebSphere Application Server on AlphaWorks (http://www.alphaworks.ibm.com/tech/jmsclient) however it did not work b/c Hermes could not load the com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl class.

Hermes tries to instantiate it with the default constructor but unfortunately, the JmsTopicConnectionFactoryImpl requires a couple of parameters.

I'll try getting Hermes to work w/ this driver and let you know if there is a work around.
bobbick
 
Posts: 8
Joined: Mon Apr 24, 2006 2:09 pm

Postby Colin » Mon Apr 24, 2006 2:24 pm

Thats annoying and dum. It must be the only provider to not supply a default constructor - mention it to your IBM support guys.

You could try to bind the factory into JNDI and access it that way?

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK

Thanks

Postby bobbick » Mon Apr 24, 2006 3:53 pm

Colin wrote:You could try to bind the factory into JNDI and access it that way?

Thanks Colin. I'm not sure I understand your comment since the topic connection factory is already bound in the JNDI name space.

I think that as long as Hermes creates an instance of a connection factory that does not have a default c'tor, then Hermes will not be able to utilize the connection factory.

I have posted on the IBM alphaWorks site that there is a compatibility issue.

Here is the stack trace.

2006-04-24 11:40:54,635 [AWT-EventQueue-0] ERROR hermes.browser.HermesBrowser - com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl
java.lang.InstantiationException: com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at hermes.browser.dialog.ConnectionFactoryConfigPanel$4.contentsChanged(ConnectionFactoryConfigPanel.java:232)
at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)


Regards,

Bob
bobbick
 
Posts: 8
Joined: Mon Apr 24, 2006 2:09 pm

Postby Colin » Mon Apr 24, 2006 3:59 pm

Hi Bob,

It looks like you are explicitly using the IBM connection factory and setting properties on that, meaning Hermes will try and instantiate a new bean and, in this case, fail.

Use the hermes.[Queue|Topic]JNDIConnectionFactory instead and configure it with all the properties you'd normally put in the JNDI InitialContext configuration map - with the additional "binding" property for where the real connection factory is.

See the JBoss pages for an example of using JNDI:

http://www.hermesjms.com/provider_jboss.html
http://www.hermesjms.com/demos/jboss_config.html

This should at least get you past this issue.

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK

Thanks

Postby bobbick » Mon Apr 24, 2006 6:10 pm

Your suggection resolved that issue. Thanks Colin!

For the IBM driver to work correctly, the ORB must be specified as a property when creating the InitialContext. Here is sample code:

Code: Select all
Properties env = new Properties();
env.put(Context.PROVIDER_URL,"iiop://host:port");
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
InitialContext ctx = new InitialContext(env);


When Hermes looks up the JMS topic connection factory in the IBM directory, an error occurs.

The stack trace is:

Code: Select all
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl]
   at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:314)
   at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:375)
   at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113)
   at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428)
   at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
   at javax.naming.InitialContext.lookup(Unknown Source)
   at hermes.JNDIConnectionFactory.createConnection(JNDIConnectionFactory.java:69)
   at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:103)
Caused by: java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl
   at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:85)
   at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
   at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:97)
   at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:73)
   at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
   at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:305)


The IBM software is casting the ORB object to com.ibm.CORBA.iiop.ORB and the returned object is of type: com.sun.corba.se.impl.orb.ORBImpl. So the cast fails.

Right now, I'm not sure exactly how to resolve this issue. I'm thinking that maybe I could change the Hermes classpath so that it gets the IBM orb first.

Thanks for all the help.

Bob
bobbick
 
Posts: 8
Joined: Mon Apr 24, 2006 2:09 pm

Postby Colin » Mon Apr 24, 2006 8:21 pm

Hi,

Try this:

If you know the classname returned by the call...

org.omg.CORBA.ORB.init((String[])null,null)

... for the java.naming.corba.orb property or if maybe there are other non JNDI (Hermes just supports the javax.naming ones) standard properties that need setting then pop them into a regular properties file and use the userPropertiesFile or userPropertiesURL properties on the JNDIConnectionFactory to reference the file.

If its an object returned from the call - are the other properties that can be set to initialise the ORB? It should be do-able just via configuration somehow.

I'll add the java.naming.corba.orb property to the connection factory for the next release, if there are more that are useful then let me know and I can add them too to save using the ugly properties file.

Hope this gets you further....

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK

Hermes to IBM WAS internal JMS driver

Postby bobbick » Mon May 15, 2006 1:43 pm

I was able to get Hermes to communicate with IBM's internal JMS server using the IBM driver by performing the following:

com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB

and

added IBM's IDL.JAR to the Hermes classpath group.

Currently, the Hermes "discovery" feature will not work because the driver does not support JNDI "list". IBM staff noted that they will be adding that feature to a future version of their driver.

Regards,

Bob
bobbick
 
Posts: 8
Joined: Mon Apr 24, 2006 2:09 pm

Postby Colin » Mon May 15, 2006 4:40 pm

Thanks Bob, I'll get this on the website and create a new forum for the WAS JMS provider.

Regards,

Colin.
Colin
Site Admin
 
Posts: 913
Joined: Sun Sep 19, 2004 4:49 pm
Location: London, UK


Return to IBM WebSphere Embedded JMS

Who is online

Users browsing this forum: No registered users and 1 guest