users@glassfish.java.net

Re: How to connect to embedded JMS from external client?

From: <glassfish_at_javadesktop.org>
Date: Wed, 13 Oct 2010 15:05:02 PDT

I've made a little progress, using this JNDI:

java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost = 10.0.0.1
org.omg.CORBA.ORBInitialPort = 3700

The JARs are gf-client, all from http://download.java.net/maven/2/com/sun/messaging/mq/ and transitive dependencies, in addition to CORBA stuff. Nevertheless, this throws an exception:

Caused by: java.lang.ClassNotFoundException: com.sun.messaging.jms.ra.ResourceAdapter
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:96)
        ... 15 more

While the ResourceAdapter class can be found in the GlassFish install directory, adding it (and another transitive dependency) will fail to launch the program as well:

Error occurred on connection creation [localhost:7676]. - cause: java.net.ConnectException: Connection refused: connect

[b]Any hint much appreciated![/b]
[Message sent by forum member 'pwn4g3']

http://forums.java.net/jive/thread.jspa?messageID=485110