Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
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 |
|
|
RMI Coordinated Cache |
|
|
CORBA Coordinated Cache |
|
|
Custom Coordinated Cache |
|
|
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.
To specify the sessions's JNDI naming service, use this procedure:
Select a session or session broker in the Navigator. Its properties appear in the Editor.
Click the Cache Coordination tab. The Cache Coordination tab appears.
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
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 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 |
Username | The user name required to log in to the JNDI naming service.
The value you enter defines the |
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 |
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 |
Properties | The JNDI context properties.
Click Properties to configure custom JNDI context properties (see "Configuring Context Properties"). |