Hi,
I am not sure about
j2ee server.
But with reference to the following url:
http://forum.sun.com/thread.jsp?forum=8&thread=6761 Context Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
prop.put(Context.PROVIDER_URL, "localhost:1050");
prop.put(Context.SECURITY_AUTHENTICATION, "simple");
prop.put(Context.SECURITY_PRINCIPAL, "guest");
prop.put(Context.SECURITY_CREDENTIALS, "guest123");
Context initial = new InitialContext(prop);
************************************************
Then in the try catch block use the following code
try
{
initial.lookup("QueueConnectionFactory");// for Queues.
}
catch(NamingException ne)
{ }
Regards,
M.S.Raman.