From wildfly 10 documentation:
For example, the following jms-queue "testQueue" is bound to "java:jboss/exported/jms/queue/test" which means a remote client would look-up this {{kms-queue} using "jms/queue/test". A local client could look it up using "java:jboss/exported/jms/queue/test", "java:jms/queue/test", or more simply "jms/queue/test"
In my MDB if I use
@Resource(mappedName = "java:/jboss/exported/jms/queue/TestQ")
Queue testQ;
It works fine, But on trying out the following:
@Resource(mappedName = "java:jms/queue/TestQ")
Queue testQ;
or
@Resource(mappedName = "jms/queue/TestQ")
Queue testQ;
I get the following error while deploying the application in wildfly 10
{"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.app.app.env.\"com.example.jms.ExampleMdb\".testQ is missing [jboss.naming.context.java.jboss.java:jms.queue.TestQ]"]}
What could be the problem? and if I use java:/jboss/exported/jms/queue/TestQ will it work well with other servers other than wildfly?