This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Websphere and the fly likes JMS message posting from websphere 6.1 to weblogic 10 application server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JMS message posting from websphere 6.1 to weblogic 10 application server" Watch "JMS message posting from websphere 6.1 to weblogic 10 application server" New topic
Author

JMS message posting from websphere 6.1 to weblogic 10 application server

svdsudhakar sankara
Greenhorn

Joined: Feb 07, 2011
Posts: 1
Hi

Below is the detailed description about my issue

we are using websphere 6.1 application server and weblogic 10 application server. We have to post JMS messages from websphere 6.1 application server to weblogic 10 application server. Our QueConnectionFactory and Queue are created in weblogic 10 application server.

I am able to post the JMS messages from websphere 6.1 to weblogic 10 application server using t3 protoco l and weblogics initial ContextFactory (weblogic.jndi.WLInitialContextFactory)

But we have to use any one of the following approaches

Approach 1:
we have to post JMS messages to the Queue created in weblogic10 application server using websphere initial context factory (com.ibm.websphere.naming. WsnInitial ContextFactory) and IIOP protocol to post the JMS messages which means to lookup the QueConnectionFactory and Queue we have to use IIOP protocol and the com.ibm.websphere.naming.WsnInitialContextFactory.

Approach 2:
We have to use weblogics initial ContextFactory (weblogic.jndi.WLInitialContextFactory) and IIOP protocol I tried to post the JMS messages to weblogic 10 Application server from Websphere 6.1 application server as my web application is deployed in websphere application server . But in this approach weblogic classes depends on SUN JRE which is not available in websphere application server. and failed to post the messages.


We are able to post the JMS Messages using t3 protocol and weblogic InitailContext Factory.

Here the issue is IIOP protocol and weblogic server.

(we dont have websphere MQ server)

This is our requirement.
Could you please assist me in this regard.

Sample program===>


Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory

env.put(Context.PROVIDER_URL, "iiop://172.16.3.52:10090");
env.put(Context.SECURITY_CREDENTIALS,new String("JMPTR"));
env.put(Context.SECURITY_PRINCIPAL, new String("admin"));


InitialContext ctx = new InitialContext(env);
System.out.println("Context Object Created: "+ ctx);

qConnectionFactory = (QueueConnectionFactory)ctx.lookup("jms/CWSQFOREXEMAILCF");


qConnection = qConnectionFactory.createQueueConnection();

qConnection.start();
qSession = qConnection.createQueueSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);

Queue queue = (Queue)ctx.lookup("jms/RemoteQ");
qSender = qSession.createSender(queue);
ObjectMessage objMsg = qSession.createObjectMessage();
//System.out.println("Sending HashMap=" + msgObj);
objMsg.setObject("12311241 sudhakar");
qSender.send(objMsg);




king sekar
Greenhorn

Joined: Jun 05, 2012
Posts: 1
Hi,
i am also trying to send the JMS from websphere to Weblogic server. I have gone threw many websites and finalized that we can do this by using below context factory:
”weblogic.jndi.WLInitialContextFactory”. But, After i saw your post i bit confused, can you please tell me how to connect the weblogic from websphere's jms by using the websphere's default initial context lookup using IIOP url. For that, do i need to set anything in Admin Console (like, EndpointURL for Connection Factory in websphere)
Next, Do i need to place the weblogic.jar or any weblogic jars in websphere's classpath.

thanks in advance
rgs,
Kingsekar
 
 
subject: JMS message posting from websphere 6.1 to weblogic 10 application server