[jboss-user] [JBoss Messaging] - Lookup for JmsXA returning null

mskonda do-not-reply at jboss.com
Thu Jun 21 04:07:00 EDT 2007


Probably a silly question, but couldn't figure out why - I've configured JmsXA to be enlisted in Global Name Space and deployed (see below)

20070621 09:00:32.333 INFO  [main] ConnectionFactoryBindingService.Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'JmsXA'():  Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'JmsXA'

However, when I do the lookup for publishing a message, I get the CF as null. 


  |  public void publish3() throws Exception
  |     {
  |         Connection conn = null;
  |         try
  |         {
  |            ConnectionFactory fac = (ConnectionFactory) initialContext.lookup("JmsXA");
  |             logger.info("-->got xa conn fact" + fac);
  |             conn = fac.createConnection();
  |             logger.info("-->created conns");
  |             Session xaSession = conn.createSession(false,
  |                 Session.AUTO_ACKNOWLEDGE);
  |             logger.info("-->created sessions");
  |             MessageProducer publisher = xaSession.createProducer(XATEST_QUEUE_1_DEST);
  |             logger.info("-->created pubishers");
  |             TextMessage message = xaSession.createTextMessage("Hello!");
  |             logger.info("-->created txtmsgs");
  |             publisher.send(message);
  |         }
  |         catch (Exception e)
  |         {
  |             logger.info("Exception in onMessage() " + e.getMessage());
  |         }
  |         finally
  |         {
  |             closeConnection(conn);
  |         }
  |     }
  | 

I can see the JmsXA bound happily in JNDI View, but can't access though. I'm not sure how and why this happens? Any help appreciated!

/Madhu

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

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



More information about the jboss-user mailing list