6 Replies Latest reply on Feb 11, 2013 11:17 AM by kkkppp

    [Jboss 7.1.3] How to look up RemoteConnectionFactory remotely?

    kkkppp Newbie

      Initially I used

       


      private static final String RMI_CONNECTOR = "RemoteConnectionFactory";

       

      and everything was fine. Then I tried unit test (separate JVM) and get an error:

       

        [junit] Caused by: javax.naming.NameNotFoundException: RemoteConnectionFactory -- service jboss.naming.context.java.jboss.exported.RemoteConnectionFactory

        [junit]     at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)

       

      I searched forum, found out that I have to use "jms/RemoteConnectionFactory". Now test passes, but invocation from inside container fails:

       

      Caused by: javax.naming.NameNotFoundException: jms/RemoteConnectionFactory -- service jboss.naming.context.java.jms.RemoteConnectionFactory

          at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)

       

      The question is - which name do I use to lookup from both inside and outside? I tried both of names below, but remote lookup only works for "jms/RemoteConnectionFactory"

       

      15:36:16,042 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 71) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory

      15:36:16,043 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 71) JBAS011601: Bound messaging object to jndi name java:/RemoteConnectionFactory