Editing Java Settings

This section describes the procedures involved in editing Java related settings for a selected configuration. See the following links:

Editing General Settings

This section lets you enable Java and set Java Home variable for the selected configuration.

ProcedureEditing General Java Settings

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configuration tab to get the list of available configurations.

  2. Click Java > General tab.

Parameters for General Java Settings

The following table describes the parameters available while configuring the general Java settings.

Table 23 Field Description > General Java Settings

Field

Description

Enable Java

Turn on/off Java support for the configuration. Enabling Java lets the server spawn necessary JVMs.

Java Home

Location of the Java SE. Specify the absolute path or path relative to the server's config directory. The directory must be owned by the account the server runs as.

Sticky Attach

Whether the server attaches each HTTP request processing thread to the JVM only once (Otherwise the server attaches/detaches the HTTP request processing thread on each request).

Editing Path Settings

This section lets you add JVM class path for the selected configuration.

ProcedureEditing Path Settings

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configuration tab to get the list of available configurations.

  2. Click Java > General tab. Go to Path Settings section.

Parameters for Path Settings

The following table describes the parameters available while modifying the configuration's JVM path settings.

Table 24 Field Description > Path Settings

Field

Description

Ignore Environment Class Path

Enabled by default.

Class Path Prefix

Prefix for the system class path. You should only prefix the system class path if you wish to override system classes, such as the XML parser classes. Use this attribute with caution.

Server Class Path

Class path containing server classes. Read-Only field.

Class Path Suffix

Suffix for the system class path.

Native Library Path Prefix

Prefix for the operating system native library path.

Bytecode Preprocessor Class

Specify the bytecode preprocessor class.

A typical way to perform runtime class instrumentation is through the preprocessing mechanism, whereby profiling and monitoring tools use a class preprocessor to insert instrumentation code at the required places in the Java classes just before they are loaded by the JVM. Toward that end, the class preprocessor works in conjunction with the class loader.

Editing JVM Settings

To set JVM command-line options in the Administration interface, perform the following tasks:

ProcedureEditing JVM Settings

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configuration tab to get a list.

  2. Click Java > JVM Settings tab.

Editing JVM Options

You can add/delete command line JVM options by specifying the values here. Click Add JVM Option button to add a JVM option.

Some examples for JVM options are:-Djava.security.auth.login.config=login.conf, -Djava.util.logging.manager=com.iplanet.ias.server.logging.ServerLogManager and -Xms128m -Xmx256m

Adding JVM Profilers

JVM Profiler helps you diagnose and resolve performance problems, memory leaks, multi-threading problems and system resource usage problems in your Java applications to ensure the highest level of stability and scalability for your applications.

You can use a profiler to perform remote profiling on the Sun Java System Web Server to discover bottlenecks in server-side performance.

ProcedureAdding a New JVM Profiler

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list of available configuration.

  2. Click Java > JVM Settings tab.

  3. Click New button under Profilers section.

  4. Provide values for the following parameters:

Debug Java Settings

The JVM can be started in debug mode and can be attached with a JPDA (Java Platform Debugger Architecture) debugger. When you enable debugging, you enable both local and remote debugging.

Sun Java System Web Server's debugging is based on the JPDA software. To enable debugging, perform the following tasks.

ProcedureEnable JVM Debugging

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list of available configuration.

  2. Click Java > JVM Settings tab.

  3. Select Enable Debug checkbox under Debug Java Settings.

  4. Provide JVM options as necessary by clicking the New button.

    The default JPDA options are as follows:

    -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7.0896

    If you substitute suspend=y, the JVM starts in suspended mode and stays suspended until a debugger attaches to it. This is helpful if you want to start debugging as soon as the JVM starts. To specify the port to use when attaching the JVM to a debugger, specify address=port_number. Check out the JPDA documentation for a list of debugging options.

Editing Resources Settings

This page lets you configure and manage JDBC, Mail, JNDI and other Java based resources.

