Skip Headers

Oracle® Application Server Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 2 (10.1.2)
Part No. B15505-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Enabling Clustering For EJBs

For a full description of how to set up an OC4J cluster, see the Oracle Application Server Containers for J2EE User's Guide.This section describes how to only configure for EJB state replication within the cluster.

To enable the OC4J nodes for EJB clustering, you must perform the following tasks:

  1. Configure each host in the cluster with an identical multicast address (host and port number), including a username and password.

  2. If you have stateful session beans, choose state replication type.

  3. Deploy the EJB to be clustered.

Configure the Multicast Address for EJB Clustering

Within the OC4J Instance page in the Enterprise Manager, do the following:

  1. Select the Administration page.

  2. Select Replication Properties in the Instance Properties column.

  3. Scroll down to the EJB Applications section. Figure 13-1 shows this section.

  4. Select the Replicate State checkbox.

  5. Optionally, you can provide the multicast host IP address and port number. If you do not provide the host and port for the multicast address, it defaults to host IP address 230.230.0.1 and port number 9127. The host IP address must be between 224.0.0.2 through 239.255.255.255. Do not use the same multicast address for both HTTP and EJB multicast addresses.

    You can test a network for multicast ability by pinging the following hosts:

    • To ping all multicast hosts, execute: ping 224.0.0.1.

    • To ping all multicast routers, execute: ping 224.0.0.2.

  6. Provide the username and password, which is used to authenticate itself to other hosts in the cluster over the multicast address. The username and password must be consistent in the multicast address to be in the same cluster.

    Figure 13-1 EJB State Replication Configuration

    EJB State Replication Configuration Screen
    Description of the illustration replication.gif

  7. Provide the host name where the OC4J Instance resides in the RMI Server Host field.

    Configure the type of stateful session bean replication within the orion-ejb-jar.xml file within the JAR file. See "Configure EJB Replication for Stateful Session Beans" for full details. You can configure these within the orion-ejb-jar.xml file before deployment or add this through the Enterprise Manager screens after deployment. If you add this after deployment, drill down to the JAR file from the application page.

Configure EJB Replication for Stateful Session Beans

Modify the orion-ejb-jar.xml file to add the state replication configuration for stateful session beans. Since you configure the replication type for the stateful session bean within the bean deployment descriptor, each bean can use a different type of replication.

VM Termination Replication

Set the replication attribute of the <session-deployment> tag in the orion-ejb-jar.xml file to "VMTermination". This is shown below:

<session-deployment replication="VMTermination" .../>

End of Call Replication

Set the replication attribute of the <session-deployment> tag in the orion-ejb-jar.xml file to "EndOfCall". This is shown below:

<session-deployment replication="EndOfCall" .../>