[EJB 3.0] - Cross-referencing EJBs doesn't work
by linoux
Hello !
It seems that cross referencing 2 sessions does not work in JBoss... Although I found no restricutions about cross-referencing stateless session beans in EJB specs....
I'm using JBoss-4.0.5.GA.
Here is my sessions definitions :
| @Local
| public interface ALocal {
|
| }
|
| @Stateless
| public class A implements ALocal {
| @EJB BLocal b;
| }
|
| @Local
| public interface BLocal {
|
| }
|
| @Stateless
| public class B implements BLocal{
| @EJB ALocal a;
| }
And here the deployment logs (everything before this seems OK) :
| ObjectName: jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=A,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=B,service=EJB3
| Depends On Me:
| jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=B,service=EJB3
|
| ObjectName: jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=B,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=A,service=EJB3
| Depends On Me:
| jboss.j2ee:ear=ogp-app.ear,jar=ogp-ejb.jar,name=A,service=EJB3
|
It seams that the two EJB are waiting for each other...
Does anyone know how to make this work ?
Thanks for your help !
--
Celine
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129633#4129633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129633
18 years, 2 months
[JNDI/Naming/Network] - Re: EJB3: @Resource name only EJBContext, not in InitialCont
by wingtung.leung
"jaikiran" wrote : Which version of JBoss do you use? I tested this on my local JBoss-4.2.2 setup with an sample application:
|
JBoss-4.0.5 with extra EJB3 support.
I have tested it on JBoss-4.2.2, and it works fine there. So we will need to update our EJB3 component, or upgrade JBoss completely.
The original exception:
| Exception in thread "Main Thread" javax.naming.NameNotFoundException: env not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
|
Thanks for the solution!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129627#4129627
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129627
18 years, 2 months