uCosminexus Application Server, Common Container Functionality Guide
This subsection describes the settings required for performing a round-robin search and the naming rules of the group names.
The following settings are required when performing a round-robin search:
To use the round-robin search functionality, you specify the settings in the system properties. Note that in addition to the system property settings, you can also specify the classes to which the implementation of InitialContextFactory is delegated, as arguments when generating InitialContext of each application. In the arguments used for generating InitialContext, you can select and specify a specific naming service from the group of logical naming services specified in the system properties.
Note that when the settings are only specified in the system properties, you cannot perform a round-robin search specifying a specific group. The naming services of all the groups existing on the logical naming service are included in the scope of search.
The following is an overview of each setting method:
When executing the round-robin search, you specify the group of logical naming services to be searched by a round-robin search and the root position of the naming services belonging to the group, in the system properties. Also, you must specify java.naming.factory.initial=com.hitachi.software.ejb.jndi.GroupContextFactory as the class to which the implementation of InitialContextFactory is delegated.
The method of setting up the system properties differs at the following locations for the various types of applications that use the round-robin search functionality.
You customize and set up the J2EE server properties. Specify the settings in the user properties for J2EE servers in the Easy Setup definition file.
You specify the definition for the round-robin search in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. The following table describes the definitions for performing a round-robin search in the Easy Setup definition file.
Table 2-31 Definition for performing a round-robin search in the Easy Setup definition file
| Specified parameters | Settings |
|---|---|
| ejbserver.jndi.namingservice.group.list | Specify the CORBA Naming Service group. |
| ejbserver.jndi.namingservice.group.Specify-group-name.providerurls | Specify the root position of the CORBA Naming Services belonging to each group. |
| java.naming.factory.initial | Specify the class to which the implementation of InitialContextFactory is delegated. |
Note that the round-robin search presumes the use of the user-specified name space functionality. When you use the user-specified name space functionality, you need to customize the settings for operating the server management commands and define the J2EE application properties. For details on the settings, see 2.6.7 Execution environment settings and 2.6.5 Setting the optional names for the Enterprise Beans.
You use one of the following methods to specify the settings:
Note that the method of setting the EJB client application properties differs depending on the commands used for starting the EJB client application. This subsection describes how to set the EJB client application properties and the examples of specification.
The method of setting the properties differs when the cjclstartap command is used and when the vbj command is used.
An example of specification is as follows. This is an example of specifying the properties in usrconf.properties. For details on each key, see 14.3 usrconf.properties (User property file for Java applications) in the uCosminexus Application Server Definition Reference Guide.
# Define the logical naming service configuration ejbserver.jndi.namingservice.group.list=g1;g2;g3 ejbserver.jndi.namingservice.group.g1.providerurls=corbaname::hostA:900;corbaname::hostB:900 ejbserver.jndi.namingservice.group.g2.providerurls=corbaname::hostD:700;corbaname::hostE:700 ejbserver.jndi.namingservice.group.g3.providerurls=corbaname::hostF:800;corbaname::hostG:800 # Specify the class to which the implementation of InitialContextFactory is delegated java.naming.factory.initial=com.hitachi.software.ejb.jndi.GroupContextFactory : |
The following contents are specified in the ejbserver.jndi.namingservice.group.list key, ejbserver.jndi.namingservice.group.Specify-group-name.providerurls key, and java.naming.factory.initial key respectively in the example of specification:
When settings are specified for executing a round-robin search, you can select a specific group to be looked up in the round-robin search targets by specifying the group as an argument for generating InitialContext in the client application. Note that the specification of an argument for generating InitialContext is optional.
An example of specification is as follows:
:
Hashtable env = new Hashtable();
env.put("ejbserver.jndi.namingservice.groupname", "g1");
env.put("java.naming.factory.initial",
"com.hitachi.software.ejb.jndi.GroupContextFactory");
InitialContext ic = new InitialContext(env);
:
|
The following contents are specified in the ejbserver.jndi.namingservice.groupname key and the java.naming.factory.initial key respectively in the example of specification:
You can use the following characters in a group name:
Make sure to specify a group name that is unique in the logical naming service.
The EJB client application properties are used when the Enterprise Beans are invoked from the Java application. Set the required properties according to the contents of the J2EE application. For details on the properties that can be set, see the uCosminexus Application Server Definition Reference Guide.
This subsection describes the properties with different specification requirements depending on the EJB client application commands (vbj command). The following table lists the property keys with different specification requirements depending on the EJB client application commands.
Table 2-32 Property keys with different specification requirements depending on the EJB client application commands
| Property keys | Type | Commands | |
|---|---|---|---|
| cjclstartap | vbj | ||
| org.omg.CORBA.ORBClass | Fixed | N | N |
| org.omg.CORBA.ORBSingletonClass | Fixed | N | N |
| javax.rmi.CORBA.UtilClass | Fixed | N | Y |
| javax.rmi.CORBA.StubClass | Fixed | N | N |
| javax.rmi.CORBA.PortableRemoteObjectClass | Fixed | N | Y |
| java.endorsed.dirs | Variable | N | N |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.