Juan,
I don't think that is quite right. If access to the bean's environment is
allowed, surely you should be able to access EJB References (or EJB Local
References) defined therein.
The spec says that access to the bean's environment is allowed, and does
state that nothing specific to that EJB's object identity can be done. This
is reasonable given that you do not know that instance's identity at that
point in time. It also states that you cannot access CMR fields from the
setEntityContext. But EJB Home (or Local Home) references registered in
the ENC definitely do not fall under this category.
I think this would be a bug in Orion . . . and would be very curious if
another [certified] AppServer exhibited the same behavior. In fact, if you
take a look at some of the Sun tutorials and articles, you'd notice that
many one-off initializations are done within the set{Session|Entity}Context
method.
-krish
At 03:05 PM 9/3/2003 +0100, Juan Pablo Lorandi wrote:
>I've seen some of the code I have running on Orion 2.0.2 and while I can
>initialize the InitialContext in that method, I'm not looking up beans
>there. I have a separate method which loads/discards home references and
>attempts to cache them as well.
>
>Reviewing the spec, java:comp/env access IS allowed, but Enterprise
>Beans access isn't allowed (except for the bean's own Home interfaces).
>Thus, they comply to the spec, and "fixing" this for you would mean to
>break the spec, IMHO.
>
>Can't you just refactor the code?
>
>My 2c,
>JP
>
>===========================================================================
>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".
===========================================================================
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".