Hi Mini
1. How can ejbActivate, ejbPassivate and ejbRemove methods in stateful Session bean, can get the transaction reference and call methods on it but cannot do CMT related transactional operation.
Note fropm the spec that all these methods are running in unspecified transaction context.
For a CMT the container starts a transaction and we don't know exactly when , but we can rely on the SessionSynchronization call backs to do things just before transaction starts etc.
For BMT you are creating the transaction and then managing transaction .
So my conclusion is as these methods are not controlled by transaction you can't set rollback or get rollback in these methods.
2. Why is ejbRemove in Stateful Session bean has different level of usage of SessionContext than Stateless Session bean. I know about the client security context, but what about transaction references and other things.
from the spec" Accessing resource manager and enterprise beans is disallowed in the session bean methods for which the Container does not have a meaningful transaction context or client security context"
3. HFE Page 236, What does this means - "The bean class is not required to (but is allowed to) implement the bean's component interface.
Implementing component interface is bypassing the container. The container or spec won't stop you from doing it. It is allowed. But it is no more
J2EE in spirit as you will be bypassing all the services the container is providing and also the body guard. It is not at all advised