J2EE Doc Bundle Home

Java

Java TM 2 SDK, Enterprise Edition
Configuration Guide

Version 1.2.1

 


Contents

Introduction

config

In most cases, you won't have to make any changes to the properties files. However, if you wish to use a database driver other than Cloudscape, you'll need to follow the instructions in the next section.

JDBC TM Drivers

config/default.propertiescloudscape

If your enterprise beans use the JDBC API to access a database other than Cloudscape, then you must configure the JDBC drivers according to the instructions in the sections that follow. (If you aren't sure if this release supports your JDBC driver, see the Supported Databases and JDBC Drivers section of the Release Notes.)

Driver Location

$J2EE_HOME/lib/systemjava.security.AllPermission

The J2EE_CLASSPATH Environment Variable

bin/userconfig.shbin\userconfig.bat

Note: You should remove the driver .jar files from the CLASSPATH environment variable.

About XA Datasource Support

If your driver does not support XA datasources, you must follow the instructions in the section, Drivers Without XA Datasource Support.

If your driver supports XA datasources, to take advantage of XA's features you must follow the instructions in the section, Drivers with XA Datasource Support.

If your driver supports XA datasources and you follow the instructions in the section, Drivers Without XA Datasource Support, the driver will work but cannot take advantage of XA's features.

Drivers Without XA Datasource Support

jdbc.driversjdbc.datasourcesconfig/default.properties

The jdbc.drivers Property

jdbc.drivers

 

         
jdbc.drivers=<classname>:<classname>: . . .
      

 

         
jdbc.drivers=oracle.jdbc.driver.OracleDriver:testutil.MyDriver
      

The jdbc.datasources Property

jdbc.datasources

The syntax of jdbc.datasources follows:

 

         
jdbc.datasources=<jndi_datasource>|<url>|<jndi_datasource>|<url>. . .
      

The pipe character (|) serves two purposes. First, it separates the <jndi_datasource> and <url> elements that form a pair. Second, it delimits each pair of <jndi_datasource> and <url> elements.

The <jndi_datasource> element has the following syntax:

 

         
jdbc/<jndi_name>
      
jdbcjndi_name>

Here is an example:

 

         
jdbc.datasources=jdbc/Oracle|jdbc:oracle:thin@rtc:1521:acct|jdbc/MyDB|jdbc:test
      

Drivers with XA Datasource Support

 

         
jdbc20.datasources
         
xadatasource.<n>.jndiname
         
xadatasource.<n>.classname
         
xadatasource.<n>.dbuser
         
xadatasource.<n>.dbpassword
         
xadatasource.<n>.prop.<property-name>
      

The jdbc20.datasources Property

jdbc20.datasourceslookup

The syntax of jdbc20.datasources follows:

 

         
jdbc20.datasources=<jndi_datasource>|<jndi_XA_datasource>|<jndi_datasource>|<jndi_XA_datasource>. . .
      

.

The pipe character (|) serves two purposes. First, it separates the <jndi_datasource> and <jndi_XA_datasource> elements that form a pair. Second, it delimits each pair of <jndi_datasource> and <jndi_XA_datasource> elements.

The <jndi_datasource> and <jndi_XA_datasource> elements have the same syntax:

 

         
jdbc/<jndi_name>
      
jdbcjndi_name>

Here is an example:

 

         
jdbc20.datasources=jdbc/Merant|jdbc/XAMerant|jdbc/Finch|jdbc/XAFinch
      

The xadatasource Properties

xadatasource.<n>.jndiname

 

         
xadatasource.<n>.jndiname=jdbc/<jndi_XA_datasource>
      
<n>xadatasource<n><jndi_XA_datasource>

The xadatasource.<n>.classname property specifies the class name of the XA DataSource.

The xadatasource.<n>.dbuser and xadatasource.<n>.dbpassword properties specify the database user and password used to sign on to the database to perform recovery. Usually, this database user will have the database administrator privilege. (For more information on recoveries, see the section, The distributed.transaction.recovery Property.)

The xadatasource.<n>.prop.<property_name> specifies the value associated with a particular property name. The actual property names may vary with the JDBC driver.

An example follows:

 

         
xadatasource.0.jndiname=jdbc/XAMerant
         
xadatasource.0.classname=com.merant.sequelink.jdbcx.datasource.SequeLinkDataSource
         
xadatasource.0.prop.url=jdbc:sequelink://mypc:5000/[Oracle]
      

Transactions

config/default.properties

The distributed.transaction.recovery Property

The value of this property may be either true or false. When J2EE is first installed, the value is false:

 

         
distributed.transaction.recovery=false
      

The transaction.timeout Property

transaction.timeout

 

         
transaction.timeout=5
      

When J2EE is first installed, the timeout value is set to 0:

 

         
transaction.timeout=0
      

Only enterprise beans with container-managed transactions are affected by the transaction.timeout property. For enterprise beans with bean-managed, JTA transactions, you invoke the setTransactionTimeout method of the UserTransaction interface. You also invoke the setTransactionTimeout method for other components, such as servlets and JSP pages, that demarcate transaction with the UserTransaction interface.

Port Numbers

TM config

 

Log Files

logslog.directoryconfig/default.properties

 

         
log.directory=logs
      
default.propertiesoutput.loglog.output

The log files generated depend on whether you launch j2ee in the single or multiple VM (virtual machine) mode.

Single VM Log Files

j2ee

 

         
$J2EE_HOME/<logs>/<host>/ejb
      
<logs>log.directorydefault.propertieslogs<host>

The following log files are generated:

 

         
system.out
         
system.err
         
event.log
         
output.log
         
error.log
         
audit.log
      
system.outsystem.errSystem.outSystem.errj2eeverbosestdoutstderrsystem.outsystem.erraudit.logauditconfig/auth.propertiestrue

Multiple VM Log Files

j2eemultiVM

 

Web Service Log Files

web.properties

 

         
access.log=access.log
         
error.log=error.log
      

Security

Unauthenticated User Name

TM guestguest123auth.properties

 

         
default.principal.name=guest
         
default.principal.password=guest123
      

Keystore Password

<user-home>/.keystore<user-home>System.getProperty("user.home")

The .keystore file is typically protected by a password. By default, this password is changeit. You can modify the password by editing the keystore.password entry in the web.properties file.

ANYONE Role

anyone.role.nameauth.properties

Memory Threshold for Passivation

config/default.properties

 

         
passivation.threshold.memory=128000000
      

HTTP Document Root

documentrootweb.propertiesweb.properties

 

         
documentroot=public_html/
      

 


Copyright © 2000 Sun Microsystems, Inc. All rights reserved.

TABLE 0-1 Java TM 2 SDK, Enterprise Edition Ports
Service
Using the Port

 

Default
Port Number

 

Properties File

 

Default Entry
in Properties File

 

Description

 

EJB 9191 ejb.properties http.port=9191 The EJB service uses this port to download stub classes to clients.
HTTP 8000 web.properties port=8000 The HTTP service uses this port to service requests.
HTTPS 7000 web.properties https.port=7000 The HTTPS service uses this port to service requests.
Naming and Directory 1050 orb.properties port=1050 The ORB (Object Request Broker) underlying the JNDI name server uses this port.
 
Server Generating Log Files

 

Syntax of Log File Directory

 

EJB $J2EE_HOME/<logs>/ejb/ejbd
HTTP $J2EE_HOME/<logs>/ejb/httpd
deployed application $J2EE_HOME/<logs>/ejb/<app-name>
 
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve

Java 8 banner (182)

Virtual Technology Summit 07.09.14 Banner

Java One 2014 RHS Banner

Duke's Choice RHS Banner