How do I bind an arbitrary string to JNDI in JBoss EAP 6? I used to do it through org.jboss.naming.JNDIBindingServiceMgr MBean in previous EAP version.
Is there anything similar to org.jboss.naming.JNDIBindingServiceMgr in JBoss EAP 6?
We are migrating applications from jboss-5.1.EAP to jboss-eap-6.1. We need to bind some things into JNDI, so applications can look up values of environment variables.
Many thanks.
You can do the following:
standalone.xml:
and in spring context:
In your app configuration you can have things in ejb-jar.xml deployment descriptor like
or, if you prefer to have it in the server standalone.xml, do
the latter (standalone.xml) is a JBoss 7.1 feature, so available in EAP 6.0. In JBoss AS 7.0, a dummy application needs to be used according to this thread.
What if simply:
If you use that code inside of a JBoss instance you can bind variables into jndi. Remember to use the correct format for varName to bind the variable in the desired scope.