I have two session beans, they are StudentFacade and SchooldtFacade both of them Stateless, Remote. What I need is call StudentFacade method from SchooldtFacade and vice-versa. Below show how I did it.
If run this application using Galssfish version V2.1 ,V3 work fine without any exception. If I run it using jboss-5.1.0.GA it gave below exception.
Thanks for reply. I'm using jboss 5.10 and netbeans 6.9.1 In here IDE can't find @IgnoreDependency , I added this also import org.jboss.annotation.IgnoreDependency; but not able to find library that contain @IgnoreDependency. please tell what is the library name should I use ?
dinesh thalis wrote: I added this also import org.jboss.annotation.IgnoreDependency;
That's not the correct one for AS5. The correct one for AS5 is mentioned in my previous reply. You can find that annotation in JBOSS_HOME/client/jboss-ejb3-ext-api.jar of AS5.
If you run into this problem when an EJB is referencing to itself (which is an specific case of circular injection),
you can workaround this using the SessionContext interface (SessionContext.getBusinessObject()):
It seems that the problem is that you are initializing customFacade before ctx is given the proper value by the EJB container (i.e. when ctx is still null).
You can try to initialize customFacade in the method's body or if you prefer you could add a method as follows:
Just remember that this solution is valid when the EJB is referencing to itself...
Hope this can solve your problem,
Manuel
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one: