Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (

Part Number E13981-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

Configuring Passivation Location

You can specify the directory and file name to which OC4J serializes an EJB 3.0 stateful session bean when passivated using OC4J-proprietary annotations (see "Using Annotations") or using the orion-ejb-jar.xml file (see "Using Deployment XML").

For more information, see the following:

Using Annotations

You can specify OC4J-proprietary deployment options for an EJB 3.0 stateful session bean using the @StatefulDeployment OC4J-proprietary annotation. Example 5-1 shows how to configure the passivation location for an EJB 3.0 stateless session bean using the @StatefulDeployment annotation persistenceFileName attribute.

For more information on this @StatefulDeployment attribute, see Table A-1. For more information on the @StatefulDeployment annotation, see "Configuring OC4J-Proprietary Deployment Options on an EJB 3.0 Session Bean".

Example 5-2 Configuring Passivation Location Using @StatefulDeployment

import javax.ejb.Stateless;
import oracle.j2ee.ejb.StatelessDeployment;

public class HelloWorldBean implements HelloWorld {
    public void sayHello(String name) {
        System.out.println("Hello "+name +" from first EJB3.0");

Using Deployment XML

For an EJB 3.0 stateful session bean, you configure passivation location in the orion-ejb-jar.xml file as you would for an EJB 2.1 stateful session bean (see "Using Deployment XML").