• Post Reply Bookmark Topic Watch Topic
  • New Topic

websphere mdb client context issue  RSS feed

 
nan priya
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am testing mdb with a standalone client,
i could not get QueueconnectionFactory from context, i get only ConnectionFactory context. please the code .. i am using RAD

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL,"iiop://localhost:2809");
ic = new InitialContext(env);
System.out.println("Context :"+ic);

ConnectionFactory qcf = (ConnectionFactory)ic.lookup("jms/ava.prov.eps_QCF");
System.out.println("--qcf---------"+qcf);
javax.jms.Connection qConnection = (javax.jms.Connection)qcf.createConnection();
System.out.println("--qConnection-"+qConnection);
javax.jms.Session qSession = (Session)qConnection.createSession(false,Session.AUTO_ACKNOWLEDGE);
System.out.println("--qSession---"+qSession);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!