4 Replies Latest reply on May 8, 2013 12:17 PM by Alieksei Illarionov

    Can I connect remotely to an embedded JMS Server?

    Alieksei Illarionov Newbie

      Can I connect remotely to an embedded JMS Server?

       

      I want to start an embedded JMS Server:

       

      jmsServer = new EmbeddedJMS();

      ...

      jmsServer.start();

       

      and then connect to it remotely from another JVM (and probably altogether from another machine) via JNDI.

       

      My JNDI initial context porperties are:

       

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

      java.naming.provider.url=jnp://localhost:1099

      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      When I try to pull this off I get exceptions like

      javax.naming.CommunicationException: Failed to retrieve stub from server localhost/127.0.0.1:1099

      or

      java.net.ConnectException: Connection refused

       

      When I start a standalone server though it works like a charm. What am I doing wrong?