Interoperable naming URLs for EJB clients

To use RMI/IIOP as the network protocol, an EJB client must specify a corbaname interoperable naming URL as the value of the JNDI context’s PROVIDER_URL property. When using corbaname URLs, you must specify the user name and password using the JAAS API, as described in “JAAS on the client” in Chapter 11, “Using the JAAS API,” in the EAServer Security Administration and Programming Guide.

When using the EAServer EJB client runtime, the URL syntax is:

corbaname:iiop:ver@host:port/NameService[rmi]

Or to use the default IIOP version number:

corbaname:iiop:host:port/NameService[rmi]

Where:

ver

Is an optional version number. Supported versions are 1.1 and 1.2. The default version is 1.1, unless you append the #rmi:/ suffix, which forces the IIOP version to 1.2.

host

Is the server host name.

port

Is the server’s IIOP port number.

[rmi]

Is the optional naming prefix #rmi:/, which specifies RMI Valuetype semantics. Valuetype semantics are required to propagate null parameter values in method calls.

Using this option forces the IIOP version to 1.2.

For example, this URL specifies a connection to the host moxy at port 9000, using IIOP 1.2 with Valuetype semantics:

corbaname:iiop:1.2@moxy:9000/NameService#rmi:/

As another example, this URL specifies a connection to the host moxy at port 9000, using IIOP 1.2 without Valuetype semantics:

corbaname:iiop:1.2@moxy:9000/NameService

This URL identifies a connection to the host moxy at port 9000, using IIOP 1.1:

corbaname:iiop:moxy:9000/NameService

The string /NameService is optional in all corbaname URLs. For example:

corbaname:iiop:1.2@moxy:9000#rmi:/

Or:

corbaname:iiop:1.2@moxy:9000