Show TOC Start of Content Area

Background documentation RMI-P4 Specific InitialContext Properties  Locate the document in its SAP Library structure

When you construct the InitialContext in your remote client code, you specify the properties with which the context’s environment is initialized. In addition to the standard properties defined by the javax.naming.Context interface (for example, the INITIAL_CONTEXT_FACTORY, PROVIDER_URL, SECURITY_CREDENTIALS, and so on), you can use properties that are specific to the RMI-P4 implementation on the J2EE Engine. Those properties allow you to adapt the behavior of the RMI-P4 according to your specific application scenario.

The following table lists the properties and explains their usage:

Property

Use

Default Value

InitializeConnectionTimeout

To specify the timeout for initializing new connections. If the connection cannot be initialized for the specified period, an error message is returned to the client.

The value of the property is specified in milliseconds.

If the value is 0, then no timeout is set and the call waits until the connection is initialized.

1000

RuntimeConnectionTimeout

To specify the timeout for checking the availability (pinging) of the remote side if no traffic occurs through this connection for the specified period. If the ping is not successful, an exception is thrown and the connection is automatically closed.

The value of this property is specified in milliseconds. A value of 0 means no such timeout is set and therefore, the client never checks whether the remote side is available.

Setting a timeout period that is too short results in increased network traffic (due to frequent ping calls).

180000

TransportLayerQueue

To specify the transport protocol for the RMI-P4 messages. For example, you can use this property to specify the SSL used to transmit the messages.

The property can take values none, ssl, https, httptunneling, or SAPRouter.

For more information about using the TransportLayerQueue property to set up RMI-P4 over secure connections, see Using P4 Protocol Over a Secure Connection.

none

EnableNAT

To enable/disable support for client-server P4 connections through NAT gateways.

true

CallTimeout

To specify the timeout that the client waits for a response from the server to a call it has made.

The value is specified in milliseconds. A value of 0 means no timeout is set.

Recommendation

We recommend that you use the default value of the property. Change it only in exceptional cases when you have enough proof that your application scenario really needs such behavior.

0

sap.p4.remote_classloading

To enable/disable the use of remote classloading. By default, remote classloading is used.

Remote RMI-P4 classloading is a function that allows server-side classes that are not present in the classpath of the client that makes the remote call to be loaded. This function is available only after the client has already looked up a remote object. If you disable this function, you have to make sure that all necessary classes (not only the stub of the remote object you call, but also any other classes the remote object may have reference to) are available in the client’s classpath.

true

HTTP_Host

This property is used only in cases when you use Http Tunneling as the transport layer for RMI-P4 communication, which passes through an HTTP proxy. The property specifies the host name of the HTTP proxy.

 

HTTP_Port

This property is used only in cases when you use Http Tunneling as the transport layer for RMI-P4 communication, which passes through an HTTP proxy. The property specifies the port the HTTP proxy listens to for client connections.

 

sap.security.callback.handler

Using this property you can specify a callback handler that must be used for authentication of the remote client upon log in to the server.

Note

In addition to setting this property to the InitialContext, you have to adjust the corresponding login module stack that the Naming service uses during the authentication process. For more information, see Remote Authentication.

 

Note

You need to use any of these properties in your RMI-P4 client code only if you want to override their default values. If nothing is specified, the context’s environment is initialized with the default values of the properties.

 

 

End of Content Area