Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss JMS lookup

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

I have this code segment:
final String jnpURL="jnp://";
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);"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: 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: no protocol: and]
at org.jnp.interfaces.NamingContext.lookup(
at org.jnp.interfaces.NamingContext.lookup(
at javax.naming.InitialContext.lookup(

I believe there is no connection problem.

Any help is appreciated!

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic