Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JBoss JMS lookup  RSS feed

 
Chris Wang
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have this code segment:
final String jnpURL="jnp://192.168.103.107:3099/";
final String icf = "org.jnp.interfaces.NamingContextFactory";
Properties props = new Properties();
props.put( Context.INITIAL_CONTEXT_FACTORY, icf );
props.put( Context.PROVIDER_URL, jnpURL );
InitialContext ctx = new InitialContext(props);
Logger.info("got JMS Context!");
QueueConnectionFactory cf_callset = (QueueConnectionFactory)ctx.lookup("XAConnectionFactory");
QueueConnectionFactory cf_resultset = (TopicConnectionFactory)ctx.lookup("XAConnectionFactory");

It works fine on the local(JBoss server) machine:192.168.103.107. When I run it on a different machine in the same network, it throws an exception when reaching: QueueConnectionFactory cf_callset = (QueueConnectionFactory)ctx.lookup("XAConnectionFactory");

javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: and]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:703)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
...

I believe there is no connection problem.

Any help is appreciated!

Chris
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!