Web applications may access a wide variety of resources such as resource managers, data sources (for example SQL datasources), mail sessions, and URL connection factories. The J2EE platform exposes such resources to the applications via Java Naming and Directory Interface (JNDI) service.

Sun Java System Web Server allows you to create and manage the following JavaEE resources:

JDBC Resources

A JDBC Datasource is a Java EE resource that you can create and manage using Sun Java System Web Server.

The JDBC API is the API for connectivity with relational database systems. The JDBC API has two parts:

A JDBC Datasource object is an implementation of a data source in the Java programming language. In basic terms, a data source is a facility for storing data. It can be as sophisticated as a complex database for a large corporation or as simple as a file with rows and columns. A JDBC datasource is a Java EE resource that can be created and managed via Sun Java System Web Server.

The JDBC API provides a set of classes for Java with a standard SQL database access interface to ensure uniform access to a wide range of relational databases.

Using JDBC, SQL statements can be sent to virtually any database management system (DBMS). It is used as an interface for both relational and object DBMSs.

Common JDBC Drivers

The following table provides a list of common JDBC drivers and their properties that needs to be configured while adding a new JDBC resource. See Adding a JDBC Resource.


Note - The following list is only a subset of all supported JDBC Drivers.


Table 25 List of common and supported JDBC drivers

Driver

Class Name

Properties

Oracle driver

oracle.jdbc.pool.OracleDataSource

  • url

  • user

  • password

SJS JDBC driver for Oracle

com.sun.sql.jdbcx.oracle.OracleDataSource

  • serverName

  • portNumber

  • user

  • password

  • SID

DB2 IBM driver

com.ibm.db2.jdbc.DB2DataSource

  • serverName

  • databaseName

  • portNumber

  • user

  • password

  • driverType

SJS JDBC driver for DB2

com.sun.sql.jdbcx.db2.DB2DataSource

  • databaseName

  • locationName

  • packageName

  • password

  • portNumber

  • serverName

  • user

MS SQLServer driver

com.ddtek.jdbcx.sqlserver.SQLServerDataSource

  • databaseName

  • password

  • user

  • serverName

  • portNumber

SJS JDBC driver for MS

com.sun.sql.jdbcx.sqlserver.SQLServerDataSource

  • databaseName

  • password

  • user

  • serverName

  • portNumber

Sybase driver

com.sybase.jdbcx.SybDataSource

  • databaseName

  • password

  • portNumber

  • serverName

  • user

SJS JDBC driver for Sybase

com.sun.sql.jdbcx.sybase.SybaseDataSource

  • databaseName

  • password

  • user

  • portNumber

  • serverName

MySQL MM driver

org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource

  • serverName

  • port

  • databaseName

  • user

  • password

Informix driver

com.informix.jdbcx.IfxDataSource

  • portNumber

  • databaseName

  • IfxIFXHOST (The IP address or the host name of the computer running the Informix database)

  • serverName

  • user

  • password

SJS JDBC driver for Informix

com.sun.sql.jdbcx.informix.InformixDataSource

  • databaseName

  • informixServer ( The name of the Informix database server to which you want to connect)

  • password

  • portNumber

  • severName

PostgreSQL driver

org.postgresql.ds.PGSimpleDataSource

  • serverName

  • databaseName

  • portNumber

  • user

  • password

Apache Derby driver

org.apache.derby.jdbc.EmbeddedDataSource

  • databaseName

  • user

  • password

   

ProcedureAdding a JDBC Resource

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Resources tab.

  3. Under JDBC Resources section, click New button.

  4. Select the Driver Vendor.

    Specify a unique value for the JNDI name and select the JDBC driver vendor from the available list.

  5. Provide JDBC Resource Properties.

    Based on the JDBC driver vendor selection in the previous step, the class name for the driver and the JDBC resource properties are automatically populated. For a list of suggested properties for some common JDBC drivers, see Common JDBC Drivers.

  6. View Summary.

    View the summary and Click Finish to create the new JDBC resource.

Custom Resources

You can use this option to register a custom resource with the instance of the configuration.

ProcedureAdding a Custom Resource

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Resources tab.

  3. Under Custom Resources section, click New button.

