Interoperable naming URLs for EJB references

Servlets, JSPs, application clients, and EJB 2.0 components can use EJB references to alias names used to resolve EJB home interfaces in the implementation code. To use RMI/IIOP for invocations of the called component, you must specify a corbaname URL in the Link Value setting for the EJB reference.

To specify a name server address and IIOP version number, use a URL of the form:

corbaname:iiop:ver@host:port/NameService#[rmi]comp-name

To specify a name server address and use the default IIOP version of 1.1:

corbaname:iiop:host:port/NameService#comp-name

To specify a component that is installed in the same server or cluster:

corbaname:rir:/NameService#[rmi]comp-name

Where:

ver

Is an optional version number. The default version is 1.1. Supported versions are 1.1 and 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. This option requires IIOP 1.2.

When connecting to another vendor’s name service, the service may require a different naming prefix to specify RMI Valuetype semantics.

comp-name

Is the name with which the component is bound to the name service. For EAServer components, this is the value of the com.sybase.jaguar.component.bind.naming property, which defaults to package-name/component-name if not set.

For example, this URL references a component named Finance/Accounting, using the local name service and IIOP 1.2 with Valuetype semantics:

corbaname:rir:/NameService#rmi:/Finance/Accounting

This URL references the same component name, running on moxy at port 9000, using IIOP 1.2 and RMI Valuetype semantics:

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

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

corbaname:rir:#rmi:/Finance/Accounting