Hi,
I have got one single code-base application deployed as two ears A.ear and 
B.ear which are scoped&isolated through jboss-app.xml and ear-deployer.xml 
configurations.(i.e just to make clear ,both ears are containing same classes).
I used extensively EJB injections in my applicaiton.

Here I am getting somehow "Non matching type for inject of field: " exception 
while invoking one of my ejb on one ear.

I debugged it closely, and found that somehow Jboss Proxy references are 
containing wrong classloader references.(In execution process one ejb 
StatelessContainer contains right classloader but the other ejb Stateless 
Container contains wrong classloader) This happens exactly in between one of 
dependent ejbs invocation(which are injected through EJB annotation). The same 
works fine if I use my ServiceLocator(ofcourse). Here I strongly suspect EJB 
injection mechanism.

I debugged littlebit more closesly how jboss is handling ejb injection. 
If I have an annotation
@EJB(beanName = "Test") in ejb A then its ref-name   env/com.xxx.A/test is 
binded to Test.
How jboss here logically maintains scoped ejb injection. JBoss does not realize 
which "Test" to get from which ear.(Actualy in other scoped B.ear it is also 
having the same ejb-ref name) 

Actually If my ear is scoped then I would except injection is also scoped 
unless I provide mappedName attribute for EJB annotation.

Pleaes help me.
Thanks in advance,
Jelda



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936332#3936332

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936332


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to