-
1. Re: Not able to Deploy Local ejbs across multiple ears
wluque Sep 10, 2009 3:19 PM (in response to anandlramadurg)Hi , I have the same example , work fine for me in Jboss 4.2.2.GA , but I have the same InstanceAlreadyExistsException error in Jboss 5.1.0.GA .
I need only one EJB instance reference running in the server used by the all EARS. Taht work in jboss4.2.2. but not work in Jboss 5.1 .
Any idea?
Best regards
Walter -
2. Re: Not able to Deploy Local ejbs across multiple ears
jaikiran Sep 11, 2009 1:16 AM (in response to anandlramadurg)Walter,
Let's discuss your issue in your other thread here http://www.jboss.org/index.html?module=bb&op=viewtopic&t=161109 -
3. Re: Not able to Deploy Local ejbs across multiple ears
anandlramadurg Sep 11, 2009 7:17 AM (in response to anandlramadurg)I have found the work around for such scenario,
In JBoss, unlike Weblogic, you cannot deploy same local ejb with same local jndi name across multiple ears. ( However this is nowhere specified in ejb specification ).
Work around for such scenario in JBoss is,
While deploying local ejbs in JBoss, dont specify the jndi for ejbs ( i.e. Remove the jboss.xml file ). Server will assign a random jndi name to it.
Make use of ejb-local-ref in web.xml, just configure the ejb you want access in web.xml
<ejb-local-ref>
<ejb-ref-name>MySession</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>mySessionlocalHOme</local-home>
mySessionLocal
<ejb-link>MySession</ejb-link> //give the same name here ( ejb name )
</ejb-local-ref>
This you have to do it in all ear files.
Regards
Anand