Friday, February 27, 2009

How to configure Hermes JMS for Weblogic and Glassfish

it's a bit painful...



create a session, (action/new/new session)
in the Providers tab, right click, add group wl10 with library: 

weblogic.jar
wlfullclient.jar

for Connection Factory choose "hermes.JNDIConnectionFactory", loader wl10,

property:
binding=javax/jms/QueueConnectionFactory
initialContextFactory=weblogic.jndi.WLInitialContextFactory
providerURL=t3://localhost:7001
securityCredentials=yourpasswordhere
securityPrincipal=weblogic


then click on "discover"....

I wish they had made it simpler, indeed...

check out also this:
http://blogs.oracle.com/jamesbayer/2008/01/hermes_jms_open_source_jms_con.html

it is wise to create a Context and point it to your server. Don't forget to set your initialContextFactory=weblogic.jndi.WLInitialContextFactory
and the loader to wl10

if you get an exception Cannot instantiate class: weblogic.jndi.WLInitialContextFactory  , see here
http://hermesjms.org/forum/viewtopic.php?f=12&t=172
, most likely the Loader is not set.


For Glassfish, I have found these instructions:

http://www.hermesjms.com/forum/viewtopic.php?f=25&t=352

but they probably apply to something different from Glassfish Enterprise Edition 3.0... googling around I understand that one should use com.sun.appserv.naming.S1ASCtxFactory as a Initial Context Factory,
but I could not find this class anywhere in the NetBeans and Glassfish jar files...





1 comment:

Atul Shinkar said...

Very nice article. Thanks for sharing :)