cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r424327 - in /cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes: OJB-logging.properties OJB.properties repository.dtd
Date Fri, 21 Jul 2006 14:10:40 GMT
Author: cziegeler
Date: Fri Jul 21 07:10:40 2006
New Revision: 424327

URL: http://svn.apache.org/viewvc?rev=424327&view=rev
Log:
Use configuration files from 2.1.x (the old ones don't work with ojb 1.0.4)

Modified:
    cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB-logging.properties
    cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB.properties
    cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/repository.dtd

Modified: cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB-logging.properties
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB-logging.properties?rev=424327&r1=424326&r2=424327&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB-logging.properties
(original)
+++ cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB-logging.properties
Fri Jul 21 07:10:40 2006
@@ -14,13 +14,11 @@
 # * limitations under the License.
 # */
 #-->
+#
 # OJB-logging.properties -- configuration of the logging within the OJB runtime environment
-# Version: 1.0
-# (c) 2001, 2002, 2003 Apache Software Foundation
-# Author: Thomas Mahler and many others
 # @version $Id$
 #----------------------------------------------------------------------------------------
-# The LoggerClass entry tells OJB which concrete Logger implementation is to be used.
+# The 'LoggerClass' entry tells OJB which concrete Logger implementation is to be used.
 # If it is not specified (or this file is not present/found, then OJB will check
 # whether there is a log4j.properties or commons-logging.properties file, in which
 # case it will use Log4J/commons-logging. If neither is present, then OJB will default
@@ -31,12 +29,19 @@
 LoggerClass=org.apache.cocoon.ojb.components.LoggerImpl
 # Commons-logging
 #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
+#
 # log4j based logging
 #LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
+# specifiy the name of log4j properties file (only needed if file
+# name is different from "log4j.properties")
+#LoggerConfigFile=log4j.properties
+#
 # OJB's own simple looging support
 #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
-#LoggerConfigFile=log4j.properties
 #
+#----------------------------------------------------------------
+# all following properties are specific to PoorMansLoggerImpl
+#----------------------------------------------------------------
 # The LogLevel entries tells OJB which LogLevels are active
 # for the different loggers used within OJB
 # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
@@ -47,57 +52,82 @@
 # entities if not specified
 ROOT.LogLevel=ERROR
 #
+# The boot log level used to initialize logging
+BOOT.LogLevel=INFO
+#
 # The Default Logger instance used within OJB
 DEFAULT.LogLevel=WARN
-# Logger for PersistenceBrokerImpl class
-org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
-# Logger for PersistenceBrokerFactory class PersistenceBrokerFactoryDefaultImpl
+#
+# PB-api and Kernel
+# -----------------
+# Logger for PB-api base classes
 org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN
-# Logger for RepositoryXmlHandler, useful for debugging parsing of repository.xml!
+org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl.LogLevel=WARN
+org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
+#
+# Logger for metadata classes, useful for debugging parsing of repository.xml!
 # persistence capable object metadata
+org.apache.ojb.broker.metadata.DescriptorRepository.LogLevel=WARN
 org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
-# Logger for ConnectionDescriptorXmlHandler, useful for debugging parsing of repository.xml!
-# connection specific metadata
 org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN
-# Logger for JdbcAccess, useful for debugging JDBC related problems
+org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
+org.apache.ojb.broker.metadata.SuperReferenceDescriptor$SuperReferenceField.LogLevel=WARN
+#
+# Logger for jdbc access querying and object materialization, useful
+# for debugging JDBC related problems
 org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
-# Logger for RsIterator, useful for debugging problems with Object materialization
 org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
-# Logger for StatementsForClass, useful for debugging JDBC Connection related problems
 org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
-# Logger for SqlGenerator, useful for debugging generation of SQL
 org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN
-# Logger for RepositoryPersistor
-org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
-# Logger for ConnectionFactory base class
-org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN
-# Logger for ConnectionManager
+org.apache.ojb.broker.core.QueryReferenceBroker.LogLevel=WARN
+#
+# Logger for connection handling
 org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
-# Logger for IndirectionHandler class
-org.apache.ojb.broker.core.proxy.IndirectionHandler.LogLevel=WARN
-# Logger for MaterializationCache
-org.apache.ojb.broker.cache.MaterializationCache.LogLevel=WARN
-# Logger for CacheDistributor
+org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN
+org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.LogLevel=WARN
+org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl.LogLevel=WARN
+#
+# Logger for object caching
 org.apache.ojb.broker.cache.CacheDistributor.LogLevel=WARN
-# Logger for ObjectCacheDefaultImpl
+org.apache.ojb.broker.cache.MaterializationCache.LogLevel=WARN
 org.apache.ojb.broker.cache.ObjectCacheDefaultImpl.LogLevel=WARN
-# Logger for ObjectCacheTwoLevelImpl
 org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.LogLevel=WARN
+#
 # Logger for Oracle9i platform, useful for tracing failing Oracle-extensions or large LOB-support
 org.apache.ojb.broker.platforms.PlatformOracle9iImpl.LogLevel=WARN
 #
-# Special Logger categories used in test suite and tutorials
+# Logger for proxy classes
+org.apache.ojb.broker.core.proxy.IndirectionHandlerJDKImpl.LogLevel=WARN
+org.apache.ojb.broker.core.proxy.IndirectionHandlerCGLIBImpl.LogLevel=WARN
+org.apache.ojb.broker.core.proxy.ProxyFactoryJDKImpl.LogLevel=WARN
+org.apache.ojb.broker.core.proxy.ProxyFactoryCGLIBImpl.LogLevel=WARN
+#
+# OJB locking implementations
+org.apache.ojb.broker.locking.LockManagerInMemoryImpl.LogLevel=WARN
+org.apache.ojb.broker.locking.LockManagerCommonsImpl.LogLevel=WARN
+org.apache.ojb.broker.locking.LockManagerRemoteImpl.LogLevel=WARN
+org.apache.ojb.broker.locking.CommonsOJBLockManager.LogLevel=WARN
+#
+# odmg-api
+# --------
+org.apache.ojb.odmg.TransactionImpl.LogLevel=WARN
+org.apache.ojb.odmg.J2EETransactionImpl.LogLevel=WARN
+org.apache.ojb.odmg.ImplementationImpl.LogLevel=WARN
+org.apache.ojb.odmg.DatabaseImpl.LogLevel=WARN
+org.apache.ojb.odmg.ObjectEnvelopeTable.LogLevel=WARN
+org.apache.ojb.odmg.ObjectEnvelope.LogLevel=WARN
+org.apache.ojb.odmg.Image.LogLevel=WARN
+org.apache.ojb.odmg.ObjectEnvelopeOrdering.LogLevel=WARN
+org.apache.ojb.odmg.LocalTxManager.LogLevel=WARN
+org.apache.ojb.odmg.JTATxManager.LogLevel=WARN
+#
+#
+# Special Logger categories used in test suite
 #
-# Logger for the ODMG Implementation
-ODMG.LogLevel=DEBUG
-# Logger for the JDO RI Implementation
-JDO.LogLevel=DEBUG
 # Logger for the performance tests
 performance.LogLevel=INFO
-# Logger for the soda api
-soda.LogLevel=WARN
-# Logger for the factory service
-ConfigurableFactory.LogLevel=WARN
+# Logger for the failover tests
+failover.LogLevel=INFO
 #
 #
 #----------------------------------------------------------------------------------------

Modified: cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB.properties
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB.properties?rev=424327&r1=424326&r2=424327&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB.properties
(original)
+++ cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/OJB.properties
Fri Jul 21 07:10:40 2006
@@ -63,6 +63,15 @@
 # Using this implementation OJB works as a simple OODBMS
 #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
 #
+#
+# This setting can be helpful during development if the PersistenceBroker transaction
+# demarcation was used (this is true in most cases). If set 'true' on PB#store(...)
+# and PB#delete(...) methods calls OJB check for active PB-tx and if no active tx is
+# found a error is logged. This can help to avoid store/delete calls without a running
+# PB-tx while development. Default setting is 'false'. (Note: When using OJB in a managed
+# environment *without* OJB-caching, it's valid to use store/delete calls without a running
PB-tx)
+TxCheck=false
+#
 #----------------------------------------------------------------------------------------
 # PersistenceBroker pool
 #----------------------------------------------------------------------------------------
