The afterBegin method notifies a session Bean instance that a new transaction has started, and that
the subsequent business methods on the instance will be invoked in the context of the transaction.
The afterCompletion method notifies a session Bean instance that a transaction commit protocol has
completed, and tells the instance whether the transaction has been committed or rolled back.
The Bean Provider is responsible for using the RolesReferenced metadata
annotation or the security-role-ref elements of the deployment descriptor to
declare all the security role names used in the enterprise bean code.
The EJBException exception is thrown by an enterprise Bean instance to its
container to report that the invoked business method or callback method
could not be completed because of an unexpected error (e.g.
The MessageDrivenContext interface provides an instance with access
to the container-provided runtime context of a message-driven enterprise
bean instance.
The NoSuchEntityException exception is thrown by an Entity Bean
instance to its container to report that the invoked business method
or callback method could not be completed because of the underlying
entity was removed from the database.
The PostConstruct method is invoked on the newly constructed instance, after
any dependency injection has been performed by the container and before the
first business method is invoked on the bean.
The RemoveException exception is thrown at an attempt to remove an EJB
object when the enterprise Bean or the container does not allow the EJB
object to be removed.
The value of the RolesAllowed annotation is a list of security role names to
be mapped to the security roles that are permitted to execute the specified
method(s).
The Bean Provider can use the RunAs metadata annotation or the Bean Provider
or Application Assembler can use the run-as deployment descriptor element to
define a run-as identity for an enterprise bean in the deployment descriptor.
Specifies the amount of time a stateful session bean can be idle
( not receive any client invocations ) before it is eligible
for removal by the container.