[jboss-user] [Messaging, JMS & JBossMQ] - Re: Using JNDIProviderAdapter from client (MDB) code?

ewestland do-not-reply at jboss.com
Sat Aug 19 09:14:43 EDT 2006


"That was easy!!!" - sigh...


  | InitialContext localCtx = new InitialContext();
  | JNDIProviderAdapter jmsProvider = (JNDIProviderAdapter) localCtx.lookup("java:/RemoteJMSProvider");
  | Properties jmsProviderProps = jmsProvider.getProperties();
  | InitialContext remoteCtx = new InitialContext(jmsProviderProps);
  | Destination topic =  (Destination) remoteCtx.lookup("queue/test");
  | 

Note: You will need to include jboss.jar in build path.

Cheers,
Erik


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966235#3966235

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966235



More information about the jboss-user mailing list