9.2.5 Reference resolver and lookup name specification
This section describes the reference resolver and lookup name specification.
- Organization of this subsection
(1) Reference resolver for the client to invoke an EJB application
The following table shows the reference resolvers that can be used to invoke an EJB application for each client type.
Client |
Reference resolver |
|||
---|---|---|---|---|
CORBA Naming Service (INS) |
OSAgent |
IOR string |
||
EJB |
Y |
N |
N |
|
OTM |
N |
Y |
N |
|
ORB |
TPBroker |
N |
Y |
Y |
Other than TPBroker |
N |
N |
Y |
(2) Specifying the lookup name
- For OTM Client
-
For an OTM client, specify the TSC acceptor name as the argument for the constructor that generates a TSC user proxy. For the TSC acceptor name, specify the lookup (registration) name of the EJB application. The TSC acceptor name cannot be omitted. For the connection mode, select a connection via a TSC regulator.
Specification examples where the lookup name of the EJB application is AAA/a1:
-
C++
Converter_TSCprxy(TSCClient_ptr _tsc_client, "AAA/a1");
-
Java
Converter_TSCprxy(TSCClient _tsc_client, new String("AAA/a1"));
For details about the procedure for creating an application, see 9.3.1 Procedure for creating an OTM application.
-
- For TPBroker Client
-
If you specify the -CTMAgent 1 option in the ctmstartgw or ctmregltd command, the command registers a CORBA reference in OSAgent by using the lookup name of the EJB application as an object name.
Therefore, on the TPBroker client, resolve the reference by specifying the lookup name of the EJB application as the argument for the _bind() method.
Specification examples for specifying the default lookup name of the converter sample program:
-
C++
Converter::_bind("HITACHI_EJB/SERVERS/MyServer/EJB/converter/MyConverter");
-
Java
ConverterHelper::_bind(org.omg.CORBA.ORB orb, new String("HITACHI_EJB/SERVERS/MyServer/EJB/converter/MyConverter"));
For details about the procedure for creating an application, see 9.4 Implementation procedures for EJB invocation from ORB clients.
-