-
1. Re: Remote EJB under Weblogic
garcimouche Dec 11, 2009 3:39 AM (in response to nicokiki)You did not mention it but did your SLSB is also a SEAM component (having @Name annotation)?
-
2. Re: Remote EJB under Weblogic
nicokiki Dec 11, 2009 9:34 AM (in response to nicokiki)Hi Frank,
As you said my EJB is annotated with @Name.Regards,
Nico
-
3. Re: Remote EJB under Weblogic
niskrivits Mar 17, 2010 8:35 PM (in response to nicokiki)Hi, Nico.
It seems that the seam context are not initialized...
I faced almost the same issue, when trying invoke a remote EJB from a separated war file (outside of ear). I tried some alternatives, but I am still having problems in my application. Anyway, I'll tell you what I've done, because it could be useful for someone...
My EJB application was deployed in a ear, and nothing was calling the seam init process. What I've done was to create an empty war file inside the ear, and setting the SeamListener class. This made the seam context (that uses a ServletContext by default to place their scopes maps) begin to initialize, but I still had the same exception you had.
After a little research in documentation, I developed an interceptor for the EJBs facades, that invokes the Lifecycle.beginCall(), proceed, and the LifeCicle.endCall(). Then, the
No application context active
appeared to end, but the Seam annotations (@In, @Out) caused no efects, ie, simply the seam didn't inject the components... In JBoss and Glassfish, it works, but in weblogic don't.Debugging my application I've seen that the weblogic makes a
wrapper
for EJB classes, and when the Interceptor runs, the InvocationContext.getTarget() returns an object of weblogicwrapper
class type, instead of EJB class type itself. It doesn't occurs on Glassfish and JBoss, where InvocationContext.getTarget() returns an object of EJB class itself. So, the class that is intercepted is not a seam annoted class, and the annotations doesn't work. (It can carry the annotations in its superclass, but it is not mapped by the seam, that do not recognizes the weblogic generated classes)Then, I left it, (i have my deadline) and started to use seam only in web application. In my Ejb app I am using the default container dependency injection.
Another thing that made me crazy was the fact that weblogic 10.3 DO NOT register in JNDI Locals EJBs (because of performance!!!!!). As seam uses internaly Context.lookup to create the EJB components, whit the @jndiPattern@, the only way was to declare ALL my EJBs remote...
Well, these are my problems and I am waiting for a way to learn and fix it. Meanwhile, I am using seam only in my web module...
Regards,
Jorge