Hello EveryBody:
Does somebody Know how to use jndi to lookup JMS Service ??
I am getting in trouble in doing this ...(Can't find the name)Because there
is do documentation for us to
resolve this problem ..As follows is my test code to find
java:/DefaultJMSProvider service.
Please Help me...Thanks A Lot.
....
import java.util.Properties;
import javax.jms.*;
import javax.naming.*;
import java.util.*;
public class TestServer {
Context jndi;
Hashtable env=new Hashtable();
public TestServer() throws
javax.jms.JMSException,javax.naming.NamingException{
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFac
tory");
env.put(Context.PROVIDER_URL,"localhost");
// env.put("java.naming.rmi.security.manager","yes");
// env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming");
jndi=new InitialContext(env);
Object _ref = jndi.lookup("JmsTopicConnectionFactory");
//JMSProviderAdapter _ref =(JMSProviderAdapeter)
jndi.lookup("java:/DefaultJMSProvider");
System.out.println(_ref.toString());
}
public static void main(String[] args)throws NamingException,JMSException
{
TestServer testServer1 = new TestServer();
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development