Hello folks, I'm using JBoss 3.0.4 with the 1.4.0 JDK from Sun, compiled
from sources, with jbossmq as the JMS implementation. I'm running
everything on a Mandrake Linux 9.0. The remote computer uses the same
versions of JBoss and JDK.
I'm trying to send a message to a queue on a different computer here;
trouble is, I can't find the exact steps to take to do that in the docs.
The approach I've been trying is using JNP to find the JNDI provider on
the remote computer ("jnp://192.168.192.252:1099"), access the queue by
it's name (say "queue/B"), and try to send it a message. But trouble is
both lookup("ConnectionFactory") and lookup("queue/B") return null. When
an office mate tries to send a message to me, the message gets through,
but the JBoss console says something about an exception: "Cannot connect
to the ConnectionReceiver/Server". I'm using localhost:8080/jmx-console
to verify that messages get through. I'm trying to send messages from a
client application, not from an enterprise bean.
Here's what I do:
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "jnp://merlin:1099");
env.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
env.put( Context.SECURITY_PRINCIPAL, "john" );
env.put( Context.SECURITY_CREDENTIALS, "neddle" );
InitialContext iniCtx = new InitialContext(env);
System.out.println ("New context: " + iniCtx + " env: " + env);
QueueConnectionFactory qcf = (QueueConnectionFactory)
iniCtx.lookup("ConnectionFactory");
if (qcf == null) {
System.out.println ("OOPS");
//return ;
}
What am I doing wrong? Any ideas?
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
