Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing Remote JBOSSMQ from local JBOSS  RSS feed

Sundara Rajan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a local JBOSSMQ running on my machine with one Queue and one Topic Configured
I have a remote JBOSSMQ running on another machine with identical Queues and Topic configured
I have a requirement where a servlet running on either or the above JBOSS servers should be able to post messages to JBOSSMQ on the remote server and be able to register as listeners to remote topics.
I have the following code in plave that creates an initial context
// providerUrl is usually passed at run time which
// will be of the form aaa.bbb.ccc.ddd ort

String provider=null;
Properties prop = new Properties();
provider = providerUrl;
//This points to the JBOSSMQ running on the local
// machine
provider=Constants.JMS_HOST + ":" + Constants.JMS_PORT;
prop.put(Context.PROVIDER_URL, provider);
prop.put("", "yes");
prop.put(Context.URL_PKG_PREFIXES, Constants.JMS_URL_PKG_PREFIXES);

* Create a JNDI API InitialContext object if none exists
* yet.
try {
jndiContext = new InitialContext(prop);
} catch (NamingException e) {
if (LOG.isErrorEnabled()) {
The code works fine for local JBOSS. But if the providerUrl is remote then I get the following exception10:41:30,323 ERROR [STDERR] java.rmi.ServerException: RemoteException occurred in server thread; nes
ted exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manag
er: RMI class loader disabled)
10:41:30,323 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.Transport$
10:41:30,323 ERROR [STDERR] at Method)
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.ja
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$
10:41:30,323 ERROR [STDERR] at
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(St
10:41:30,323 ERROR [STDERR] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.j
10:41:30,323 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(
10:41:30,323 ERROR [STDERR] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
10:41:30,323 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(
10:41:30,323 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(
10:41:30,355 ERROR [STDERR] at javax.naming.InitialContext.lookup(
I have jnp-client.jar in WEB-INF/lib which is the FastNamingProperties class
Interestingly , i can access remote JBOSSMQ from a stand alone application.
Some to do with security? Has anybody faced this problem?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!