Properties for Custom Resources

The following table describes the properties available for creating a custom resource.

Table 26 Field Description > Custom Resources

Field

Description

JNDI Name

Provide a unique JNDI name for the custom resource.

Custom Resource

Determines if this JDBC resource is enabled at runtime.

Resource Type

Fully qualified type of this resource.

Factory Class

Class that instantiates resources of this type. The fully qualified name of the user-written factory class that implements javax.naming.spi.ObjectFactory.

Description

Provide a short description for the custom resource.

Properties

Optionally provide CLI properties by clicking Add Property button.

External JNDI Resources

This option lets you create an external Java Naming and Directory Interface (JNDI) resource. You need an external JNDI resource to access resources stored in an internal JNDI repository.

ProcedureAdding an External JNDI Resource

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Resources tab.

  3. Under External JNDI Resources section, click New button.

Properties for External JNDI Resources

The following table describes the properties available while adding a new external JNDI resource.

Table 27 Field Description > External JNDI Resources

Field

Description

JNDI Name

Provide a unique name for the new external JNDI resource.

External JNDI Resource

Determines if this external JNDI resource is enabled at runtime.

External JNDI Name

Name of the external JNDI resource.

Resource Type

Fully qualified type of this resource.

Factory Class

Class that instantiates resources of this type.

Description

Provide a short description for the custom resource.

Properties

Optionally provide CLI properties by clicking Add Property button.

Mail Resources

JMS destinations are Java EE resources that can be created and managed via Sun Java System Web Server.

Many internet applications require the ability to send email notifications, so the Java EE platform includes the JavaMail API along with a JavaMail service provider that allows an application component to send internet mail.

ProcedureAdding a New Mail Resource

  1. Select the Configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Resources tab.

  3. Under Mail Resources section, click New button.

Properties for Mail Resource

The following table describes the properties available while adding a new mail resource.

Table 28 Field Description > Mail Resource Properties

Field

Description

JNDI Name

Provide a unique name for the new mail resource.

Mail Resource

Determines if this mail resource is enabled at runtime.

Property

Provide values for all required properties like mail.host, mail.from and mail.user.

Description

Provide a short description for the new mail resource.

Server Lifecycle

ProcedureAdding a New Lifecycle Module

  1. Select the Configuration.

    Select the configuration, from the configuration list. For viewing the list of configuration, click Configuration tab.

  2. Click Java > Lifecycle Modules tab.

  3. Click New button.

    Provide values for the following parameters:


    Caution Caution - The server lifecycle listener classes are invoked synchronously from the main server thread and hence extra precaution must be taken to ensure that the listener classes don't block the server. The listener classes may create threads if appropriate but they must be stopped during the shutdown/termination phases.


ProcedureDeleting a Lifecycle Module

  1. Select the Configuration.

    Select the configuration, from the configuration list. For viewing the list of configuration, click Configuration tab.

  2. Click Java > Lifecycle Modules tab.

  3. Select the lifecycle module and click Delete Lifecycle Module button.

Editing Lifecycle Modules

Java Server Lifecycle Modules are Java classes that listen for server lifecycle events in order to perform certain tasks whenever server events like start or stop occur.

The server supports running short or long duration Java based tasks within the web server environment. These tasks get automatically initiated upon server startup and be notified upon server shutdown. So now you can hook up tasks like instantiating singletons, RMI servers, etc.

A brief description of the server's lifecycle is given below:

Editing Authentication Settings

From this page, you can add and delete authentication realms. The Java EE based security model provides for security realms that identify and authenticate users.

The authentication process verifies users through Java Realm. A realm consists of a set of users, optional group mappings, and authentication logic that can validate authentication requests. Once an authentication request is validated by a configured realm and the security context established, this identity is applied to all subsequent authorization decisions.

