Sybase InitialContext properties

The Sybase InitialContext implementation recognizes the properties in the following table. You can create multiple contexts with different properties. For example, you might create one context for proxies that connect with plain IIOP and another for proxies that connect using SSL. When using the EAServer context factory, the com.sybase.ejb prefix is optional for context properties.

Table 3-1: Sybase EJB InitialContext Properties

Property name

Description

java.naming.factory. initial

Specifies the fully qualified Java class name of the class that returns javax.naming.InitialContext instances that interact with the naming provider. Use com.sybase.ejb.InitialContextFactory for EAServer EJB clients.

java.naming.provider. url

Specifies the URL to connect to the EAServer name server, in the format described in “Connection URL formats”.

java.naming.security. principal

Specifies the user name for the EAServer session. Required if user name/password authentication is enabled for your server.

java.naming.security. credentials

Specifies the password for the EAServer session. Required if user name/password authentication is enabled for your server.

com.sybase.ejb. socketTimeout

The timeout for the network connection, specified in seconds. The default is 600 (10 minutes). The timeout determines how long underlying network API calls to connect to and read data from the server may block before the client runtime throws an exception or fails over to another server in a cluster.

com.sybase.ejb. idleConnectionTimeout

Specifies the time, in seconds, that a connection is allowed to sit idle. When the timeout expires, the ORB closes the connection. The default is 0, which specifies that connections can never timeout. The connection timeout does not affect the life of proxy instance references; the client runtime may close and reopen connections transparently between proxy method calls. Specifying a finite timeout for your client applications can improve server performance. If many instances of the client run simultaneously, a finite client connection timeout limits the number of server connections that are devoted to idle clients. A finite timeout also allows rebalancing of server load in an application that uses a cluster of servers.

com.sybase.ejb. lookupCacheTimeout

Specifies the time, in seconds, that previously resolved names may be cached in the client runtime. The default is 600 (10 minutes). Caching can improve performance by avoiding network round trips to resolve previously resolved names.

com.sybase.ejb. dataCompression

Whether to compress data when reading and writing to the server connection. The default is false, which disables compression. When compression is enabled, EAServer compresses data using the GZIP format (provided by the Java package java.util.zip).

com.sybase.ejb. disableResolveHost

When set to true, disables resolution of host names in the naming context URL (java.naming.provider.url). The default is false. A setting of true can be useful when running the server in the same process as the client or running the server and client on the same machine using localhost as the server’s listener host name as the host name in the naming context URL. In these scenarios, host name resolution may cause network errors if the host machine lacks an active network connection.

com.sybase.ejb. automaticFailover

When running in a cluster, a value of true allows component proxies to automatically fail over to run component instances on another server regardless of whether failover is configured in the component properties. The default of false does not allow failover unless the component properties are configured to support failover.

You can configure automatic failover with the default setting by enabling failover in the properties of the components that can support it. If the component properties support failover, EAServer adds automatic failover code to the component stubs.

com.sybase.ejb. HttpTunnelling

Forces use of HTTP tunnelling. A value of true causes the client runtime to use HTTP tunnelling without trying to use plain IIOP first. The default is false. With the default setting, the proxy tries to open a connection using plain IIOP, and switches to HTTP tunnelling if the plain IIOP connection is refused. The default is appropriate when some users connect through firewalls that require tunnelling and others do not; the same application can serve both types. If you know tunnelling is required, set this property to true. This setting eliminates a slight bit of overhead that is incurred by trying plain IIOP connections before tunnelling is used.

com.sybase.ejb. HttpExtraHeader

Applicable only to Java application clients.

An optional setting to specify what extra information is appended to the header of each HTTP packet when connecting through a Web proxy. There is no need to set this property unless your HTTP proxy server has special protocol requirements. By default, the following line is appended to each packet:::

User-agent: Jaguar/major.minor 

where major and minor are the major and minor version numbers of your EAServer client software, respectively.

You can set this property to specify text to be included at the end of each HTTP header. If multiple lines are included in the setting, they must be separated by carriage return and line feed characters. If the setting does not include a User-agent: line, then the default setting above is included in the HTTP header.

See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. HttpTunnellingSecure

If set to true when using a a reverse proxy server, forces use of SSL for the connection to the reverse proxy. Set this property to true if the connection to the reverse proxy must use SSL (HTTPS) tunnelling, but the connection from the proxy to the server does not use SSL tunnelling. For more information, see Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide.

com.sybase.ejb. UseJavaURLConnection

When using HTTP tunnelling, a setting of true causes the client runtime to use java.net.URLConnection rather than java.net.HTTPConnection to connect to the server. The default of false causes the client to connect using java.net.HTTPConnection.

com.sybase.ejb. ReverseProxyHost

Specifies the machine name or the IP address of a reverse proxy server. See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. ReverseProxyPort

Specifies the port number of a reverse proxy server. See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. WebProxyHost

Applicable only to Java application clients.

Specifies the host name or IP address of a Web proxy server. Applies to Java applications only. Java applets running in a Web browser will use the proxy address specified by the browser’s proxy configuration. In Java applications, there is no default for this property, and you must specify both the host name and port number properties. See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. WebProxyPort

Applicable only to Java application clients.

Specifies the port number at which the Web proxy server accepts connections. Applies to Java applications only. Java applets running in a Web browser will use the proxy address specified by the browser’s proxy configuration. In Java applications, there is no default for this property, and you must specify both the host name and port properties. See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. HttpExtraHeader

Applicable only to Java application clients.

An optional setting to specify what extra information is appended to the header of each HTTP packet when connecting through a Web proxy. See Chapter 9, “Deploying Applications Around Proxies and Firewalls,” in the EAServer Security Administration and Programming Guide for more information.

com.sybase.ejb. SSLCallback

Applicable only to Java application clients.

Required if you are using SSL and you wish to provide a callback class to set required SSL settings on an as-needed basis. Specify the name of a Java class that implements the CtsSecurity.SSLCallbackIntf interface. For example:

com.acme.AcmeSSLCallback

Chapter 4, “Using SSL in Java Clients,” in the EAServer Security Administration and Programming Guide describes how to code a callback class.

com.sybase.ejb. userData

Applicable only to Java application clients.

Specifies user data (String datatype). This is an optional property. Client code can set user data during NamingContext initialization and access it using SSLSessionInfo::getProperty method in the SSL callback implementation. This may be useful as a mechanism to store context information that is otherwise not available through the SSLSessionInfo interface.

com.sybase.ejb. useJSSE

Use the Java Secure Sockets Extension (JSSE) classes for secure HTTP tunnelled (HTTPS protocol) connections. JSSE provides an alternative to the built-in SSL implementations when secure connections are needed from an applet running in a Web browser. Additional configuration may be required to use this option. See Chapter 4, “Using SSL in Java Clients,” in the EAServer Security Administration and Programming Guide for more information.