What are the allowed JNDI name formats for EJBs in EAP 7 / 6 according to EE6+
Issue
- What are the JNDI name formats allowed according to EE6+ specifications and what are their meanings.
- Why can not i specify/access JNDI names like "java:comp/env" for my EJBs in EAP6
- I saw the below examples in the migration guide, when should I use each of these JNDI names?
Old
OrderManagerApp/ProductManagerBean/local
New
java:module/ProductManagerBean!services.ejb.ProductManager
Old
OrderManagerApp/ProductManagerBean/local
New
java:app/OrderManagerEJB/ProductManagerBean!services.ejb.ProductManager
Old
OrderManagerApp/ProductManagerBean/local
New java:app/OrderManagerApp/OrderManagerEJB/ProductManagerBean!services.ejb.ProductManager
- In JBoss EAP following binding details were displayed in the console,
java:global/sampleEar/app1/Hello!com.redhat.HelloObject
java:app/app1/Hello!com.redhat.HelloObject
java:module/Hello!com.redhat.HelloObject
java:jboss/exported/sampleEar/app1/Hello!com.redhat.HelloObject
what is the difference between java:global/
java:app/
java:module/
java:jboss/exported/
-
Which JNDI name format should be used when the ejb is packaged inside the EAR application?
-
Should we use
java:app/
as the prefix of names of EJB beans so that it will search within the same EAR ? -
There is an issue where the Jboss Application cannot connect to the Jboss server. previously they use JNDI port 1099 however that port no longer in EAP 6. we replace it with remoting port 4447 . Is there any other files need to be configure/create then please guide.
- Steps on how to configure JNDI lookup on Jboss instance standalone.xml file.
- What are the best practice to Deploy Common Ejbs. As I have this situation that there is an enterprise application that contains (WEB.war,EJB.jar). Furthermore this application have to use external EJBs ( ejb1.jar, ejb2.jar, ejb3.jar, common to other application too). My questions are:
- If i embed (insert in the EAR) the 3 external ejbx.jar, will the other applications see those ejbs?
- If i choose to deploy the ejbs as external modules should i deploy them just as "drag-drop" in deployments (in this first phase i'm using the standalone profile but in the production environment i will use domain profile)
- Or should i deploy them as modules JBOSS_HOME/modules ? if i choose this, when i will configure the domain architecture, each applications in the domain will be able to use those ejbs ?
- In the above case scenario of deploying the external EJBs.jar in JBOSS_HOME/modules, Which is the best practice to add that dependencies to the EAR project?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.