Is it possible to return an injected ejb as the return value of a method to the method's caller on w
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?