Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
To use static retrieval of OC4J instances for load balancing, do the following:
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.
Configure load balancing behavior (see "Configuring Load Balancing Behavior").
For more information, see the following:
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