anonymous wrote : but can anyone suggest a way to restrict the lookups to the ear file
without having to rename every bean???
How about adding a jboss.xml file to each of the application and specifying a different
jndi name for the beans in each application? Something like:
in jboss.xml of app1:
<ejb-name>DataManagerBean</ejb-name>
| <jndi-name>app1/ejb/DataManagerBean</jndi-name>
|
in jboss.xml of app2:
<ejb-name>DataManagerBean</ejb-name>
| <jndi-name>app2/ejb/DataManagerBean</jndi-name>
|
Ofcourse, you would have to change the code where the lookup of the bean is happening.
String appName = getAppName();//implement some logic to pickup the appName from a
properties file or the env-entry
| Context ctx = new InitialContext();
| DataManager) manager = (DataManager)ctx.lookup(appName +
"/ejb/DataManagerBean");
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045295#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...