Dain Sundstrom wrote:
On May 24, 2004, at 7:53 PM, David Jencks wrote:
I suspect similar problems hold for ejbActivate, ejbPassivate, and ejbLoad.
I'm not sure what we do here. Since these call backs can happen at any time, I'm not sure what the "right" identity will be.
Simple case first: ejbActivate and ejbPassivate do not allow access to the getCallerPrincipal or isCallerInRole so I would say that in these methods the identity is at best "undefined", most likely that of the container.
I have not found anything in the spec that defines the identity that should be used in ejbLoad and ejbStore. The issue is that the invocation of these is linked to the transaction context and not the invocation, so if the identity changes during a transaction (e.g. due to run-as) then they may be invoked with different identities.
My gut feeling is that these can be invoked with whatever is the identity /at the time of invocation/ which may be the caller identity otr may be a run-as identity depending on just when the invocation occurs.
In reality, I don't think this ambiguity will cause any issue. It would only impact the case where caller identity was being used to sign onto a RM and where run-as was being used to override that - I think this is rare.
-- Jeremy
