• 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);
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: 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!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!