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...





Thursday, February 26, 2009

WLST to create a FileStore and a SAF agent


cd('/')
cmo.createFileStore('FileStore_auto_1')

cd('/Deployments/FileStore_auto_1')
cmo.setDirectory('FileStore_auto_1')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

cd('/')
cmo.createSAFAgent('SAFAgent-0')

cd('/SAFAgents/SAFAgent-0')
cmo.setStore(getMBean('/Deployments/FileStore_auto_1'))
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))
cmo.setServiceType('Sending-only')





Saturday, February 21, 2009

handy SOAP envelope for you

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pvh="http://com/alsb/pvhello">
   <soapenv:Header/>
   <soapenv:Body>
      <pvh:getGreeting>
         <pvh:message>?</pvh:message>
      </pvh:getGreeting>
   </soapenv:Body>
</soapenv:Envelope>


the XSD is available here: