How to add the ear JNDI namespace to EJB2.x Beans?
In the project I am currently working at we have about 20 different EJB 2 JARs that are used across multiple (Swing-) clients.
Example:
customer-1.0.0.jar
^ ^
| |
client-app-1 client-app-2
These different client applications have different release cycles so they usually n开发者_运维问答eed different versions of the same EJBs. Deploying those beans simultaneously does of course not work because they have the same JNDI name. As I am experienced with EJB 3 I thought deploying the EJB 2 beans in a per-application-EAR would solve the problem as the EAR JNDI namespace is used in EJB 3 beans (e.g. client-app-1/CustomerBean, client-app-2/CustomerBean, etc.). However this seems not to be the case for EJB 2.
Now, is there a way to prefix the EJB 2 JNDI names with the namespace of the EAR they are packaged in? I know that migrating those (legacy) beans to EJB 3 would be one answer, but we currently do not have the time to do this.
If the answer is dependent on the application server: We are using JBoss 4.2.3.GA.
精彩评论