Hi there,
One of the reasons we can�t access client info from the SessionContext object in an ejbRemove for an stateless session bean is that this callback is not triggered by means of the client, and so it does not make sense, since there is no client involved.
But for stateful session beans there is a circumstance under which the ejbRemove is triggered without the client calling remove explicitly, and it is when the bean times-out in the active state.
In this situation, how is the container supposed to provide the client info? Should it keep this info from the last business method call made by the client?
According to the specs (7.6.1), the methods getCallerPrincipal and isCallerInRole are callable from ejbRemove.
These questions also apply to the ejbPassivate method, that is also triggered by a timeout, and not directly by the client.
Constantino
[ March 03, 2004: Message edited by: Constantino Cronemberger ]