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

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

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring Static Retrieval Load Balancing

To use static retrieval of OC4J instances for load balancing, do the following:

  1. Within each client, configure JNDI properties as follows (see "Using JNDI Properties":

    • For java.naming.factory.initial, use any initial context factory.

    • For the java.naming.provider.url, provide a comma-delimited list of OC4J nodes in the form <prefix>://<hostname>:<port>/<application-name> where <prefix> is opmn:ormi for OC4J in Oracle Application Server, or ormi for OC4J standalone.

  2. Configure load balancing behavior (see "Configuring Load Balancing Behavior").

For more information, see the following:

Using JNDI Properties

Example 24-2 shows a URL definition that provides the client container with three OC4J nodes (with hostnames s1, s2, and s3 and ports 23791, 23792, and 23793, respectively) to use for load balancing.

Example 24-2 JNDI Properties for Static Retrieval Load Balancing

java.naming.factory.initial= oracle.j2ee.rmi.RMIInitialContextFactory
java.naming.provider.url=ormi://s1:23791/ejbs, ormi://s2:23792/ejbs, ormi://s3:23793/ejbs; 
java.naming.security.principal=admin
java.naming.security.credentials=welcome