Oracle Weblogic Server (MOSC)

MOSC Banner

Is it possible to return an injected ejb as the return value of a method to the method's caller on w

edited Feb 3, 2013 4:24PM in Oracle Weblogic Server (MOSC) 3 commentsAnswered
 Hello Experts,

One of my client is using weblogic 11g (10.3.5) to deploy some EJBs(3.0), there is one EJB class like below. The class is supposed to be served as a Factory of other EJBs.

The problem they encountered is that weblogic seems doesn't allow a method to return an injected ejb, while they don't have such a problem with websphere application server.

@Stateless
public class commonFactoryBean implements CommonFactoryLocal{

     @EJB(beanName="UsefulCommonFunctionBean")
     private UsefulCommonFunctionLocal usefulCommonFunctionLocal;

     public UsefulCommonFunctionLocal getUsefulCommonFunction(){
     return this.usefulCommonFunctionLocal;
     }
}

So my basic question is : Is it possible to return an injected ejb as the return value of a method to the method's caller on weblogic server?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center