Thanks. This is exactly what I am doing. But my 2.x bean is in an isolated EAR.
And that seems to be a problem. I have to use the deployment descriptor
reference because I must not hard code the JNDI name. Any ideas?
View the original post :
I am trying to do the same but without any success.
I want to inject the EJB 2 business interface into an EJB 3 MDB. So I write:
| @EJB(name=ejb/Esb)
| EsbAdapter adapter;
|
In the ejb-jar.xml I declare:
| message-driven
| ejb-nameOutflowMdb/ejb-name
|
|
A step further:
It seems that the ejb-ref in ejb-jar.xml is not necessary (as expected) and
this is equivalent to specifying a @EJB annotation.
Furthermore as the two EARs use separate class loaders we need this in the
jboss.xml
| ejb-ref
|
Here's an example of how to reference an EJB2.x bean from an EJB3.0 bean in two
ways. The first is using annotations for the ejb reference and the other using
the deployment descriptor.
The following is the EJB3 bean:
| @Stateless(name=Test3)
| @Remote(Test3.class)
|
Did you solve your problem?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3911352#3911352
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3911352
---
This SF.net email is