@@ -136,8 +145,10 @@
 ConnectionFactoryClass=org.apache.cocoon.ojb.components.ConnectionFactoryImpl
 #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
 #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
-#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
 #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
+# Only needed when using OJB 1.0.3 or earlier in managed environments. Since version
+# 1.0.4 OJB detects datasources from managed environments automatically.
+#ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
 #
 #
 #----------------------------------------------------------------------------------------
@@ -155,12 +166,29 @@
 #
 #
 #----------------------------------------------------------------------------------------
-# IndirectionHandler
+# ProxyFactory and IndirectionHandler
 #----------------------------------------------------------------------------------------
+# The ProxyFactoryClass entry defines which ProxyFactory implementation is to be used.
+# By default, a 1.0 compatiable, JDK-based version is used. However, a the CGLIB based entry
+# is available.
+#
+#	- ProxyFactoryCGLIBImpl: Refernece proxies are generated using bytecode manipulation
+#			from the CGLIB library. Any class can become a dynamic proxy, and not just ones
+#			that implement an interface.
+#   - ProxyFactoryJDKImpl: OJB 1.0 compatiable Proxy implementation. Proxies in this method
+#			can only be generated from classes that implement an interface, and the generated
+#			Proxy will implement all methods of that interface.
+#
+# NOTE: The appropriate cooresponding IndirectionHandler must be choosen as well
+#
+#ProxyFactoryClass=org.apache.ojb.broker.core.proxy.ProxyFactoryCGLIBImpl
+ProxyFactoryClass=org.apache.ojb.broker.core.proxy.ProxyFactoryJDKImpl
+#
 # The IndirectionHandlerClass entry defines the class to be used by OJB's proxies to
 # handle method invocations
 #
