2
votes

how to connect to webmethods over JMS from a web application running on 64bit WebSphere application server v7.0.0.23 ?

I have a standard spring based web application which is deployed on websphere 7 application server. I need to connect to SoftwareAG WebMethods JMS Provider from this application.

  1. I tried to lookup connectionFactory configured in the remote JNDI Server of webmethods using spring jndi.

    • it failed to initialize the initialContext with NPE.
  2. I tried to create a Custom JMS Provider in websphere admin console under resources which maps the external JNDI resource of Webmethods to locallly available JNDI resouce. Then I used spring jndi to lookup the connectionFactory from local JNDI of websphere.

    • it failed with NoClassDefFoundError : javax.jms.ConnectionFactory

Has anyone integrated websphere and webmethods before successfully ? Please share the experience and how to get it going ?

2
Hello. Are you find a solution to do this? if yes plz share it with me.Med Elgarnaoui

2 Answers

0
votes

Hi I have gotten it working by setting up the queues in WebSphere and have connected to it externally in Java this way:

   `Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
    Context jndiContext = null;
    try {
        jndiContext = new InitialContext(env);
    } catch (NamingException e) {....`

WebMethods has connected to the same queues by using the same properties I specified in the env HashTable

0
votes

Another solution is to expose a web service in webMethods and have your Spring application call the web service.

You can then have the webMethods web service handler publish to the webMethods broker in order to trigger whatever you need.