Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

context.lookup

 
BHAVESH SHA
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,
i am trying for clustering of JMS where in mdb i have mention the local initialConext & lookup.As i am going for clustering i would have more lookup in the initial context. Can i know we integrated more context.lookup Present code is mention below. of Single instance.

try {
InitialContext context = new InitialContext();
apsBusinessServiceHome = (APSBlazeLocalHome)context.lookup(APS_BLAZE_SERVICE_BEAN_JNDI);
queueConnectionFactory = (QueueConnectionFactory)context.lookup(APS_RETURN_MESSAGE_QUEUE_CONNECTION_FACTORY);
queue = (Queue)context.lookup(APS_RETURN_QUEUE);
} catch (NamingException ne) {
throw new EJBException("Error JNDI Objects. Actual Exception is: " + ne.getMessage(), ne);


}


Thanks and regards
Bhavesh Shah
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
more lookup in the initial context


What do you mean by more lookup in the initial context? Do you mean that you would be doing JNDI lookup in more than one machine? In that case you can pass the coma seperated url like t3://machine1 ort,t3://machine2 ort

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic