Package jakarta.ejb
Annotation Type AfterBegin
- 
@Target(METHOD) @Retention(RUNTIME) public @interface AfterBegin
Designate a stateful session bean method to receive the after begin session synchronization callback.The after begin callback notifies a stateful 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.
This method executes in the proper transaction context. A bean must have at most one
AfterBeginmethod. The signature of this method must observe the following rules:- The method must not be declared as 
finalorstatic. - The method may have any access type.
 - The return type must be 
void. - The method must take no arguments.
 
A stateful session bean class may use either the
SessionSynchronizationinterface or the session synchronization annotations, but not both.- Since:
 - EJB 3.1
 - See Also:
 SessionSynchronization,BeforeCompletion,AfterCompletion
 - The method must not be declared as