The Java Realms are analogous to the auth-dbs (Authentication Databases) with the difference that while auth-dbs are used by the ACL engine (based on rules in your ACL file), the Java Realms are used by the Java Servlet access control rules (specified in each web application's web.xml).

A server instance may have any number of configured realms. The configuration information is present in the auth-realm element in the server.xml file.

The following table defines the different types of realms supported in Sun Java System Web Server 7.0

Table 29 Types of Realms

Realm

Description

File

The file realm is the default realm when you first install the Sun Java System Web Server. This realm, easy and simple to set up, represents a significant convenience to developers.

The file realm authenticates users against user data stored in a text file.

Note that unlike the file auth-db, the Java Realm only supports one file format, keyfile. The keyfile format supported by this realm is compatible with the File auth-db keyfile (and both may refer to the same disk file).

LDAP

The ldap realm allows you to use an LDAP database for user security information. An LDAP directory service is a collection of attributes with unique identifiers. The ldap realm is ideal for deployment to production systems.

In order to authenticate users against the ldap realm, you must create the desired user(s) in your LDAP directory. You can do this from the Administration Server's Users & Groups tab. See Editing Users and GroupsYou can also perform this action from your LDAP directory product's user management console.

PAM

The PAM (aka Solaris) Realm delegates authentication to the Solaris PAM stack. As with the PAM auth-db, this realm is only supported on Solaris 9 and 10 and the server instance must be running as root.

Certificate

The certificate realm supports SSL authentication. The certificate realm sets up the user identity in the Sun Java System Web Server's security context and populates it with user data from the client certificate. The JavaEE containers then handle authorization processing based on each user's DN from his or her certificate. This realm authenticates users with SSL or TLS client authentication through X.509 certificates.

Native

The native realm is a special realm that provides a bridge between the core ACL-based authentication model and the Java EE/Servlet authentication model. By using the Native realm for Java web applications it becomes possible to have the ACL subsystem perform the authentication (instead of having the Java web container do so) and yet have this identity available for Java web applications.

When an authentication operation is invoked, the Native realm delegates this authentication to the core authentication subsystem. From the user's perspective this is essentially equivalent to, for example, the LDAP realm delegating authentication to the configured LDAP server. When group membership queries are processed by the Native realm, they are also delegated to the core authentication subsystem. From the Java web modules and the developers perspective, the Native realm is no different from any of the other Java realms which are available for use with web modules.

Custom

Define your own authentication realm. Provide the class that implements a pluggable servlet container authentication realm.

The following section describes the steps involved in adding a new authentication realm.

ProcedureAdding a Authentication Realm

  1. Select the configuration.

    Select the configuration for which you need to add a new authentication realm. Click Configurations tab and select the configuration.

  2. Click Java > Authentication tab.

  3. Click New under Servlet Authentication.

  4. Provide Realm Details.

Required Properties for Authentication Realm

Each authentication realm needs required properties to be added. Some required properties are listed in the following table:

Table 30 Required Properties for Authentication Realm

Authentication Realm

Properties

File

  1. file -- User database file name. (Required)

LDAP

  1. directory -- LDAP URL to your server. (Required).

  2. base-dn -- The base DN for the location of user data. (Required).

  3. search-filter -- The search filter to use to find the user (Optional).

  4. group-base-dn -- The base DN for the location of group data (Optional).

  5. group-search-filter -- The search filter to find group memberships for the user (Optional).

  6. group-target-attr -- The LDAP attribute name that contains group name entries (Optional).

  7. search-bind-dn -- An optional DN used to authenticate to the directory for performing the search-filter lookup (Optional).

  8. search-bind-password -- The LDAP password for the DN provided for search-bind-dn (Optional).

  9. timeout

PAM

NA

Certificate

  1. assign-groups -- Comma-separated list of group names (Optional).

Native

  1. auth-db -- Name of the authentication DB (Required).

Editing Servlet Container Settings

This section describes the procedure for configuring the servlet container.

ProcedureEditing Servlet Container Settings

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Servlet Container.

Servlet Container Parameters

The following table describes the parameters available servlet container page.

Table 31 Field Description > Servlet Container

Field

Description

Log Level

Log verbosity for the servlet container. The values can be finest (most verbose), finer, fine, info, warning, failure, config, security, or catastrophe (least verbose).

Dynamic Reload Interval

This parameter defines the time period after which the server checks deployed web applications for modifications. The value range is 1 to 60, or -1 if dynamic reloading should be disabled.

Anonymous Role

Name of the default, or anonymous, role assigned to all principals. The default role is ANYONE.

Servlet Pool Size

Number of servlet instances to instantiate per SingleThreadedServlet. The range value is 1 to 4096.

Dispatcher Max Depth

Maximum depth for the servlet container allowing nested request dispatches. The range of values can be between 0 and 214704836470. The default value is 20.

Allow Cross Context

Whether request dispatchers are allowed to dispatch to another context. The default value is false.

Encode Cookies

Whether the servlet container encodes cookie values. The default value is true.

Display Exceptions

Displays exception on the browser. This option is useful only in development environment. Ensure to disable this option in production environment.

Decode '+' in cookie value.

Decodes the plus character in cookie value to space.

Reuse Session IDs

Whether any existing session ID number is reused when creating a new session for that client. The default value is false.

Secure Session Cookie

This parameter controls under what conditions the JSESSIONID cookie is marked secure. Use dynamic (the default) to mark the cookie secure only when the request was received on a secure connection (HTTPS). Use true to always mark it secure and false to never mark it secure.

Editing Session Replication Settings

This section describes the procedure for setting up session replication properties for a selected configuration.

ProcedureEditing Session Replication Settings

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Session Replication.

Session Replication Parameters

The following table describes the parameters available session replication page.

Table 32 Field Description > Session Replication

Field

Description

Port

Port number where the Administration server is listening. The default port is 8888.

Enabled

Enable session replication for the selected configuration.

Encrypted

Whether session data is encrypted prior to replication. The default value is false.

Cipher

Shared secret that members of the cluster use to authenticate to each other.

Async

Whether session replication is allowed to occur asynchronously from HTTP request/response processing. The default value is true.

Getatrribute triggers replication

Whether a call to the HttpSession.getAttribute method should cause a session to be backed up. The default value is true.

Replica Discovery Max Hops

Maximum number of instances that should be contacted while attempting to find the backup of a session. The range of value is 1 to 214704836470, or -1 for no limit.

Startup Discovery Timeout

Maximum time (in seconds) that an instance will spend trying to contact its designated backup instance. The range of value is 0.001 to 3600.

Cookie name

Enter the name of the cookie that tracks which instance owns a session.

Editing SOAP Authentication Settings

Java Authentication Service Provider Interface for Containers specification defines a standard service provider interface by which authentication mechanism providers may be integrated with containers. You can use the Administration Console to add a new SOAP authentication provider.

ProcedureAdding a SOAP Authentication Provider

  1. Select the configuration.

    Select the configuration from the configuration list. Click Configurations tab to get the list.

  2. Click Java > Authentication tab.

  3. Under SOAP Authentication section, click New button.

SOAP Authentication Provider Parameters

The following table describes the parameters available new SOAP authentication provider page.

Table 33 Field Description > SOAP Authentication Provider

Field

Description

Name

Enter a short name for the new SOAP authentication provider.

Class Name

The class that implements the provider. Fully qualified class name of a class that implements javax.security.auth.XXX

Request Authentication Source

This attribute defines a requirement for message layer sender authentication such as username/password or content authentication such as digital signature to be applied to request messages. The value (auth-policy) may be sender or content. When this argument is not specified, source authentication of the request is not required.

Request Authentication Recipient

This attribute defines a requirement for message layer authentication of the receiver of a message to its sender, for example, by XML encryption. The values can be before-content or after-content.

Response Authentication Source

This attribute defines a requirement for message layer sender authentication such as username/password or content authentication such as digital signature to be applied to response messages. The value (auth-policy) may be sender or content. When this argument is not specified, source authentication of the response is not required

Response Authentication Recipient

This attribute defines a requirement for message layer authentication of the receiver of the response message to its sender, for example, by XML encryption.

Properties

Provide other CLI properties by clicking Add Property button.