Can't lookup jms/RemoteConnectionFactory
nlsurfman Jan 7, 2015 5:38 AMI have a Swing app, connecting to my Wildfly-8.2.0.Final server. It works, except for one part: I can't look up jms/RemoteConnectionFactory to be able to talk to JMS/HornetQ. I find this really strange because I have NO trouble looking up EJB's with the same InitialContext.
The code that does the lookup looks lilke this:
TopicConnectionFactory topicFactory = (TopicConnectionFactory) ctx.lookup("jms/RemoteConnectionFactory");
I double checked it in my standalone-full.xml, that it had "java:jboss/exported" in front of it. The messaging config hasn't changed from the default.
As soon as I try to lookup the jms/RemoteConnectionFactory, there is about a 5 second wait, then I get an Exception:
javax.naming.NamingException: Unable to invoke lookup, status=WAITING
at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:98)
at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:95)
at org.jboss.naming.remote.client.HaRemoteNamingStore$1.operation(HaRemoteNamingStore.java:276)
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:132)
at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:87)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:129)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.acme.util.MessageReceiver.<init>(MessageReceiver.java:21)
The code that creates the InitialContext looks like this:
String REMOTE_URL_TEMPLATE = "http-remoting://{0}:{1}";
String serverName = "10.0.0.100";
String serverPort = "8080";
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
props.put(Context.PROVIDER_URL, MessageFormat.format(REMOTE_URL_TEMPLATE, serverName, serverPort));
props.put("jboss.naming.client.ejb.context", true);
return new InitialContext(props);
Can anybody shed some light on this?
Thanks!