-IndirectionHandlerClass=org.apache.ojb.broker.core.proxy.IndirectionHandlerDefaultImpl
+#IndirectionHandlerClass=org.apache.ojb.broker.core.proxy.IndirectionHandlerCGLIBImpl
+IndirectionHandlerClass=org.apache.ojb.broker.core.proxy.IndirectionHandlerJDKImpl
 #
 #----------------------------------------------------------------------------------------
 # ListProxy
@@ -321,28 +349,14 @@
 #OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
 #
 #
-# Specify the cascading delete behavior of the odmg-api. The
-# specified settings will be used by odmg-api as default settings. It
-# is also possible to change these settings at runtime using the
-# TransactionExt#setCascadingDelete method.
-#
-# Enable disable cascading delete for 1:1 references
-cascadingDeleteOneToOne=false
-#
-# Enable disable cascading delete for 1:n references
-cascadingDeleteOneToN=false
-#
-# Enable disable cascading delete for m:n references
-cascadingDeleteMToN=false
-#
-#
 # The ImplicitLocking entry defines if implicit lock acquisition is
-# to be used. If set to 'true' OJB implicitely locks objects to ODMG
-# transactions after performing OQL queries and lookup objects.
-# If implicit locking is used locking objects is recursive, that is
+# to be used. If set to 'true' OJB implicitly locks objects to ODMG
+# transactions after performing OQL queries.
+# Also if implicit locking is used locking objects is recursive, that is
 # associated objects are also locked.
 # If ImplicitLocking is set to 'false', no locks are obtained in OQL
 # queries, lookup objects and there is also no recursive locking.
+# This setting can be changed at runtime using OJB's ODMG extensions.
 ImplicitLocking=true
 #ImplicitLocking=false
 #
@@ -350,11 +364,20 @@
 # implicit locking feature. If set to WRITE (default) acquiring a write-
 # lock on a given object x implies write locks on all objects associated
 # to x. If set to READ implicit read-locks are acquired.
