1 Reply Latest reply on Oct 19, 2010 2:50 AM by Andy Taylor

    HornetQ standalone macosx with Spring

    Mark Hansen Newbie

      I'm trying to implement unit tests (TestNG) with HornetQ standalone with Spring, and have followed various tutorials.

      (e.g., http://www.javacodegeeks.com/2010/06/spring-3-hornetq-21-integration.html)


      I cannot get org.jnp.server.NamingBeanImpl to start.  Gives me:


      Caused by: javax.naming.CommunicationException: Failed to connect to server / [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server / [Root exception is java.net.ConnectException: Connection refused]]


      However, if JBoss is running in a separate JVM, then I have no problems starting NamingBeanImpl


      I have this in Spring:


      <bean name="namingServerImpl" class="org.jnp.server.NamingBeanImpl"
              init-method="start" destroy-method="stop"/>


      I've also tried a basic test like this:


      NamingBeanImpl jnpServer = new NamingBeanImpl();



      Again, when JBoss is running elsewhere, it works.  Otherwise, I get the "Connection Refused" exception.


      JNDI is set up with jndi.properties -




      I've also tried starting the rmiregistry in a separate JVM.  (Since I seem to recall that sometimes on OS X, this is necessary).  Then the NamingBeanImpl hangs.  Do I also need to start something else on port 1098?


      Any help would be much appreciated!!