Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
You can specify an EJB 3.0 session bean class method as a callback interceptor method for any of the following life cycle events (see "Using Annotations"):
Post-construct
Pre-destroy
Pre-passivate (stateful session beans only)
Post-activate (stateful session beans only)
Note:
Do not specify pre-passivate or post-activate life cycle callback methods on a stateless session bean.The session bean class life cycle callback method must have the following signature:
void <METHOD>()
You can also specify one or more life cycle callback methods on an interceptor class that you associate with an EJB 3.0 session bean (see "Configuring a Life Cycle Callback Interceptor Method on an Interceptor Class of an EJB 3.0 Session Bean").
For more information, see the following:
You can specify an EJB 3.0 session bean class method as a life cycle callback method using any of the following annotations:
Example 5-3 shows how to use the @PostConstruct
annotation to specify EJB 3.0 stateful session bean class method initialize
as a life cycle callback method.