-# Acquiring a read-lock on x thus allways results in implicit read-locks
-# on all associated objects.
+# Acquiring a read-lock on x allways results in implicit read-locks
+# on all associated objects (if 'implicit locking' is enabled).
+# This setting can be changed at runtime using OJB's ODMG extensions.
 #LockAssociations=READ
 LockAssociations=WRITE
 #
+# Enable/Disable OJB's persistent object ordering algorithm on commit
+# of a transaction. If enabled OJB try to calculate a valid order for
+# all new/modified objects (and referenced objects).
+# If the used databases support 'deferred checks' it's recommended to use this
+# feature and to disable OJB's object ordering.
+# This setting can be changed at runtime using OJB's ODMG extensions.
+Ordering=true
+#
 #
 # Used ODMG collection implementation classes
 # (e.g. when do a Implementation#newDlist() call)
@@ -375,6 +398,15 @@
 DSetClass=org.apache.ojb.odmg.collections.DSetImpl
 #
 #
+# @deprecated property for backward compatibility.
+# If set 'true' the behavior of method
+# ImplementationImpl#setImplicitLocking(...) will be the same as
+# in OJB <=1.0.3 (set the implicit locking behavior of the current used transaction)
+# and disable the new possibility of global 'implicit locking'
+# setting at runtime with ImplementationExt#setImplicitLocking.
+# This is only for backward compatibility and will
+# be removed at a later date.
+ImplicitLockingBackward=false
 #----------------------------------------------------------------------------------------
 # Meta data / mapping settings
 #----------------------------------------------------------------------------------------
@@ -403,20 +435,11 @@
 #   for each field determines upon first access how to access this particular field
 #   (directly, as a bean, as a dyna bean) and then uses that strategy
 #
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl
+PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectImpl
 #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl
 #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl
-#
-# Here are the new upcoming PersistentField implementations. These classes will replace the
-# 'old' ones on next release. They pass the test-suite and be tested the last months.
-# The new implementations are about 50 times faster in handling nested fields.
-PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImplNew
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImplNew
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImplNew
+#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanImpl
 #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl
-#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanImplNew
 #(DynaBean implementation does not support nested fields)
 #
 #----------------------------------------------------------------------------------------

Modified: cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/repository.dtd
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/repository.dtd?rev=424327&r1=424326&r2=424327&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/repository.dtd
(original)
+++ cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-impl/src/main/resources/WEB-INF/classes/repository.dtd
Fri Jul 21 07:10:40 2006
@@ -1,6 +1,5 @@
-<!-- @version $Id$ -->
 <!--
-#/* Copyright 2004 Apache Software Foundation
+#/* Copyright 2004-2005 Apache Software Foundation
 # *
 # * Licensed under the Apache License, Version 2.0 (the "License");
 # * you may not use this file except in compliance with the License.
@@ -15,10 +14,15 @@
 # * limitations under the License.
 # */
 -->
+<!-- @version $Id$ -->
 <!--
-	ObJectRelationalBridge - Bridging Java objects and relational dabatases
+	Apache OJB - ObJectRelationalBridge
+
+        Bridging Java objects and relational dabatases
+
 	This DTD describes the grammar of the Descriptor repository
-	Author: Thomas Mahler, (c) 2000, 2001, 2002, 2003
+
+	Initial author: Thomas Mahler
   -->
 
 <!--
@@ -99,7 +103,7 @@
 	The jdbc-level attribute is used to specify the Jdbc compliance
 	level of the used Jdbc driver.
 
-    The eager-release attribute was adopt to solve a problem occured when
+    DEPRECATED! The eager-release attribute was adopt to solve a problem occured when
     using OJB within JBoss (3.0 <= version < 3.2.2, seems to be fixed in jboss 3.2.2).
     Only use within JBoss.
 
@@ -113,15 +117,18 @@
 
     The useAutoCommit attribute allow to set how OJB uses
     the autoCommit state of the used connections. The default mode
-    was 1. When using mode 0 or 2 with the PB-api, you must use PB
-    transaction demarcation.
+    was 1.
     0 - OJB ignores the autoCommit setting of the connection and do not
         try to change it. This mode could be helpfully if the
         connection don't let you set the autoCommit state
         (e.g. using datasources from application server).
