Show TOC

Background documentationRMI-P4 Specific InitialContext Properties Locate this document in the navigation structure

 

When you construct the InitialContext in your remote client code, you specify the properties with which the context 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 AS Java. These 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,, or SAPRouter.

More information about using the TransportLayerQueue property to set up RMI-P4 over secure connections: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 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.

End of the recommendation.

0

sap.p4.remote_classloading

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

Remote RMI-P4 class loading is a function that allows server-side classes that are not present in the class path 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 class path.

true

HTTP_Host

This property is used only in cases when you use P4 over SSL 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 P4 over SSL 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.

SAPRouter

This property specifies that SAP Router is used for the service connection. The host and port obtained from the message server are appended at the end of the string, so the routers must be configured to allow connections to every access point that is published in the message server.

SAPRouterPassword

Password required to access the service if the router requires one.

Note 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 environment is initialized with the default values of the properties.

End of the note.