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

ewestland do-not-reply at jboss.com
Mon Aug 21 00:08:09 EDT 2006


Thanks for the tip...

I am pretty wiped out now, so forgive me, but I don't quite get your solution.  

My objective is indeed to use "a -ds.xml file (JCA) connection to your provider outbound", but my initial problem was getting access to the destinations on the remote JMS provider. My JBoss-specific (hokey?) solution does that.

I like that your solution looks portable, but it appears to be missing some of the extra sauce. My issue is that I am unclear how to lookup the remote destination (i.e. "queue/test") etc; assuming remote provider defined as "RemoteJmsXA" (i.e. ./deploy/jms/remotejmsxa-ds.xml).

If you could extend your example a bit to include creating a "MessageProducer" to a remote queue it would be helpful.

Standard example client code:

  | InitialContext ctx = new InitialContext();
  | Destination topic = (Destination) ctx.lookup("queue/test");
  | ConnectionFactory factory = (ConnectionFactory)ctx.lookup("UIL2ConnectionFactory");
  | Connection connection = factory.createConnection();
  | Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
  | MessageProducer publisher = session.createProducer(topic);
  | ...
  | 

Cheers,
Erik

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

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



More information about the jboss-user mailing list