I am trying to port my application from Orion 1.5.3 to Orion 2.0.2.

In all of my beans I lookup a home by accessing new
InitialContext().lookup() API from the setEntityContext API on my CMP.
After converting to Orion 2.0.2 I now get  IllegalStateException. This
worked in Orion 1.5.3. Looking at the ejb 2.0 spec section 10.5.5 table
4, java:comp/env access should be allowed. I should be able to lookup a
home for another bean in setEntityContext.

Section 12.1.4.1 also states that "The instance can take advantage of
the setEntityContext() method to allocate any resources that are to be
held by the instance for its lifetime."

Here is the exception I get:

java.lang.IllegalStateException: Can not access other EJBs from within
setEntityContext(...)
at com.evermind._cob.lookup(.:22)
at com.evermind._au._rt(.:129)
at com.evermind._au.lookup(.:62)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at
com.standardset.ejb.common.util.LocalHomeFinder.getHome(LocalHomeFinder.java:33)

at
com.standardset.ejb.common.util.LocalHomeFinder.getHome(LocalHomeFinder.java:20)

at
com.myprofiles.model.profile.ProfileEntityHomeFinder.getHome(ProfileEntityHomeFinder.java:15)

at
com.myprofiles.model.member.MemberEntityBean.setEntityContext(MemberEntityBean.java:249)

at
MemberEntityBean_PersistenceManager20.setEntityContext(MemberEntityBean_PersistenceManager20.java:290)

at com.evermind.server.ejb.EntityEJBHome.getContextInstance(.:266)
at com.evermind.server.ejb.EntityEJBHome.getLocalContextInstance(.:219)
at
MemberEntityHome_EntityHomeWrapper107.findByLogon(MemberEntityHome_EntityHomeWrapper107.java:759)

The SPEC is quite vague about this point.  They mention that one can
access java:comp/env, but does not say anything about EJB Access.  Does
anyone have a more definitive answer?  Can I lookup a Home interface
inside setEntityContext/setSessionContext?

I tried to open a bug to Orion, but they closed it stating that their
implementation is to the spec.

Thanks.

--
-AP_
http://www.myprofiles.com/member/profile/apara_personal
http://www.myprofiles.com/member/profile/apara_business

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to