Hi

Following is the code we're using to connect via JMS to a remote machine
    //Create the initial context:
  |     Properties env = new Properties();
  |     env.setProperty(InitialContext.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |     env.setProperty(InitialContext.URL_PKG_PREFIXES, 
"org.jboss.naming:org.jnp.interfaces");
  |     env.setProperty(InitialContext.PROVIDER_URL, "jnp://10.124.131.17:1099);
  | 
  |     env.setProperty(InitialContext.SECURITY_PRINCIPAL, "guest");
  |     env.setProperty(InitialContext.SECURITY_CREDENTIALS, "guest");
  | 
  |     _initialContext = new InitialContext(env);
  | 
  |     //Create the connection factory and the connection object, it will be 
reused:
  |     _connectionFactoryName = 
inProperties.stringValue(CONFIG_KEY_CONNECTION_FACTORY_NAME);
  |     TopicConnectionFactory topicConnectionFactory = 
(TopicConnectionFactory)_initialContext.lookup(_connectionFactoryName);
  |     _topicConnection = 
topicConnectionFactory.createTopicConnection("guest", "guest");

Have a look at the provider url.
Since we use as well ejbs etc. we have the jbossall-client .jar included.
Hope it helps

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

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


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to