I'm having a problem that on the surface looks to be very simple but that has had me stumped for a couple days.
I'm trying to deploy a JMS Connection factory and Queue on the server with the following jndi names on Wildfly 8.1.0 :
java:jboss/exported/jms/UnicsRetry for the connection factory
java:jboss/exported/queue/Create for the queue
This is my configuration xml bit for these two components, and from what I've been able to gather from the documentation, it looks correct:
<connection-factory name="UnicsJmsSource">
<connectors>
<connector-ref connector-name="http-connector"/>
</connectors>
<entries>
<entry name="java:jboss/exported/jms/UnicsRetry"/>
</entries>
<compress-large-messages>false</compress-large-messages>
<failover-on-initial-connection>false</failover-on-initial-connection>
<use-global-pools>true</use-global-pools>
</connection-factory>
<jms-queue name="CreateQueue">
<entry name="java:jboss/exported/queue/Create"/>
<durable>true</durable>
</jms-queue>
Wildfly itself accepts these and starts up without a hitch (using the standalone-full xml from commandline), however when I try to access the connection factory via JNDI (with this provider url: http-remoting://localhost:8080 using the jboss naming remote client context factory) I always get a name not found exception.
I went and printed out the jndi bindings for both java:global and java:jboss like so:
context.listBindings("java:global");
And on both cases I get this output
jboss/exported/jms/UnicsRetry -- service jboss.naming.context.java.jboss.exported.jboss.exported.jms.UnicsRetry
It looks like the connection factory is actually up and bound, so why is it that the lookup fails? Needless to say, I havenĀ“t been able to try out the queue itself or the MDB I actually want to test. I thought it may have been that I had to remove the java: part of the jndi when doing the lookup like the listing showed, but it didn't work either.
If it has anything to do with my problem, I had to put up these dependencies in my pom.xml to build my testing client:
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-remote-naming</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
<version>3.3.0.Final</version>
</dependency>
This is the full stacktrace I get, both from a standalone client and a Mule JMS connector.
Exception in thread "main" javax.naming.NameNotFoundException: jboss/exported/jms/UnicsRetry -- service jboss.naming.context.java.jboss.exported.jboss.exported.jms.UnicsRetry
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:104)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)
at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Any help any kind reader could provide would be greatly appreciated, this has me pulling my hair out.