-    1 - set autoCommit explicit 'true' when connection was created
-        and temporary set to 'false' when necessary (default mode).
-    2 - set autoCommit explicit 'false' when connection was created.
+    1 - [default mode] set the connection's autoCommit state temporary to 'false' if needed
+        (when using transaction) and restore the old state after use. In
+        versions before OJB 1.0.4 the autoCommit state was explicit set 'true'
+        when connection was created, now OJB expect that this was done by
+        the jdbc-driver configuration. To enable old behavior set a custom attribute
+        'initializationCheck' to 'true'.
+    2 - this setting set autoCommit explicit 'false' when connection was created.
 
     If the ignoreAutoCommitExceptions attribute is set 'true', all
     exceptions caused by setting autocommit state, will be ignored.
@@ -195,83 +202,155 @@
 
 <!--
 	The connection-pool element specifies the connection pooling
-	parameter.
+    and low-level JDBC driver parameters.
 -->
-<!ELEMENT connection-pool (documentation?)>
+<!ELEMENT connection-pool (documentation?, attribute*)>
 
 
 <!--
-	maxActive
-	maximum number of connections that can be borrowed from the
-	pool at one time. When non-positive, there is no limit.
+    maxActive (default=21)
+    The maximum number of active connections that can be allocated from this
+    pool at the same time, or zero for no limit.
+
+    maxIdle (default=-1)
+    The maximum number of active connections that can remain idle in the pool,
+    without extra ones being released, or zero for no limit.
 
-	maxIdle
-	controls the maximum number of connections that can sit idle in the
-	pool at any time. When non-positive, there is no limit
+    minIdle (default=0)
+    The minimum number of active connections that can remain idle in the pool,
+    without extra ones being created, or zero to create none.
+    Since: 1.0.4
 
-	maxWait
-	max time block to get connection instance from pool, after that exception is thrown.
-	When non-positive, block till last judgement
+    maxWait (default=5000)
+    The maximum number of milliseconds that the pool will wait (when there
+    are no available connections) for a connection to be returned before
+    throwing an exception, or -1 to wait indefinitely.
+    Must be > 0 for timeout to actually happen in DBCP PoolingDataSource.
 
-	whenExhaustedAction
+    whenExhaustedAction (default=0/WHEN_EXHAUSTED_FAIL)
 	0 - fail when pool is exhausted
 	1 - block when pool is exhausted
 	2 - grow when pool is exhausted
 
-	testOnBorrow
-	The pool will attempt to validate each object before it is returned from the pool
-
-	testOnReturn
-	The pool will attempt to validate each object before it is returned to the pool
+    validationQuery (default=not specified)
+    The SQL query that will be used to validate connections from this pool
+    before returning them to the caller. If specified, this query MUST be
+    an SQL SELECT statement that returns at least one row.
+    Eg:
+        Oracle      SELECT 1 FROM DUAL
+        PostgreSQL  SELECT 1
+        MySQL       SELECT 1
+
+    testOnBorrow (default=true)
+    The indication of whether connections will be validated before being
+    borrowed from the pool. If the connection fails to validate, it will
+    be dropped from the pool, and OJB will attempt to borrow another.
+
+    testOnReturn (default=false)
+    The indication of whether connections will be validated before being
+    returned to the pool.
+
+    testWhileIdle (default=false)
+    The indication of whether connections will be validated by the idle object
+    evictor (if any). If a connection fails to validate, it will be dropped
+    from the pool.
+
+    timeBetweenEvictionRunsMillis (default=-1)
+    The number of milliseconds to sleep between runs of the idle
+    object evictor thread. When non-positive, no idle object evictor thread
+    will be run.
+
+    numTestsPerEvictionRun (default=10)
+    The number of objects to examine during each run of the idle object
+    evictor thread (if any).
+
+    minEvictableIdleTimeMillis (default=1800000)
+    The minimum amount of time a connection may sit idle in the pool before
+    it is eligable for eviction by the idle object evictor (if any).
 
