Sie sind auf Seite 1von 5

<Resource

auth="Container"
name="jdbc/DataSourceName"
driverClassName="oracle.jdbc.OracleDriver"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
type="oracle.jdbc.pool.OracleDataSource"
implicitCachingEnabled="true"
connectionCacheName="TestCache"
connectionCacheProperties="{InitialLimit=2, MinLimit=2, MaxLimit=10, Max
StatementsLimit=0, ConnectionWaitTimeout=10}"
connectionCachingEnabled="true"
user="pooluser"
password="pa$$w0rd"
url="jdbc:oracle:thin:@HOST_IP:PORT:SID"/>
################# GLOBAL #################################
connectionCacheName: Specifies the name of the cache. This cannot be changed aft
er the cache has been created.
connectionCacheProperties: Specifies properties for implicit connection cache.
connectionCachingEnabled: Specifies whether implicit connection cache is in use.
connectionProperties: Specifies the connection properties.
driverType: Specifies Oracle JDBC driver type. It can be one of oci, thin, or kp
rb.
fastConnectionFailoverEnabled: Specifies whether Fast Connection Failover is in
use.
implicitCachingEnabled: Specifies whether the implicit statement connection cach
e is enabled.
loginTimeout: Specifies the maximum time in seconds that this data source will w
ait while attempting to connect to a database.
logWriter: Specifies the log writer for this data source.
maxStatements: Specifies the maximum number of statements in the application cac
he.
serviceName: Specifies the database service name for this data source.
tnsEntry: Specifies the TNS entry name, relevant only for the OCI driver. The TN
S entry name corresponds to the TNS entry specified in the tnsnames.ora configur
ation file. This property is only for OracleXADatasource. Enable this OracleXADa
taSource property when using the Native XA feature with the OCI driver, to acces
s Oracle pre-8.1.6 databases and later. If the tnsEntry property is not set when
using the Native XA feature, then a SQLException with error code ORA-17207 is t
hrown
url: Specifies the URL of the database connection string. Provided as a convenie
nce, it can help you migrate from an older Oracle Database. You can use this pro
perty in place of the Oracle tnsEntry and driverType properties and the standard
portNumber, networkProtocol, serverName, and databaseName properties.
nativeXA: Allows an OracleXADataSource using the Native XA feature with the OCI
driver, to access Oracle pre-8.1.6 databases and later. If the nativeXA property
is enabled, be sure to set the tnsEntry property as well. This property is only
for OracleXADatasource. This DataSource property defaults to false.
ONSConfiguration: Specifies the ONS configuration string that is used to remotel
y subscribe to FaN/ONS events.
################# Connection Properties #######################################
user
The value of this property is used as the user name when connecting to t
he database.
password
The value of this property is used as the password when connecting to th
e database.
database
The value of this property is used as the SID of the database.
server
The value of this property is used as the host name of the database.
internal_logon
The value of this property is used as the user name when performing an i
nternal logon. Usually this will be SYS or SYSDBA.
defaultRowPrefetch
The value of this property is used as the default number of rows to pref
etch.
defaultExecuteBatch
The value of this property is used as the default batch size when using
Oracle style batching.
processEscapes
If the value of this property is "false" then the default setting for St
atement.setEscapeProccessing is false.
disableDefineColumnType
When this connection property has the value true, the method defineColum
nType is has no effect. This is highly recommended when using the Thin driver, e
specially when the database character set contains four byte characters that exp
and to two UCS2 surrogate characters, e.g. AL32UTF8. The method defineColumnType
provides no performance benefit (or any other benefit) when used with the 10g T
hin driver. This property is provided so that you do not have to remove the call
s from your code. This is especially valuable if you use the same code with Thin
driver and either the OCI or Server Internal driver.
DMSName
Set the name of the DMS Noun that is the parent of all JDBC DMS metrics.
DMSType
Set the type of the DMS Noun that is the parent of all JDBC DMS metrics.
AccumulateBatchResult
When using Oracle style batching, JDBC determines when to flush a batch
to the database. If this property is true, then the number of modified rows accu
mulated across all batches flushed from a single statement. The default is to co
unt each batch separately.
oracle.jdbc.J2EE13Compliant
If the value of this property is "true", JDBC uses strict compliance for
some edge cases. In general Oracle's JDBC drivers will allow some operations th
at are not permitted in the strict interpretation of J2EE 1.3. Setting this prop
erty to true will cause those cases to throw SQLExceptions. There are some other
edge cases where Oracle's JDBC drivers have slightly different behavior than de
fined in J2EE 1.3. This results from Oracle having defined the behavior prior to
the J2EE 1.3 specification and the resultant need for compatibility with existi
ng customer code. Setting this property will result in full J2EE 1.3 compliance
at the cost of incompatibility with some customer code. Can be either a system p
roperty or a connection property.
oracle.jdbc.TcpNoDelay
If the value of this property is "true", the TCP_NODELAY property is set
on the socket when using the Thin driver. See java.net.SocketOptions.TCP_NODELA
Y. Can be either a system property or a connection property.
defaultNChar
If the value of this property is "true", the default mode for all charac
ter data columns will be NCHAR.
useFetchSizeWithLongColumn
If the value of this property is "true", then JDBC will prefetch rows ev
en though there is a LONG or LONG RAW column in the result. By default JDBC fetc
hes only one row at a time if there are LONG or LONG RAW columns in the result.
Setting this property to true can improve performance but can also cause SQLExce
ptions if the results are too big.
remarksReporting
If the value of this property is "true", OracleDatabaseMetaData will inc
lude remarks in the meta data. This can result in a substantial reduction in per
formance.
includeSynonyms
If the value of this property is "true", JDBC will include synonyms when
getting information about a column.
restrictGetTables
If the value of this property is "true", JDBC will return a more refined
value for DatabaseMeta.getTables. By default JDBC will return things that are n
ot accessible tables. These can be non-table objects or accessible synonymns for
inaccessible tables. If this property is true JDBC will return only accessible
tables. This has a substantial performance penalty.
fixedString
If the value of this property is "true", JDBC will use FIXED CHAR semant
ic when setObject is called with a String argument. By default JDBC uses VARCHAR
semantics. The difference is in blank padding. With the default there is no bla
nk padding so, for example, 'a' does not equal 'a ' in a CHAR(4). If true these
two will be equal.
oracle.jdbc.ocinativelibrary
Set the name of the native library for the oci driver. If not set, the d
efault name, libocijdbcX (X is a version number), is used.
oracle.jdbc.StreamBufferSize
Set size of the buffer for the InputStream/Reader obtained from getXXXSt
ream/getXXXReader. The default size is 16k. The size passed should be at least 4
096 or else 4096 is assumed.
OCINewPassword
Pass the value of new password to be set during logon. This could be typ
ically used for resetting the password when the password has expired or when the
account is in the grace period.
oracle.jdbc.RetainV9BehaviorForLongBind
This is applicable only for the thin driver. Pass true to retain the V9
bind behavior for Long and potential long binds. false is the default behavior w
hich would emulate the same behavior as in OCI driver.
oracle.jdbc.FreeMemoryOnEnterImplicitCache
Clear the define buffers before caching the statement when Implicit stat
ement caching is enabled. Setting the value to true would enable the clearing of
define buffers before caching of Statements in the Statement cache. false is th
e default value and this would behave in the same way as statement caching worke
d in prior releases.
oracle.jdbc.ReadTimeout
timeout while reading from the socket. This affects thin driver only. Ti
meout is in milliseconds.
################# Connection Cache Properties #################################
# # # Limit Properties : These properties control the size of the cache.
# InitialLimit
Sets how many connections are created in the cache when it is created or
reinitialized. When this property is set to an integer value greater than 0, cr
eating or reinitializing the cache automatically creates the specified number of
connections, filling the cache in advance of need. Default: 0
# MaxLimit
Sets the maximum number of connection instances the cache can hold. The
default value is Integer.MAX_VALUE, meaning that there is no limit enforced by t
he connection cache, so that the number of connections is limited only by the nu
mber of database sessions configured for the database. Default: Integer.MAX_VALU
E (no limit)
# MaxStatementsLimit
Sets the maximum number of statements that a connection keeps open. When
a cache has this property set, reinitializing the cache or closing the datasour
ce automatically closes all cursors beyond the specified MaxStatementsLimit. Def
ault: 0
# MinLimit
Sets the minimum number of connections the cache maintains. This guarant
ees that the cache will not shrink below this minimum limit. Setting the MinLimi
t property does not initialize the cache to contain the minimum number of connec
tions. To do this, use the InitialLimit property. See "InitialLimit". Default: 0
# # # Timeout Properties: These properties control the lifetime of an element in
the cache.
# InactivityTimeout
Sets the maximum time a physical connection can remain idle in a connect
ion cache. An idle connection is one that is not active and does not have a logi
cal handle associated with it. When InactivityTimeout expires, the underlying ph
ysical connection is closed. However, the size of the cache is not allowed to sh
rink below minLimit, if has been set. Default0 (no timeout in effect)
# TimeToLiveTimeout
Sets the maximum time in seconds that a logical connection can remain op
en. When TimeToLiveTimeout expires, the logical connection is unconditionally cl
osed, the relevant statement handles are canceled, and the underlying physical c
onnection is returned to the cache for reuse. Default: 0 (no timeout in effect)
# AbandonedConnectionTimeout
Sets the maximum time that a connection can remain unused before the con
nection is closed and returned to the cache. A connection is considered unused i
f it has not had SQL database activity. When AbandonedConnectionTimeout is set,
JDBC monitors SQL database activity on each logical connection. For example, whe
n stmt.execute() is invoked on the connection, a heartbeat is registered to conv
ey that this connection is active. The heartbeats are set at each database execu
tion. If a connection has been inactive for the specified amount of time, the un
derlying connection is reclaimed and returned to the cache for reuse. Default: 0
(no timeout in effect)
# PropertyCheckInterval
Sets the time interval at which the cache manager inspects and enforces
all specified cache properties. PropertyCheckInterval is set in seconds. Default
: 900 seconds (15 minutes)
# # # Other Properties: These properties control miscellaneous cache behaviors.
# AttributeWeights
# ClosestConnectionMatch
# ConnectionWaitTimeout:
Specifies cache behavior when a connection is requested and there are al
ready MaxLimit connections active. If ConnectionWaitTimeout is greater than zero
(0), each connection request waits for the specified number of seconds, or unti
l a connection is returned to the cache. If no connection is returned to the cac
he before the timeout elapses, the connection request returns null. Default: 0 (
no timeout)
# LowerThresholdLimit
Sets the lower threshold limit on the cache. The default is 20% of the M
axLimit on the connection cache. This property is used whenever a releaseConnect
ion() cache callback method is registered. For details, see "Connection Cache Ca
llbacks" .
# ValidateConnection
Setting ValidateConnection to true causes the connection cache to test e
very connection it retrieves against the underlying database. Default: false

Das könnte Ihnen auch gefallen