Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


3.10 glassfish-resources.xml

glassfish-resources.xml is the Java EE RI DD used to specify resource settings.

Description

glassfish-resources.xml is the DD used to specify resource settings that are unique to Java EE RI.

The root element of glassfish-resources.xml is resources. The element resources contains child elements and attributes, as indicated by "Element hierarchy". These child elements and attributes may further contain their child elements and attributes.

To create a JDBC connection pool, specify the following attributes based on the database to be connected:

#1:

Specify this if the XA transactions should not be used.

#2:

Specify this if the XA transactions should be used.

#3:

Specify this only if connection errors should be detected.

#4:

This option specifies whether to enable the auto-commit functionality when the transaction is not a global transaction. If this is not true, connection errors are not detected normally. To detect connection errors, specify true.

#5:

Specify the four properties (that is, databaseName, serverName, portNumber, and driverType) or the url. If you specify both, url takes effect. However, but the other four properties are ignored.

Schema

<!DOCTYPE resources PUBLIC 
"-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions
//EN" "http://glassfish.org/dtds/glassfish- resources_1_5.dtd">

Storage location

The DD file is stored in the following location:

Element hierarchy

resources
. custom-resource
. . description
. . property
. external-jndi-resource
. . description
. . property
. . . description
. jdbc-resource
. . description
. . property
. . . description
. mail-resource
. . description
. . property
. . . description
. admin-object-resource
. . description
. . property
. . . description
. connector-resource
. . description
. . property
. . . description
. resource-adapter-config
. . property
. . . description
. jdbc-connection-pool
. . description
. . property
. . . description
. connector-connection-pool
. . description
. . security-map
. . . principal
. . . . name
. . . user-group
. . . backend-principal
. . property
. . . description
. work-security-map
. . description
. . principal-map
. . group-map

Examples

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC 
"-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions
//EN" "http://glassfish.org/dtds/glassfish- resources_1_5.dtd">
<resources>
       <jdbc-connection-pool>
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="1527"/>
        <property name="databaseName" value="forest"/>
        <property name="User" value="forest"/>
        <property name="Password" value="forest"/>
        <property name="URL" value="jdbc:oracle://localhost:1527/forest"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" jndi-name="jdbc/forest" 
pool-name="oracle_net_forest_forestPool"/>
    <connector-connection-pool associate-with-thread="false" 
connection-creation-retry-attempts="0" />
</resources>