-	testWhileIdle
-	Indicates whether or not idle objects should be validated.
-	Objects that fail to validate will be dropped from the pool
-
-	timeBetweenEvictionRunsMillis
-	indicates how long the eviction thread should sleep before "runs" of examining
-	idle objects. When non-positive, no eviction thread will be launched.
-
-	minEvictableIdleTimeMillis
-	specifies the minimum amount of time that a connection may sit idle
-	in the pool before it is eligable for eviction due to idle time.
-	When non-positive, no connection will be dropped from the pool due
-	to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
-
-	numTestsPerEvictionRun
-	The number of connections to examine during each run of the
-	idle object evictor thread (if any)
-
-    validationQuery
-    Here you could specify a validation query used by pool to test a
-    obtained connection (e.g. "select 1 from dual"), else a default query was
-    used - if defined in the platform class for your database.
-
-    logAbandoned
-    Only supported when using
-    org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
-    ConnectionFactory implementation.
-    Flag to log stack traces for application code which abandoned
-    a Statement or Connection. Defaults to false. Logging of
-    abandoned Statements and Connections adds overhead for
-    every Connection open or new Statement because a
-    stack trace has to be generated.
-
-    removeAbandoned/removeAbandonedTimeout
-    Only supported when using
-    org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
-    ConnectionFactory implementation.
+    removeAbandoned [only for ConnectionFactoryDBCPImpl] (default=false)
     Flag to remove abandoned connections if they exceed the
-    removeAbandonedTimeout. Set to true or false, default false.
-    If set to true a connection is considered abandoned and
-    eligible for removal if it has been idle longer than the
-    removeAbandonedTimeout. Setting this to true can recover
-    db connections from poorly written applications which
-    fail to close a connection.
+    removeAbandonedTimout.
+    If set to true a connection is considered abandoned and eligible for
+    removal if it has been idle longer than the removeAbandonedTimeout.
+    Setting this to true can recover db connections from poorly written
+    applications which fail to close a connection.
+    If you have enabled "removeAbandoned" then it is possible that a
+    connection is reclaimed by the pool because it is considered to be
+    abandoned. This mechanism is triggered on borrowObject (ie in OJB when
+    a PersistenceBroker gets a Connection) and:
+     (numIdle < 2) and (numActive > maxActive - 3).
+    The abandoned object eviction takes place before normal borrowObject
+    logic (there is no asynch evictor thread like for testWhileIdle).
+    For example maxActive=20 and 18 active connections and 1 idle connection
+    would trigger the "removeAbandoned". But only the active connections that
+    aren't used for more then "removeAbandonedTimeout" seconds are removed.
+    Traversing a resultset doesn't count as being used.
+
+    removeAbandonedTimeout [only for ConnectionFactoryDBCPImpl] (default=300)
+    Timeout in seconds before an abandoned connection can be removed.
+
+    logAbandoned [only for ConnectionFactoryDBCPImpl] (default=false)
+    Flag to log stack traces for application code which abandoned a
+    Statement or Connection.
+    Logging of abandoned Statements and Connections adds overhead for every
+    Connection open or new Statement because a stack trace has to be
+    generated.
+
+    Custom attributes:
+    <attribute attribute-name="fetchSize" attribute-value="(int)"/>
+
+        Sets a hint in the JDBC driver not to fetch more than
+        specified number of rows per server round trip for
+        any ResultSet.
+        Setttings different than the default (0) are especially
+        useful to reduce memory footprint when using drivers
+        that defaults to not using server-side cursors and
+        retrieves all rows to the JDBC client-side driver buffer.
+        PostgreSQL JDBC driver is a well-known example of this.
+        Many JDBC drivers will ignore this hint.
+
+    <attribute attribute-name="jdbc.(driver-specific attribute)"
+        attribute-value="(value)"/>
+
+        All attributes with names starting with "jdbc." will be
+        passed (without jdbc. prefix) to the JDBC DriverManager
+        when creating new Connection objects.
+        (Ignored when acquiring Connection objects through
+         JNDI DataSource lookup or in managed environments.)
+
+     <attribute attribute-name="dbcp.(Commons DBCP-options)"
+         attribute-value="(value)"/>
+
+         If using the ConnectionFactoryDBCPImpl (set in OJB.properties),
+         all parameters starting with "dbcp." will be made available
+         (without dbcp. prefix) to the ConnectionFactory for
+         configuring Commons DBCP accordingly.
+
+         Currently the following DBCP attributes are used:
+
+            dbcp.poolPreparedStatements (default=false)
+                Enable prepared statement pooling for this pool.
+
+            dbcp.maxOpenPreparedStatements (default=0/unlimited)
+                The maximum number of open statements that can be
+                allocated from the statement pool at the same time,
+                or zero for no limit.
+
+             dbcp.accessToUnderlyingConnectionAllowed (default=false)
+                Controls if the DBCP PoolGuard allows access to the underlying
+                connection from the JDBC-driver.
+
+                Only use when you need direct access to driver specific
+                extentions.
+
+                NOTE: Do not close the underlying connection, only the
+                original one.
 
 -->
 <!ATTLIST connection-pool
     maxActive                       CDATA #IMPLIED
