This subsection describes the notes on performing a round-robin search.
- The context acquired for a round-robin search only supports the lookup method. You cannot use the other APIs defined in javax.naming.Context.
- If you execute a round-robin search using an optional name, the Enterprise Beans are searched in the following order:
- An Enterprise Bean with a local interface is searched from the name space of the J2EE server executing the search.
- If the Enterprise Bean is not found in 1, an Enterprise Bean with a remote interface is searched by the round-robin search.
The following table describes whether the Enterprise Beans can be searched for each class to which the processing of InitialContextFactory is delegated.
Table 2-33 Searchability of the Enterprise Beans for each class to which the processing of InitialContextFactory is delegated
Search target | GroupContextFactory | InsContextFactory |
---|
Enterprise Bean with a remote interface | Y# | Y |
Enterprise Bean with a remote interface (search by optional name) | Y | Y |
Enterprise Bean with a local interface | Y# | Y |
Enterprise Bean with a local interface (search by optional name) | Y | Y |
J2EE resource | Y# | Y |
J2EE resource (search by optional name) | N | Y |
- Legend:
- Y: Can be searched
- N: Cannot be searched
# When you perform a lookup in java:comp/env, the round-robin search is not executed. java:comp/env is searched only from the J2EE server executing the lookup.
You use the following methods to specify the class to which the implementation of InitialContextFactory will be delegated. If both the methods are specified, the method specified in the argument is enabled.
- Specify the class in the java.naming.factory.initial key of usrconf.properties.
- Specify the class in the java.naming.factory.initial key with the argument (Hashtable) used when InitialContext is generated.