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.
An exception annotated with this annotation will be an application exception and then thrown to the user.
And by default, no rollback is done before throwing the exception.
The method flagged with this annotation will be used as the business interceptor's method.
Signature is : Object <METHODgt;(InvocationContext) throws Exception
The CreateException exception must be included in the throws clauses of all
create methods defined in an enterprise Bean's home interface.
This exception is used as a standard application-level exception to report a
failure to create an EJB object.
The FinderException exception must be included in the throws clause of every
findMETHOD(...) method of an entity Bean's home interface.
The exception is used as a standard application-level exception to report a
failure to find the requested EJB object(s).
The MessageDrivenContext interface provides access to the runtime
message-driven context that the container provides for 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.
This exception may be thrown by the bean class methods that implement the
business methods defined in the bean's component interface; and by the
ejbLoad and ejbStore methods.
The ObjectNotFoundException exception is thrown by a finder method to
indicate that the specified EJB object does not exist.
Only the finder methods that are declared to return a single EJB object use
this exception.
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.