+    minIdle                         CDATA #IMPLIED
     maxIdle                         CDATA #IMPLIED
     maxWait                         CDATA #IMPLIED
     minEvictableIdleTimeMillis      CDATA #IMPLIED
@@ -283,9 +362,9 @@
     whenExhaustedAction             (0|1|2) #IMPLIED
     validationQuery                 CDATA #IMPLIED
 
-    logAbandoned                    (true|false) #IMPLIED
     removeAbandoned                 (true|false) #IMPLIED
     removeAbandonedTimeout          CDATA #IMPLIED
+    logAbandoned                    ( true | false ) #IMPLIED
 >
 
 
@@ -380,7 +459,10 @@
 	This class will be used as the RowReader implementation used to
 	materialize instances of the persistent class.
 
-	The accept-locks attribute specifies whether implicit locking should
+    The extends attribute is deprecated and will be removed or reintroduced
+    with changed funcitonality in future. DON'T USE IT!
+
+	DEPRECATED. The accept-locks attribute specifies whether implicit locking should
 	propagate to this class.  Currently relevant for the ODMG layer only.
 
 	The optional initialization-method specifies a no-argument instance
@@ -400,7 +482,7 @@
 <!ATTLIST class-descriptor
 	class ID #REQUIRED
 	isolation-level (read-uncommitted | read-committed | repeatable-read |
-	                 serializable | optimistic | none) ""
+	                 serializable | optimistic | none) #IMPLIED
 	proxy CDATA #IMPLIED
 	proxy-prefetching-limit CDATA #IMPLIED
 	schema CDATA #IMPLIED
@@ -687,7 +769,8 @@
 	As this is an IDREF there must be a class-descriptor for this class
 	in the repository too.
 
-	The orderby attribute may specify a field of the element class.
+	DEPRECATED, please use the 'orderby'-element. The orderby attribute may
+	specify a field of the element class.
 	The Collection or Array will be sorted according to the specified attribute.
 	The sort attribute may be used to specify ascending or descending order for
 	this operation.
@@ -715,12 +798,12 @@
 	The auto-update attribute specifies whether OJB automatically stores
 	the referenced objects on storing the persistent object or not or only link.
 	This attribute must be set to 'false' if using the OTM or JDO layer.
-    For ODMG it must be 'none' (since OJB 1.0.2). More info see OJB documentation.
+    Allowed ODMG settings please see OJB documentation.
 
 	The auto-delete attribute specifies whether OJB automatically deletes
 	the referenced objects on deleting the persistent object or not.
 	This attribute must be set to 'false' if using the OTM or JDO layer.
-    For ODMG it must be 'none' (since OJB 1.0.2). More info see OJB documentation.
+    Allowed ODMG settings please see OJB documentation.
 
 	The otm-dependent attribute specifies whether the OTM layer automatically
     creates collection elements that were included into the collectionelements
@@ -948,4 +1031,3 @@
 <!ATTLIST constant-argument
     value CDATA #REQUIRED
 >
-



Mime
View raw message