[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-385) javax.ejb.EJBContext.lookup() should look relative to the bean's ENC. Currently it is a global JNDI lookup
Haohua xie (JIRA)
jira-events at jboss.com
Mon Oct 9 23:43:41 EDT 2006
[ http://jira.jboss.com/jira/browse/EJBTHREE-385?page=comments#action_12344948 ]
Haohua xie commented on EJBTHREE-385:
-------------------------------------
i think the problem is still open, does'nt it?
here is my my code:
i have a session bean ManagerSessionBean with remote interface
i want to use a factorybean to create this ManagerSessionBean ;
so i can't use @EJB to inject the ManagerSessionBean .
the factorybean and the ManagerSessionBean are in the same package.
in factorybean, i inject SessionContext and define the jndiname of the bean
@Resource
protected SessionContext sessionContext;
protected String sessionUrl = "ManagerSessionBean/remote";
to create the ManagerSessionBean in factory method :
ManagerSessionSPI sessionSPI = (ManagerSessionSPI) ctx.lookup(sessionUrl);
the sessionSPI can't be created if the ejb-jar is deployed in am ear.
and i find that if the global jndi name of ManagerSessionBean is used in EJBContext.lookup(), the codes run well.
> javax.ejb.EJBContext.lookup() should look relative to the bean's ENC. Currently it is a global JNDI lookup
> -----------------------------------------------------------------------------------------------------------
>
> Key: EJBTHREE-385
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-385
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: EJB 3.0 RC3
> Reporter: Bill Burke
> Assigned To: Bill Burke
> Fix For: EJB 3.0 RC4 - PFD
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list