Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-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
 

Configuring JNDI Naming Service Information

The session's message transport service uses a naming service when it looks up connections to other sessions in the coordinated cache. If you choose to use a JNDI naming service, you must configure JNDI naming service information.

Table 91-8 summarizes which coordinated caches support JNDI naming service configuration.

Table 91-8 Coordinated Cache Support for JNDI Naming Service Configuration

Coordinated Cache Using TopLink Workbench
Using Java

JMS Coordinated Cache

Supported.


Supported.


RMI Coordinated Cache

Supported.


Supported.


CORBA Coordinated Cache

Supported.


Supported.


Custom Coordinated Cache

Unsupported.


Unsupported.



TopLink uses JNDI naming service information differently, depending on the type of coordinated cache.

For a JMS coordinated cache, when a particular session's coordinated cache starts up, it uses its JNDI naming service information to locate and create a connection to the JMS server. The coordinated cache is ready when all participating sessions are connected to the JMS server. At this point, sessions can start sending and receiving object change messages. You can then configure all sessions that are participating in the same coordinated cache with the same JNDI naming service information.

For an RMI or CORBA coordinated cache, when a particular session's coordinated cache starts up, the session binds its connection in JNDI, creates an announcement message (that includes its own JNDI naming service information), and broadcasts the announcement to its multicast group (see "Configuring a Multicast Group Address" and "Configuring a Multicast Port"). When a session that belongs to the same multicast group receives this announcement, it uses the JNDI naming service information in the announcement message to establish bidirectional connections with the newly announced session's coordinated cache. The coordinated cache is ready when all participating sessions are interconnected in this way, at which point, sessions can start sending and receiving object change messages. You can then configure each session with JNDI naming information that identifies the host on which the session is deployed.

Using TopLink Workbench

To specify the sessions's JNDI naming service, use this procedure:

  1. Select a session or session broker in the Navigator. Its properties appear in the Editor.

  2. Click the Cache Coordination tab. The Cache Coordination tab appears.

  3. Ensure the Enable Cache Coordination option is selected, then select the appropriate coordinated cache Type (see Table 91-8). The cache coordination options appear on the tab.

    Figure 91-5 Cache Coordination Tab, Multicast Port Field

    Description of Figure 91-5  follows
    Description of "Figure 91-5 Cache Coordination Tab, Multicast Port Field"

  4. Complete the Naming Service options.

Field Description
URL The location of the JNDI naming service.

For a JMS coordinated cache: If you are using the Oracle Containers for J2EE (OC4J) JNDI naming service and all the hosts in your coordinated cache can communicate using the OC4J proprietary RMI protocol ORMI, use a URL similar to the following:

ormi://<JMS-host-IP>:<JMS-host-port>

where JMS-host-IP is the IP address of the host on which the JMS service provider is running and JMS-host-port is the port on which the JMS service provider is listening for JMS requests.

For an RMI or CORBA coordinated cache: If you are using the OC4J JNDI naming service and all the hosts in your coordinated cache can communicate using the OC4J proprietary RMI protocol ORMI on OC4J default port 23791, use a URL similar to the following:

ormi://<session-host-IP>:23791

where session-host-IP is the IP address of the host on which this session is deployed.

Username The user name required to log in to the JNDI naming service.

The value you enter defines the Context.SECURITY_PRINCIPAL environment property.

Password The plain text (unencrypted) password required to log in to the JNDI naming service. The password appears in plain text in TopLink Workbench, but it is encrypted when written to the sessions.xml file

The value you enter defines the Context.SECURITY_CREDENTIALS environment property.

Initial Context Factory The name of the factory class, provided by your JNDI naming service provider, that implements the javax.naming.spi.InitialContextFactory interface. This factory class is used to create a javax.naming.Context instance that can access the JNDI naming service provider's context implementation.

The value you enter defines the Context.INITIAL_CONTEXT_FACTORY environment property.

Properties The JNDI context properties.

Click Properties to configure custom JNDI context properties (see "Configuring Context Properties").