You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bd...@apache.org on 2005/09/28 10:10:38 UTC

svn commit: r292140 [3/4] - in /cocoon/whiteboard/example-apps/bricks-cms: ./ lib/commons/ lib/derby/ lib/derby/derby-10.1.1.0/ lib/hivemind/ lib/hivemind/hivemind-1.1-rc-1/ lib/hivemind/javassist-3.0/ lib/ojb/ lib/ojb/db-ojb-1.0.3/ lib/servlet/ src/bu...

Added: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbConnectionFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbConnectionFactory.java?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbConnectionFactory.java (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbConnectionFactory.java Wed Sep 28 01:08:23 2005
@@ -0,0 +1,62 @@
+/*
+    Copyright 2005 The 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.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.cms.ojb;
+
+import org.apache.ojb.broker.accesslayer.ConnectionFactory;
+import org.apache.ojb.broker.accesslayer.LookupException;
+import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
+import org.apache.cocoon.apps.bricks.cms.componentmanager.ApplicationComponentManager;
+
+import java.sql.Connection;
+
+/** ConnectionFactory for the OJB library. */
+
+public class OjbConnectionFactory implements ConnectionFactory {
+
+    /** OJB ConnectionFactory requirement */
+    public Connection lookupConnection(JdbcConnectionDescriptor jdbcConnectionDescriptor) throws LookupException {
+        Connection c = null;
+        final String alias = jdbcConnectionDescriptor != null ? jdbcConnectionDescriptor.getJcdAlias() : null;
+        try {
+            c = getConnectionProvider().lookupConnection(alias);
+        } catch(Exception e) {
+            throw new LookupException("OjbConnectionFactory couldn't get a Connection",e);
+        }
+
+        return c;
+    }
+
+    /** OJB ConnectionFactory requirement */
+    public void releaseConnection(JdbcConnectionDescriptor jdbcConnectionDescriptor, Connection connection) {
+        try {
+            getConnectionProvider().releaseConnection(connection);
+        } catch(Exception e) {
+            throw new Error("Exception in OjbConnectionFactory.releaseConnection:" + e);
+        }
+    }
+
+    /** get the DbConnectionProvider from the application component manager */
+    private DbConnectionProvider getConnectionProvider() throws Exception {
+        return (DbConnectionProvider) ApplicationComponentManager.getInstance().getService(DbConnectionProvider.class);
+    }
+
+    /** OJB ConnectionFactory requirement */
+    public void releaseAllResources() {
+        // TODO release all open Connections? would need to keep track of them, or maybe the
+        // DataSource can do this?
+    }
+}

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbConnectionFactory.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbTransactionHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbTransactionHelper.java?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbTransactionHelper.java (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbTransactionHelper.java Wed Sep 28 01:08:23 2005
@@ -0,0 +1,69 @@
+/*
+    Copyright 2005 The 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.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.cms.ojb;
+
+import org.apache.ojb.broker.PersistenceBrokerFactory;
+import org.apache.ojb.broker.PersistenceBroker;
+
+public abstract class OjbTransactionHelper {
+    /**
+     * store a result provided by runTransaction
+     */
+    private Object m_result;
+
+    // TODO should be able to use the defaultPersistenceBroker instead of this,
+    // but it doesn't seem to work
+    public static final String PB_KEY = "bricks-cms";
+
+    /**
+     * get a PersistenceBroker and call runTransaction to do the work
+     */
+    public void execute() throws Exception {
+        PersistenceBroker broker = null;
+        try {
+            broker = PersistenceBrokerFactory.createPersistenceBroker(PB_KEY,null,null);
+            broker.beginTransaction();
+            runTransaction(broker);
+            broker.commitTransaction();
+        } catch (Exception e) {
+            if (broker != null) broker.abortTransaction();
+            throw e;
+        } finally {
+            if (broker != null) broker.close();
+        }
+    }
+
+    /**
+     * set result
+     */
+    protected void setResult(Object o) {
+        m_result = o;
+    }
+
+    /**
+     * get result
+     */
+    public Object getResult() {
+        return m_result;
+    }
+
+    /**
+     * called once broker is initialized and transaction started, must
+     * be implemented to do the actual work, use setResult to store data
+     */
+    protected abstract void runTransaction(PersistenceBroker broker) throws Exception;
+}

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/OjbTransactionHelper.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/impl/OjbAdaptor.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/impl/OjbAdaptor.java?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/impl/OjbAdaptor.java (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/impl/OjbAdaptor.java Wed Sep 28 01:08:23 2005
@@ -0,0 +1,101 @@
+/*
+    Copyright 2005 The 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.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.cms.ojb.impl;
+
+import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.commons.logging.Log;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import org.apache.cocoon.apps.bricks.cms.util.NullAttributeException;
+import org.apache.cocoon.apps.bricks.cms.ojb.DbConnectionProvider;
+
+public class OjbAdaptor implements DbConnectionProvider {
+    private final BasicDataSource ds = new BasicDataSource();
+    private Log log;
+    public static final String OJB_PROPS = "OJB.properties";
+    public static final String OJB_PROPS_URL = "ojb-bricks-cms.properties";
+
+    /** initialize OJB to use Connections provided by this class
+     *  (set... methods must be called to set connection parameters)
+     * */
+    public OjbAdaptor() {
+        // OJB config is defined in that file
+        System.setProperty(OJB_PROPS,OJB_PROPS_URL);
+    }
+
+    /** called by component manager when this is created */
+    public void setLog(Log log) {
+        this.log = log;
+        if(log.isDebugEnabled()) {
+            log.debug(OJB_PROPS_URL + " has been set to '" + OJB_PROPS_URL + "'");
+        }
+    }
+
+    /** @see BasicDataSource#setDriverClassName */
+    public void setDriverClassName(String cn) {
+        ds.setDriverClassName(cn);
+    }
+
+    /** @see BasicDataSource#setUrl */
+    public void setUrl(String url) {
+        ds.setUrl(url);
+    }
+
+    /** @see BasicDataSource#setUsername */
+    public void setUsername(String un) {
+        ds.setUsername(un);
+    }
+
+    /** @see BasicDataSource#setPassword */
+    public void setPassword(String pw) {
+        ds.setPassword(pw);
+    }
+
+    /** get a Connection given its alias */
+    public Connection lookupConnection(String alias) throws SQLException {
+        checkThis();
+        // TODO check alias?? we ignore it for now
+        if(log.isDebugEnabled()) {
+            log.debug("OjbAdaptor: getting connection");
+        }
+        return ds.getConnection();
+    }
+
+    /** release given connection */
+    public void releaseConnection(Connection connection) throws SQLException {
+        checkThis();
+        if(log.isDebugEnabled()) {
+            log.debug("OjbAdaptor: releasing connection");
+        }
+        connection.close();
+    }
+
+    private void checkThis() throws SQLException {
+        try {
+            NullAttributeException.check(log,"log");
+        } catch(Exception e) {
+            throw new SQLException("OjbAdaptor config error: " + e);
+        }
+
+        if(log.isDebugEnabled()) {
+            log.debug("OJB properties config:" + OJB_PROPS + "=" + System.getProperty(OJB_PROPS));
+        }
+    }
+
+}

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/ojb/impl/OjbAdaptor.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/util/NullAttributeException.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/util/NullAttributeException.java?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/util/NullAttributeException.java (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/util/NullAttributeException.java Wed Sep 28 01:08:23 2005
@@ -0,0 +1,37 @@
+/*
+    Copyright 2005 The 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.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.cms.util;
+
+public class NullAttributeException extends Exception {
+    public static final String IS_NULL = " is null";
+    public static final String IS_NULL_OR_EMPTY = " is null or empty";
+
+    NullAttributeException(String reason) {
+        super(reason);
+    }
+
+    /** Throw one of these if given parameter is null */
+    public static void check(Object what,String description) throws NullAttributeException {
+        if(what==null) throw new NullAttributeException(description + IS_NULL);
+    }
+
+    /** Throw one of these if given String is null or empty */
+    public static void checkNotEmpty(String what,String description) throws NullAttributeException {
+        if(what==null) throw new NullAttributeException(description + IS_NULL);
+        if(what.trim().length()==0) throw new NullAttributeException(description + IS_NULL_OR_EMPTY);
+    }
+}

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/util/NullAttributeException.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby-db-schema.txt
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby-db-schema.txt?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby-db-schema.txt (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby-db-schema.txt Wed Sep 28 01:08:23 2005
@@ -0,0 +1,42 @@
+-- Copyright 2005 The 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.
+-- You may obtain a copy of the License at
+
+-- -- http://www.apache.org/licenses/LICENSE-2.0
+
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+-- bricks-cms database schema, for the derby embedded database server
+-- might need some changes to work with other databases
+
+-- This is needed to store the OJB HighLowSequence object state
+CREATE TABLE OJB_HL_SEQ
+(
+    TABLENAME varchar (175) NOT NULL,
+    FIELDNAME varchar (70) NOT NULL,
+    MAX_KEY integer,
+    GRAB_SIZE integer,
+    VERSION integer,
+    PRIMARY KEY (TABLENAME,FIELDNAME)
+);
+
+-- Store our documents
+-- To insert a test document use:
+--  insert into document values(1,1,'First document','Content of document 1',timestamp('2005-01-01 00:00:00'),timestamp('2005-01-01 00:00:00'));
+--
+CREATE TABLE document (
+    doc_id INTEGER NOT NULL,
+    ojb_version INTEGER NOT NULL,
+	title CHAR(120),
+	content LONG VARCHAR,
+	ts_created TIMESTAMP,
+	ts_modified TIMESTAMP,
+
+	primary key(doc_id)
+);
\ No newline at end of file

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby-db-schema.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby.properties
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby.properties?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby.properties (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby.properties Wed Sep 28 01:08:23 2005
@@ -0,0 +1,25 @@
+##------------------------------------------------------------------------------
+#  Copyright 2005 The 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.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+##------------------------------------------------------------------------------
+#   Derby embedded server configuration
+##------------------------------------------------------------------------------
+# $Id$
+##------------------------------------------------------------------------------
+
+# This is required under macosx to work around a problem in
+# the macosx Java VM, see 
+# http://mail-archives.apache.org/mod_mbox/db-derby-dev/200501.mbox/%3C2D46214F-6BF4-11D9-A5FE-000A95928944@sun.com%3E
+derby.storage.fileSyncTransactionLog=true
+

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/misc/derby/derby.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/hivemind/hivemodule.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/hivemind/hivemodule.xml?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/hivemind/hivemodule.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/hivemind/hivemodule.xml Wed Sep 28 01:08:23 2005
@@ -0,0 +1,54 @@
+<!--
+  Copyright 2005 The 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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+  Hivemind components configuration for bricks-cms
+  $Id$
+-->
+<module id="brickscms" version="1.0.0">
+
+  <contribution configuration-id="hivemind.EagerLoad">
+    <load service-id="OjbAdaptor"/>
+  </contribution>
+
+  <!-- This is used to test access to components provided by hivemind -->
+  <service-point id="ComponentManagerPing" interface="org.apache.cocoon.apps.bricks.cms.componentmanager.ComponentManagerPing">
+    <invoke-factory service-id="hivemind.BuilderFactory">
+      <construct class="org.apache.cocoon.apps.bricks.cms.componentmanager.impl.ComponentManagerPingImpl" autowire-services="true">
+        <set property="message" value="Hello from the ComponentManagerPing component"/>
+      </construct>
+    </invoke-factory>
+  </service-point>
+
+  <!-- Setup OJB and define its JDBC data source -->
+  <service-point id="OjbAdaptor" interface="org.apache.cocoon.apps.bricks.cms.ojb.DbConnectionProvider">
+    <invoke-factory service-id="hivemind.BuilderFactory">
+      <construct class="org.apache.cocoon.apps.bricks.cms.ojb.impl.OjbAdaptor" autowire-services="true">
+        <set property="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+        <set property="url" value="jdbc:derby:bricks-cms"/>
+      </construct>
+    </invoke-factory>
+  </service-point>
+
+  <!-- OJB ObjectStore -->
+  <service-point id="OjbObjectStore" interface="org.apache.cocoon.apps.bricks.cms.objectstore.ObjectStore">
+    <invoke-factory service-id="hivemind.BuilderFactory">
+      <construct class="org.apache.cocoon.apps.bricks.cms.objectstore.impl.OjbObjectStore" autowire-services="true">
+      </construct>
+    </invoke-factory>
+  </service-point>
+
+</module>
\ No newline at end of file

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/misc/hivemind/hivemodule.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/bricks-ojb-repository.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/bricks-ojb-repository.xml?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/bricks-ojb-repository.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/bricks-ojb-repository.xml Wed Sep 28 01:08:23 2005
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 2005 The 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.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+  OJB repository definition for bricks-cms, based on the OJB template repository.xml
+  $Id$
+-->
+
+<!DOCTYPE descriptor-repository PUBLIC
+  "-//Apache Software Foundation//DTD OJB Repository//EN"
+  "repository.dtd"
+  [
+
+    <!ENTITY internal SYSTEM "repository_internal.xml">
+    ]>
+
+<descriptor-repository
+  version="1.0"
+  isolation-level="read-uncommitted"
+  proxy-prefetching-limit="50">
+
+  <jdbc-connection-descriptor
+    jcd-alias="bricks-cms"
+    default-connection="true">
+
+    <!--
+      This sequence manager uses the OJB_HL_SEQ table to store its state (see ojb-internal-repository.xml),
+      so if any field is set to autoincrement this table must be created.
+    -->
+    <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
+      <attribute attribute-name="grabSize" attribute-value="20"/>
+      <attribute attribute-name="globalSequenceId" attribute-value="true"/>
+    </sequence-manager>
+
+  </jdbc-connection-descriptor>
+
+  <!-- include ojb internal mappings here -->
+  &internal;
+
+  <!-- OJB mapping of our BricksDocument object -->
+  <class-descriptor class="org.apache.cocoon.apps.bricks.cms.data.BricksDocument" table="document">
+
+    <!-- Primary key, value will be assigned by the OJB SequenceManager -->
+    <field-descriptor
+      name="id"
+      column="doc_id"
+      jdbc-type="INTEGER"
+      primarykey="true"
+      autoincrement="true"
+      />
+
+    <!-- Version field maintained by OJB, for optimistic locking -->
+    <field-descriptor
+      name="persistentStorageVersion"
+      column="ojb_version"
+      jdbc-type="INTEGER"
+      locking="true"
+      />
+
+    <!-- other data fields -->
+    <field-descriptor name="title" column="title" jdbc-type="VARCHAR"/>
+    <field-descriptor name="content" column="content" jdbc-type="VARCHAR"/>
+    <field-descriptor name="created" column="ts_created" jdbc-type="TIMESTAMP"/>
+    <field-descriptor name="lastModified" column="ts_modified" jdbc-type="TIMESTAMP"/>
+
+  </class-descriptor>
+
+</descriptor-repository>

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/bricks-ojb-repository.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/ojb-bricks-cms.properties
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/ojb-bricks-cms.properties?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/ojb-bricks-cms.properties (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/ojb-bricks-cms.properties Wed Sep 28 01:08:23 2005
@@ -0,0 +1,456 @@
+#<!--
+#/* Copyright 2002-2004 The 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.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+#-->
+# OJB.properties -- configuration of the OJB runtime environment
+# Version: 1.0
+# (c) 2001, 2002, 2003 Apache Software Foundation
+# Author: Thomas Mahler and many others
+# @version $Id$
+#
+#----------------------------------------------------------------------------------------
+# repository file settings
+#----------------------------------------------------------------------------------------
+# The repositoryFile entry tells OJB to use this file as as its standard mapping
+# repository. The file is looked up from the classpath.
+#
+repositoryFile=bricks-ojb-repository.xml
+#
+# If the useSerializedRepository entry is set to true, OJB tries to load a
+# serialized version of the repository for performance reasons.
+# if set to false, OJB always loads the xml file.
+# Setting this flag to true will accelerate the startup sequence of OJB.
+# If set to true changes to the repository.xml file will only be detected
+# after maually deleting the repository.xml.serialized file.
+useSerializedRepository=false
+#
+# If Repository serialization is used the entry serializedRepositoryPath defines the
+# directory where the Repository is written to and read from.
+# this entry is used only when the useSerializedRepository flag is set to true
+#
+serializedRepositoryPath=.
+#
+#----------------------------------------------------------------------------------------
+# PersistenceBrokerFactory / PersistenceBroker
+#----------------------------------------------------------------------------------------
+# The PersistenceBrokerFactoryClass entry decides which concrete
+# PersistenceBrokerFactory implemention is to be used.
+PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
+# If in managed environment *only* the PB-api was used it's recommended to use this factory
+# to enable the PersistenceBroker instances to participate in the JTA transaction. This makes
+# e.g. PBStateListener work properly in managed environments.
+#PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
+#
+#
+# The PersistenceBrokerClass entry decides which concrete PersistenceBroker
+# implementation is to be served by the PersistenceBrokerFactory.
+# This is the singlevm implementation:
+PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
+#
+# This is an implementation that uses Prevayler (prevayler.sf.net) as the persistent storage.
+# Using this implementation OJB works as a simple OODBMS
+#PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
+#
+#----------------------------------------------------------------------------------------
+# PersistenceBroker pool
+#----------------------------------------------------------------------------------------
+# PersistenceBroker pool configuration
+# This pool uses the jakarta-commons-pool api.
+# There you can find things described in detail.
+#
+# maximum number of brokers that can be borrowed from the
+# pool at one time. When non-positive, there is no limit.
+maxActive=100
+#
+# controls the maximum number of brokers that can sit idle in the
+# pool (per key) at any time. When non-positive, there is no limit
+maxIdle=-1
+#
+# max time block to get broker instance from pool, after that exception is thrown.
+# When non-positive, block till last judgement
+maxWait=2000
+#
+# indicates how long the eviction thread should sleep before "runs" of examining
+# idle objects. When non-positive, no eviction thread will be launched.
+timeBetweenEvictionRunsMillis=-1
+#
+# specifies the minimum amount of time that an broker may sit idle
+# in the pool before it is eligable for eviction due to idle time.
+# When non-positive, no object will be dropped from the pool due
+# to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
+minEvictableIdleTimeMillis=1000000
+#
+# specifies the behaviour of the pool when broker capacity is
+# exhausted (see maxActive above)
+# 0 - fail
+# 1 - block
+# 2 - grow
+whenExhaustedAction=0
+#
+#
+#----------------------------------------------------------------------------------------
+# ConnectionFactory / Default ConnectionPool
+#----------------------------------------------------------------------------------------
+# The ConnectionFactoryClass entry determines which kind of ConnectionFactory
+# is to be used within org.apache.ojb as connection factory.
+# A ConnectionFactory is responsible for creating
+# JDBC Connections. Current version ships four implementations:
+#
+# 1. ConnectionFactoryNotPooledImpl
+#    No pooling, no playing around.
+#    Every connection request returns a new connection,
+#    every connection release close the connection.
+# 2. ConnectionFactoryPooledImpl
+#    This implementation supports connection pooling.
+# 3. ConnectionFactoryDBCPImpl
+#    Using the jakarta-DBCP api for connection management, support
+#    connection- and prepared statement-pooling, abandoned connection handling.
+# 4. ConnectionFactoryManagedImpl
+#    Connection factory for use within managed environments - e.g. JBoss.
+#    Every obtained DataSource was wrapped within OJB (and ignore
+#    e.g. con.commit() calls within OJB).
+#    Use this implementation e.g if you use Datasources from an application server.
+#
+# Use the OJB performance tests to decide, which implementation is best for you.
+# The proper way of obtaining a connection is configured in
+# JDBCConnectionDescriptor entries in the repository.xml file.
+# If want a more fine grained control of each connection pool used by OJB,
+# take a look at the repository.dtd, there was a possibility to override
+# this default connection factory entry in each JDBCConnectionDescriptor.
+#
+ConnectionFactoryClass=org.apache.cocoon.apps.bricks.cms.ojb.OjbConnectionFactory
+
+##
+#
+#----------------------------------------------------------------------------------------
+# ConnectionManager
+#----------------------------------------------------------------------------------------
+# The ConnectionManagerClass entry defines the ConnectionManager implemementation to be used
+ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# SqlGenerator
+#----------------------------------------------------------------------------------------
+# The SqlGeneratorClass entry defines the SqlGenerator implemementation to be used
+SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# IndirectionHandler
+#----------------------------------------------------------------------------------------
+# 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
+#
+#----------------------------------------------------------------------------------------
+# ListProxy
+#----------------------------------------------------------------------------------------
+# The ListProxyClass entry defines the proxy class to be used for collections that
+# implement the java.util.List interface.
+#
+ListProxyClass=org.apache.ojb.broker.core.proxy.ListProxyDefaultImpl
+#
+#----------------------------------------------------------------------------------------
+# SetProxy
+#----------------------------------------------------------------------------------------
+# The SetProxyClass entry defines the proxy class to be used for collections that
+# implement the java.util.Set interface.
+#
+SetProxyClass=org.apache.ojb.broker.core.proxy.SetProxyDefaultImpl
+#
+#----------------------------------------------------------------------------------------
+# CollectionProxy
+#----------------------------------------------------------------------------------------
+# The CollectionProxyClass entry defines the proxy class to be used for collections that
+# do not implement java.util.List or java.util.Set.
+#
+CollectionProxyClass=org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl
+#
+#----------------------------------------------------------------------------------------
+# StatementManager
+#----------------------------------------------------------------------------------------
+# The StatementManagerClass entry defines the StatementManager implemementation to be used
+StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
+#
+#
+#----------------------------------------------------------------------------------------
+# StatementsForClass
+#----------------------------------------------------------------------------------------
+# The StatementsForClassClass entry defines the StatementsForClass implemementation to be used
+# to implement cached statements.
+StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# JdbcAccess
+#----------------------------------------------------------------------------------------
+# The JdbcAccessClass entry defines the JdbcAccess implemementation to be used
+JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# RowReader
+#----------------------------------------------------------------------------------------
+# Set the standard RowReader implementation. It is also possible to specify the
+# RowReader on class-descriptor level.
+RowReaderDefaultClass=org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# Object cache
+#----------------------------------------------------------------------------------------
+# NOTE: ObjectCacheClass declaration in OJB.properties file was removed (since OJB 1.0.2).
+# The concrete ObjectCache implementation has to specified in the repository file using
+# the 'object-cache' element. See documentation for more detailed info.
+#
+# This property is only relevant if the per class-descriptor object-cache
+# declaration was used in conjunction with metadata runtime changes.
+# If set 'flase' the class name of the object is used
+# to find a per class ObjectCache implementation.
+# If set 'true' the ObjectCacheDescriptor instance is used as key to
+# find a per class ObjectCache, this enables to use different ObjectCache
+# instances for the same class.
+descriptorBasedCaches=false
+#
+# NOTE: CacheFilters declaration was removed (since OJB 1.0.2). To exclude
+# object of whole packages from being cache use a specific property in
+# cache declaration - see caching guide in reference docs.
+#----------------------------------------------------------------------------------------
+# Locking
+#----------------------------------------------------------------------------------------
+# The 'LockManagerClass' specify the internal used LockManager implementation.
+# If OJB is running in distributed environment it is recommended to use the remote
+# lock manager. It guarantees to provide Lockmanagement across multiple JVM's.
+#
+# The deprecated odmg locking implementation. Needs enabled 'LockMapClass' too.
+#@deprecated LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
+# A servlet based lock implementation for distributed environments, needs enabled
+# property 'LockServletUrl' too.
+#LockManagerClass=org.apache.ojb.broker.locking.LockManagerRemoteImpl
+# Lock manager implementation using apache's commons-transaction locking api
+#LockManagerClass=org.apache.ojb.broker.locking.LockManagerCommonsImpl
+LockManagerClass=org.apache.ojb.broker.locking.LockManagerInMemoryImpl
+#
+# The LockServletUrl entry points to the Lockserver servlet.
+# This Servlet is addressed by all distributed JVMs if the RemoteLockMapImpl
+# is used.
+#LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
+#
+# The LockTimeout entry defines the maximum time in milliseconds
+# that a lock may be hold. Defaults to 60000 = 1 minute
+LockTimeout=60000
+#
+#
+# ------ deprecated ------
+# The LockMapClass entry tells OJB which concrete LockMap
+# implementation is to be used.
+# If OJB is running on multiple concurrent clients it is recommended
+# to use the LockMapRemoteImpl. It guarantees to provide
+# Lockmanagement across multiple JVMs.
+# This Implemenation relies on a Servlet based Lockserver. To use it you have to
+# deploy the ojb-lockserver.war into a Servlet engine.
+# and you have to set the Property LockServletUrl to point to this servlet.
+# (see LockServletUrl section below).
+# If OJB is running in a single JVM (e.g. in a desktop app, or in a servlet
+# engine) it is save to use the LockMapInMemoryImpl. Using it will result
+# in a large performance gain.
+# These settings are deprecated, only needed in conjunction with the old odmg 'LockManagerClass'
+# @deprecated LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
+# @deprecated LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# OQL / SQL settings
+#----------------------------------------------------------------------------------------
+# The OqlCollectionClass entry defines the collection type returned
+# from OQL queries. By default this value is set to a List.
+# This will be good for most situations. If you need the additional features of
+# DList (DList itself is persistable, support of predicate) comment in the DList
+# implementation. See also section 'ODMG settings' (DListClass entry).
+# Using DLists for large resultsets may be bad for application performance.
+# For these scenarios you can use ArrayLists or Vectors.
+# Important note: the collections class to be used MUST implement the
+# interface 'org.apache.ojb.broker.ManageableCollection'.
+#
+OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList
+# OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl
+# OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableVector
+#
+# The SqlInLimit entry limits the number of values in IN-sql statement,
+# -1 for no limits. This hint is used in Criteria.
+SqlInLimit=200
+#
+#
+#----------------------------------------------------------------------------------------
+# ODMG-api settings
+#----------------------------------------------------------------------------------------
+# Specify the used base class for ODMG API
+# - ImplementationDefaultImpl is the default class
+# - ImplementationJTAImpl is for use in managed environments like J2EE conform
+# Application Server
+#
+ImplementationClass=org.apache.ojb.odmg.ImplementationImpl
+#ImplementationClass=org.apache.ojb.odmg.ImplementationJTAImpl
+#
+# Specify the used tx handling.
+# - LocalTxManager use if you want the transaction to be associated by a thread
+# - JTATxManager use if you want the transaction to be associated via the Transaction
+# manager that is in your application server.
+#
+OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
+#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
+# 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.
+ImplicitLocking=true
+#ImplicitLocking=false
+#
+# The LockAssociations entry defines the behaviour for the OJB
+# 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.
+#LockAssociations=READ
+LockAssociations=WRITE
+#
+#
+# Used ODMG collection implementation classes
+# (e.g. when do a Implementation#newDlist() call)
+#
+# org.odmg.DList implementation class
+DListClass=org.apache.ojb.odmg.collections.DListImpl
+#
+# org.odmg.DArray implementation class
+DArrayClass=org.apache.ojb.odmg.collections.DListImpl
+#
+# org.odmg.DMap implementation class
+DMapClass=org.apache.ojb.odmg.collections.DMapImpl
+#
+# org.odmg.DBag implementation class
+DBagClass=org.apache.ojb.odmg.collections.DBagImpl
+#
+# org.odmg.DSet implementation class
+DSetClass=org.apache.ojb.odmg.collections.DSetImpl
+#
+#
+#----------------------------------------------------------------------------------------
+# Meta data / mapping settings
+#----------------------------------------------------------------------------------------
+# The PersistentFieldClass property defines the implementation class
+# for PersistentField attributes used in the OJB MetaData layer.
+# By default the best performing attribute/refection based implementation
+# is selected (PersistentFieldDirectAccessImpl).
+#
+# - PersistentFieldDirectAccessImpl
+#   is a high-speed version of the access strategies.
+#   It does not cooperate with an AccessController,
+#   but accesses the fields directly. Persistent
+#   attributes don't need getters and setters
+#   and don't have to be declared public or protected
+# - PersistentFieldPrivilegedImpl
+#   Same as above, but does cooperate with AccessController and do not
+#   suppress the java language access check (but is slow compared with direct access).
+# - PersistentFieldIntrospectorImpl
+#   uses JavaBeans compliant calls only to access persistent attributes.
+#   No Reflection is needed. But for each attribute xxx there must be
+#   public getXxx() and setXxx() methods.
+# - PersistentFieldDynaBeanAccessImpl
+#   implementation used to access a property from a
+#   org.apache.commons.beanutils.DynaBean.
+# - PersistentFieldAutoProxyImpl
+#   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.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.PersistentFieldAutoProxyImpl
+#PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanImplNew
+#(DynaBean implementation does not support nested fields)
+#
+#----------------------------------------------------------------------------------------
+# Component Intercepting for Profiling and Tracing
+#----------------------------------------------------------------------------------------
+# By enabling an InterceptorClass all OJB components will use
+# this Interceptor. Interceptors allow advanced tracing and Profiling
+# of all component method calls.
+# This is currently an experimental feature useful only for OJB kernel developers.
+#
+#InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor
+#
+#----------------------------------------------------------------------------------------
+# Transaction Management and assocation
+#----------------------------------------------------------------------------------------
+# (optional, only used when OJB runs within managed environments)
+# To praticipate in JTA transaction OJB needs access to the underlying transaction manager.
+# The TransactionManager is acquired in different ways dependent on the application server.
+# The JTATransactionManagerClass property allows you to specify the class that implements
+# the proper behaviour for finding the transaction manager. Only use when OJBTxManagerClass
+# is set to a factory that uses the application server transaction manager
+# (org.apache.ojb.odmg.JTATxManager)
+#
+# JBoss Transaction Manager Factory
+JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JBossTransactionManagerFactory
+# Weblogic Transaction Manager Factory
+#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.WeblogicTransactionManagerFactory
+# WebSphere transaction manager factory
+#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.WebSphereTransactionManagerFactory
+# Orion transaction manager factory
+#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.OrionTransactionManagerFactory
+# SunOne transaction manager factory
+#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.SunOneTransactionManagerFactory
+# JOnAs transaction manager factory
+#JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JOnASTransactionManagerFactory
+#
+#
+#----------------------------------------------------------------------------------------
+# Logging settings are now in their own file, OJB-logging.properties
+#----------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------------
+# End of OJB.properties file
+#----------------------------------------------------------------------------------------

Propchange: cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/ojb-bricks-cms.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/repository.dtd
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/repository.dtd?rev=292140&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/repository.dtd (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/misc/ojb/repository.dtd Wed Sep 28 01:08:23 2005
@@ -0,0 +1,951 @@
+<!-- @version $Id: repository.dtd,v 1.1 2005/09/26 14:39:13 bdelacretaz Exp $ -->
+<!--
+#/* 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.
+# * You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+-->
+<!--
+	ObJectRelationalBridge - Bridging Java objects and relational dabatases
+	This DTD describes the grammar of the Descriptor repository
+	Author: Thomas Mahler, (c) 2000, 2001, 2002, 2003
+  -->
+
+<!--
+	The descriptor-repository is the root element of a
+    repository.xml file.
+	It consists of one jdbc-connection-descriptor and at least one
+	class-descriptor element.
+
+	The attribute element allows to add custom attributes.
+
+    The jdbc-connection-descriptor element specifies the default jdbc
+	connection for the repository.
+
+	class-descriptor elements specify o/r mapping information for
+	persistent classes.
+  -->
+<!ELEMENT descriptor-repository (documentation?, attribute*,
+        jdbc-connection-descriptor*, class-descriptor*)>
+
+<!--
+	The version attribute is used to bind a repository.xml
+    file to a given version of this dtd. This will help to
+    avoid versions conflicts.
+
+    The isolation-level attribute defines the default locking isolation level used
+    by OJB's pessimistic locking api. All jdbc-connection-descriptor or class-descriptor
+    that do not define a specific isolation level will use this.
+    Note: This does NOT touch the jdbc-level of the connection.
+  -->
+<!ATTLIST descriptor-repository
+	version (1.0) #REQUIRED
+	isolation-level (read-uncommitted | read-committed | repeatable-read |
+	                 serializable | optimistic | none) "read-uncommitted"
+	proxy-prefetching-limit CDATA "50"
+>
+
+<!--
+	The documentation element can be used to store arbitrary
+	information on all repository entries.
+-->
+<!ELEMENT documentation (#PCDATA)>
+
+<!--
+	The attribute element allows to add custom attributes.
+
+    The jdbc-connection-descriptor element specifies the a jdbc
+	connection for the repository.
+
+    The object-cache element specifies the object-cache implementation
+    class associated with this class.
+
+	A connection-pool element may be used to define connection pool
+	properties for the specified JDBC connection.
+
+    A sequence-manager element may be used to
+    define which sequence manager implementation should be used within
+    the defined connection.
+  -->
+<!ELEMENT jdbc-connection-descriptor (documentation?, attribute*,
+                object-cache?, connection-pool?, sequence-manager?)>
+
+<!--
+    The jcdAlias attribute is a shortcut name for the defined connection
+    descriptor. OJB use jcdAlias as key for the defined connections.
+
+    The default-connection attribute used to define if this connection
+    should used as default connection with OJB. You could define only
+    one connection as default connection. It is also possible to set
+    the default connection at runtime using
+    PersistenceBrokerFactory#setDefaultKey(...) method.
+    If set 'true' you could use on PB-api a shortcut-method of the
+    PersistenceBrokerFactory to lookup PersistenceBroker instances.
+
+    The platform attribute is used to define the specific RDBMS
+    Platform. This attribute corresponds to a
+	org.apache.ojb.broker.platforms.PlatformXXXImpl class.
+
+	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
+    using OJB within JBoss (3.0 <= version < 3.2.2, seems to be fixed in jboss 3.2.2).
+    Only use within JBoss.
+
+    The batch-mode attribute allow to enable JDBC connection batch support
+    (if supported by used database), 'true' value allows to enable per-session
+    batch mode, whereas 'false' prohibits it.
+    PB.serviceConnectionManager.setBatchMode(...) method can be used
+    to switch on/off batch modus, if batch-mode was enabled. On PB.close()
+    OJB switch off batch modus, thus you have to do '...setBatchMode(true)' on each
+    obtained PB instance.
+
+    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.
+    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.
+
+    If the ignoreAutoCommitExceptions attribute is set 'true', all
+    exceptions caused by setting autocommit state, will be ignored.
+    Default mode 'false'.
+
+	If a jndi-datasource-name for JNDI based lookup of Jdbc
+    connections is specified, the four attributes driver, protocol,
+    subprotocol, dbalias used for Jdbc DriverManager based construction
+    of Jdbc Connections must not be declared.
+
+    The username and password attributes are used as credentials
+    for obtaining a jdbc connections.
+    If users don't want to keep this information the
+    repository.xml file, they could pass user/password
+    using PBKey.java to obtain a PersistenceBroker
+  -->
+<!ATTLIST jdbc-connection-descriptor
+	jcd-alias CDATA #REQUIRED
+    default-connection (true | false) "false"
+    platform (Db2 | Hsqldb | Informix | MsAccess | MsSQLServer |
+	          MySQL | Oracle | PostgreSQL | Sybase | SybaseASE |
+              SybaseASA | Sapdb | Firebird | Axion | NonstopSql |
+              Oracle9i | MaxDB ) "Hsqldb"
+	jdbc-level (1.0 | 2.0 | 3.0) "1.0"
+	eager-release (true | false) "false"
+    batch-mode (true | false) "false"
+    useAutoCommit (0 | 1 | 2) "1"
+    ignoreAutoCommitExceptions (true | false) "false"
+
+	jndi-datasource-name CDATA #IMPLIED
+
+	driver CDATA #IMPLIED
+	protocol CDATA #IMPLIED
+	subprotocol CDATA #IMPLIED
+	dbalias CDATA #IMPLIED
+
+	username CDATA #IMPLIED
+	password CDATA #IMPLIED
+>
+
+
+<!--
+    The object-cache element can be used to specify the ObjectCache
+    implementation used by OJB. There are three levels of
+    declaration:
+        1. in OJB.properties file, to declare the standard (default)
+        ObjectCache implementation.
+        2. on jdbc-connection-descriptor level, to declare ObjectCache implementation
+        on a per connection/user level
+        3. on class-descriptor level, to declare ObjectCache implementation
+        on a per class level
+
+    The priority of the declared object-cache elements are:
+    per class > per jdbc descriptor > standard
+
+    E.g. if you declare ObjectCache 'cacheDef' as standard, set
+    ObjectCache 'cacheA' in class-descriptor for class A and class B
+    does not declare an object-cache element. Then OJB use cacheA as ObjectCache
+    for class A and cacheDef for class B
+-->
+<!ELEMENT object-cache (documentation?, attribute*)>
+
+<!--
+    Attribute 'class' specifies the full qualified class name of
+    the used ObjectCache implementation.
+-->
+<!ATTLIST object-cache
+    class                          CDATA #REQUIRED
+>
+
+
+<!--
+	The connection-pool element specifies the connection pooling
+	parameter.
+-->
+<!ELEMENT connection-pool (documentation?)>
+
+
+<!--
+	maxActive
+	maximum number of connections that can be borrowed from the
+	pool at one time. When non-positive, there is 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
+
+	maxWait
+	max time block to get connection instance from pool, after that exception is thrown.
+	When non-positive, block till last judgement
+
+	whenExhaustedAction
+	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
+
+	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.
+    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.
+
+-->
+<!ATTLIST connection-pool
+    maxActive                       CDATA #IMPLIED
+    maxIdle                         CDATA #IMPLIED
+    maxWait                         CDATA #IMPLIED
+    minEvictableIdleTimeMillis      CDATA #IMPLIED
+    numTestsPerEvictionRun          CDATA #IMPLIED
+    testOnBorrow                    (true|false) #IMPLIED
+    testOnReturn                    (true|false) #IMPLIED
+    testWhileIdle                   (true|false) #IMPLIED
+    timeBetweenEvictionRunsMillis   CDATA #IMPLIED
+    whenExhaustedAction             (0|1|2) #IMPLIED
+    validationQuery                 CDATA #IMPLIED
+
+    logAbandoned                    (true|false) #IMPLIED
+    removeAbandoned                 (true|false) #IMPLIED
+    removeAbandonedTimeout          CDATA #IMPLIED
+>
+
+
+
+<!--
+	The sequence-manager element specifies the sequence
+    manager implementation used for key generation. All
+    sequence manager implementations shipped with OJB
+    you will find under org.apache.ojb.broker.util.sequence
+    If no sequence-manager is defined, OJB use a default one.
+    For configuration examples please consult documentation.
+
+    Use the attribute element to pass implementation specific
+    properties. This depends on the used implementation class.
+-->
+<!ELEMENT sequence-manager (documentation?, attribute*)>
+
+<!--
+    The className attribute represents the full qualified class name
+    of the desired sequence manager implementation - it is mandatory
+    when using the sequence-manager element.
+    All sequence manager implementations you find will under
+    org.apache.ojb.broker.util.sequence package named as SequenceManagerXXXImpl.
+    For configuration examples please consult documentation.
+-->
+<!ATTLIST sequence-manager
+    className                       CDATA #REQUIRED
+>
+
+
+
+<!--
+	For interfaces or abstract classes a class-descriptor holds a sequence of
+	extent-class elements.
+
+	For concrete classes it must have field-descriptors that describe primitive
+	typed instance variables.
+	References to other persistent entity classes are specified by
+	reference-descriptor elements.
+	Collections or arrays attributes that contain other persistent entity
+	classes are specified by collection-descriptor elements
+
+	Concrete base classes, may specify a sequence of extent-class elements,
+	naming the derived classes.
+
+	A class-descriptor may contain user defined custom attribute elements.
+
+    The insert-procedure, update-procedure and delete-procedure elements
+    identify the procedure/function that is defined in the database which
+    will handle the insertion, update or deletion of an instance of this
+    class.  These elements are all optional.  If they are absent then basic
+    sql statements (INSERT INTO xxx..., UPDATE xxx, DELETE FROM xxx) will
+    be utilized.
+
+  -->
+<!ELEMENT class-descriptor
+	((documentation?, object-cache?, extent-class+, attribute*) |
+	(documentation?, object-cache?, extent-class*, field-descriptor+,
+	 reference-descriptor*, collection-descriptor*,
+     index-descriptor*, attribute*,
+     insert-procedure?, update-procedure?, delete-procedure?))>
+
+
+<!--
+	The class attribute contains the full qualified name of the specified class.
+	As this attribute is of type ID there can only be one class-descriptor per
+	class.
+
+	The isolation-level attribute defines the locking isolation level of the
+    specified class (used by OJB's pessimistic locking api). Default is "empty String"
+    to use isolation-level defined on "descriptor-repository" level.
+    Note: This does NOT touch the jdbc-level of the connection.
+
+	If the proxy attribute is set, proxies are used for all loading operations
+	of instances of this class. If set to "dynamic", dynamic proxies are used.
+	If set to another value this value is interpreted as the full-qualified
+	name of the proxy class to use.
+
+    If the proxy-prefetching-limit attribute (used with the proxy attribute)
+    is set to the value > 0, the collections of objects of this class are materialized
+    by groups of the specified size, say when user tries to access the first
+    object of the collection, next proxy-prefetching-limit objects are loaded
+    by one database query.
+    Set this parameter to 0 if you want to turn this feature off.
+
+	The schema attribute may contain the database schema owning the table
+	mapped to this class.
+
+	The table attribute specifies the table name this class is mapped to.
+
+	The row-reader attribute may contain a full qualified class name.
+	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
+	propagate to this class.  Currently relevant for the ODMG layer only.
+
+	The optional initialization-method specifies a no-argument instance
+	method that is invoked after reading an instance from a database row.
+	It can be used to do initialization and validations.
+
+	The optional factory-class specifies a factory-class that
+	that is to be used instead of a no argument constructor.
+	If the factory-class is specified the factory-method
+	also must be defined.
+	factory-method refers to a static no-argument method
+	of the factory-class class.
+
+	The refresh attribute can be set to true to force OJB to refresh
+	instances when loaded from cache. It's set to false by default.
+  -->
+<!ATTLIST class-descriptor
+	class ID #REQUIRED
+	isolation-level (read-uncommitted | read-committed | repeatable-read |
+	                 serializable | optimistic | none) ""
+	proxy CDATA #IMPLIED
+	proxy-prefetching-limit CDATA #IMPLIED
+	schema CDATA #IMPLIED
+	table CDATA #IMPLIED
+	row-reader CDATA #IMPLIED
+    extends IDREF #IMPLIED
+	accept-locks (true | false) "true"
+	initialization-method CDATA #IMPLIED
+	factory-class CDATA #IMPLIED
+	factory-method CDATA #IMPLIED
+	refresh (true | false) "false"
+>
+
+
+<!--
+	An extent-class element is used to specify an implementing class or a
+	derived class that belongs to the extent of all instances of the interface
+	or base class.
+  -->
+<!ELEMENT extent-class (documentation?)>
+<!--
+	The class-ref attribute must contain a fully qualified classname.
+	The repository file must contain a class-descriptor for this class.
+  -->
+<!ATTLIST extent-class
+	class-ref IDREF #REQUIRED
+>
+
+<!--
+  A field descriptor contains mapping info for a primitive typed
+  attribute of a persistent class.
+
+  A field descriptor may contain custom attribute elements.
+  -->
+<!ELEMENT field-descriptor (documentation?, attribute*)>
+<!--
+	<b>The id attribute is optional.</b> If not specified, OJB internally
+	sorts field-descriptors according to their order of appearance in the
+	repository file.
+	If a different sort order is intended the id attribute may be used to
+	hold a unique number identifying the decriptors position in the sequence of
+	field-descriptors.
+	The order of the numbers for the field-descriptors must correspond to
+	the order of columns in the mapped table.
+
+	The name attribute holds the name of the persistent classes attribute.
+	If the PersistentFieldDefaultImpl is used there must be an attribute
+	in the persistent class with this name.
+	If the PersistentFieldPropertyImpl is used there must be a JavaBeans
+	compliant property of this name.
+
+	The table attribute may specify a table different from the mapped
+	table for the persistent class. (currently not implemented).
+
+	The column attribute specifies the column the persistent classes field
+	is mapped to.
+
+	The optional jdbc-type attribute specifies the JDBC type of the column.
+	If not specified OJB tries to identify the JDBC type by inspecting the
+	Java attribute by reflection.
+
+	The primarykey specifies if the column is a primary key column.
+
+	The nullable attribute specifies if the column may contain null values.
+
+	The indexed attribute specifies if there is an index on this column
+
+	The autoincrement attribute specifies if the values for the persistent
+	attribute are automatically generated by OJB.
+
+    The sequence-name attribute can be used to state explicitly a sequence
+    name used by the sequence manager implementations. Check the docs/javadocs
+    of the used sequence manager implementation to get information if this
+    is a mandatory attribute. OJB standard sequence manager implementations
+    build a sequence name by its own, if the attribute was not set.
+
+	The locking attribute is set to true if the persistent attribute is
+	used for optimistic locking. can only be set for TIMESTAMP and INTEGER
+	columns.
+
+	The updatelock attribute is set to false if the persistent attribute is
+	used for optimistic locking AND the dbms should update the lock column
+    itself. The default is true which means that when locking is true then
+    OJB will update the locking fields. Can only be set for TIMESTAMP and INTEGER
+	columns.
+
+	The default-fetch attribute specifies whether the persistent attribute
+	belongs to the JDO default fetch group.
+
+	The conversion attribute contains a fully qualified class name.
+	This class must implement the interface
+	org.apache.ojb.accesslayer.conversions.FieldConversion.
+	A FieldConversion can be used to implement conversions between Java-
+	attributes and database columns.
+
+	The length attribute can be used to specify a length setting, if
+	required by the jdbc-type of the underlying database column.
+
+	The precision attribute can be used to specify a precision setting, if
+	required by the jdbc-type of the underlying database column.
+
+	The scale attribute can be used to specify a scale setting, if
+	required by the jdbc-type of the underlying database column.
+
+	The access attribute specifies the accessibility of the field.
+	"readonly" marks fields that are not to modified. "readwrite" marks
+	fields that may be read and written to. "anonymous" marks anonymous fields.
+	An anonymous field has a database representation (column) but no
+	corresponding Java attribute. Hence the name of such a field does not
+	refer to a Java attribute of the class, but is used as a unique
+	identifier only.
+
+  -->
+<!ATTLIST field-descriptor
+	id CDATA #IMPLIED
+	name CDATA #REQUIRED
+	table CDATA #IMPLIED
+	column CDATA #REQUIRED
+	jdbc-type (BIT | TINYINT | SMALLINT | INTEGER | BIGINT | DOUBLE |
+	           FLOAT | REAL | NUMERIC | DECIMAL | CHAR | VARCHAR |
+	           LONGVARCHAR | DATE | TIME | TIMESTAMP | BINARY |
+	           VARBINARY | LONGVARBINARY | CLOB | BLOB | STRUCT |
+               ARRAY | REF | BOOLEAN | DATALINK) #IMPLIED
+	primarykey (true | false) "false"
+	nullable (true | false) "true"
+	indexed (true | false) "false"
+	autoincrement (true | false) "false"
+    sequence-name CDATA #IMPLIED
+	locking (true | false) "false"
+	update-lock (true | false) "true"
+	default-fetch (true | false) "false"
+	conversion CDATA #IMPLIED
+	length CDATA #IMPLIED
+	precision CDATA #IMPLIED
+	scale CDATA #IMPLIED
+	access (readonly | readwrite | anonymous) "readwrite"
+>
+
+
+<!--
+  An attribute element allows arbitrary name/value pairs to
+  be represented in the repository.
+  -->
+<!ELEMENT attribute (documentation?)>
+
+<!--
+	The attribute-name identifies the name of the attribute.
+	The attribute-value identifies the value of the attribute.
+-->
+<!ATTLIST attribute
+	attribute-name CDATA #REQUIRED
+	attribute-value CDATA #REQUIRED
+>
+
+<!--
+    A reference-descriptor contains mapping info for an attribute of a
+    persistent class that is not primitive but references another
+    persistent entity Object.
+
+    A foreignkey element contains information on foreign key columns that
+    implement the association on the database level.
+
+    A reference-decriptor may contain user defined attribute elements.
+  -->
+<!ELEMENT reference-descriptor (documentation?, foreignkey+, attribute*)>
+<!--
+	The name attribute holds the name of the persistent classes attribute.
+	If the PersistentFieldDefaultImpl is used there must be an attribute
+	in the persistent class with this name.
+	If the PersistentFieldPropertyImpl is used there must be a JavaBeans
+	compliant property of this name.
+
+	The class-ref attribute contains a fully qualified class name.
+	This class is the Object type of the persistent reference attribute.
+	As this is an IDREF there must be a class-descriptor for this class
+	in the repository too.
+
+	The proxy attribute can be set to true to specify that proxy based
+	lazy loading should be used for this attribute.
+
+    If the proxy-prefetching-limit attribute (used with the proxy attribute)
+    is set to the value > 0, then loading of the reference for the first
+    object of some collection causes loading of the references for
+    the next proxy-prefetching-limit objects.
+    Set this parameter to 0 if you want to turn this feature off.
+
+	The refresh attribute can be set to true to force OJB to refresh
+	object references on instance loading.
+
+	The auto-retrieve attribute specifies whether OJB automatically retrieves
+	this reference attribute on loading the persistent object.
+	If set to false the reference attribute is set to null. In this case the
+	user is responsible to fill the reference attribute.
+
+	The auto-update attribute specifies whether OJB automatically stores
+	this reference attribute on storing the persistent object or not or only
+    link the reference.
+	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.
+
+	The auto-delete attribute specifies whether OJB automatically deletes
+	this reference attribute 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.
+
+	The otm-dependent attribute specifies whether the OTM layer automatically
+    creates the referred object or deletes it if the reference field is set to null.
+    Also otm-dependent references behave as if auto-update and auto-delete
+    were set to true, but the auto-update and auto-delete attributes themself
+    must be always set to false for use with OTM layer.
+
+  -->
+<!ATTLIST reference-descriptor
+	name CDATA #REQUIRED
+	class-ref IDREF #REQUIRED
+
+	proxy (true | false) "false"
+	proxy-prefetching-limit CDATA #IMPLIED
+	refresh (true | false) "false"
+
+	auto-retrieve (true | false) "true"
+	auto-update (none | link | object | true | false) "false"
+	auto-delete (none | link | object | true | false) "false"
+	otm-dependent (true | false) "false"
+>
+
+<!--
+    A foreignkey element contains information on a foreign-key persistent
+    attribute that implement the association on the database level.
+  -->
+<!ELEMENT foreignkey (documentation?)>
+<!--
+	The field-id-ref contains the id attribute of the field-descriptor
+	used as a foreign key.
+  -->
+<!ATTLIST foreignkey
+	field-id-ref CDATA #IMPLIED
+	field-ref CDATA #IMPLIED
+>
+
+
+<!--
+    A collection-descriptor contains mapping info for a Collection- or
+    Array-attribute of a  persistent class that contains persistent
+    entity Objects.
+
+    The inverse-foreignkey elements contains information on foreign-key
+    attributes that implement the association on the database level.
+
+    The fk-pointing-to-this-class and fk-pointing-to-element-class elements
+    are only needed if the Collection or array implements a m:n association.
+    In this case they contain information on the foreign-key columns of
+    the intermediary table.
+
+    A collection-descriptor may contain user defined attribute elements.
+  -->
+<!ELEMENT collection-descriptor (
+    documentation?,
+    orderby*,
+    inverse-foreignkey*,
+	fk-pointing-to-this-class*,
+	fk-pointing-to-element-class*,
+	query-customizer?,
+	attribute*)>
+
+
+<!--
+	The name attribute holds the name of the persistent classes attribute.
+	If the PersistentFieldDefaultImpl is used there must be an attribute
+	in the persistent class with this name.
+	If the PersistentFieldPropertyImpl is used there must be a JavaBeans
+	compliant property of this name.
+
+	The collection-class may hold a fully qualified class name.
+	This class must be the Java type of the Collection attribute.
+	This attribute must only specified if the attribute type is not
+	a java.util.Collection (or subclass) or Array type. The declared
+    (none java.util.Collection or non Array) class must implement
+    ManageableCollection to let OJB handle this type of collection.
+
+	The element-class-ref attribute contains a fully qualified class name.
+	This class is the Object type of the elements of persistent collection
+	or Array attribute.
+	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.
+	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.
+
+	The indirection-table must specify the name of an intermediary table,
+	if the persistent collection attribute implements a m:n association.
+
+	The proxy attribute can be set to true to specify that proxy based
+	lazy loading should be used for this attribute.
+
+    If the proxy-prefetching-limit attribute (used with the proxy attribute)
+    is set to the value > 0, then loading of the collection for the first
+    object of some other collection causes loading of the collections for
+    the next proxy-prefetching-limit objects.
+    Set this parameter to 0 if you want to turn this feature off.
+
+	The refresh attribute can be set to true to force OJB to refresh
+	object and collection references on instance loading.
+
+	The auto-retrieve attribute specifies whether OJB automatically retrieves
+	this attribute on loading the persistent object.
+	If set to false the persistent attribute is set to null. In this case the
+	user is responsible to fill the persistent attribute.
+
+	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.
+
+	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.
+
+	The otm-dependent attribute specifies whether the OTM layer automatically
+    creates collection elements that were included into the collectionelements
+    and deletes collection elements that were excluded from the collection.
+    Also otm-dependent references behave as if auto-update and auto-delete
+    were set to true, but the auto-update and auto-delete attributes themself
+    must be always set to false for use with OTM layer.
+
+
+  -->
+<!ATTLIST collection-descriptor
+	name CDATA #IMPLIED
+	collection-class CDATA #IMPLIED
+	element-class-ref IDREF #REQUIRED
+	orderby CDATA #IMPLIED
+	sort (ASC | DESC) "ASC"
+
+	indirection-table CDATA #IMPLIED
+
+	proxy (true | false) "false"
+	proxy-prefetching-limit CDATA #IMPLIED
+	refresh (true | false) "false"
+
+	auto-retrieve (true | false) "true"
+	auto-update (none | link | object | true | false) "false"
+	auto-delete (none | link | object | true | false) "false"
+	otm-dependent (true | false) "false"
+>
+
+<!--
+	an OrderBy elemnent contains an attribute name and a sort order
+  -->
+<!ELEMENT orderby (documentation?)>
+<!ATTLIST orderby
+	name CDATA #REQUIRED
+	sort (ASC | DESC) "ASC"
+>
+
+<!--
+    A inverse-foreignkey element contains information on a foreign-key
+    persistent attribute that implement the association on the database level.
+  -->
+<!ELEMENT inverse-foreignkey (documentation?)>
+<!--
+	The field-id-ref contains the id attribute of the field-descriptor
+	in the class of the collection elements that is used as a foreign key.
+  -->
+<!ATTLIST inverse-foreignkey
+	field-id-ref CDATA #IMPLIED
+	field-ref CDATA #IMPLIED
+>
+
+<!--
+    A fk-pointing-to-this-class element contains information on a foreign-key
+    column of an intermediary table in a m:n scenario.
+  -->
+<!ELEMENT fk-pointing-to-this-class (documentation?)>
+<!--
+	The column attribute specifies the foreign-key column in the intermediary
+	table that points to the class holding the collection.
+  -->
+<!ATTLIST fk-pointing-to-this-class
+	column CDATA #REQUIRED
+>
+
+<!--
+    A fk-pointing-to-element-class element contains information on a foreign-key
+    column of an intermediary table in a m:n scenario.
+  -->
+<!ELEMENT fk-pointing-to-element-class (documentation?)>
+<!--
+	The column attribute specifies the foreign-key column in the intermediary
+	table that points to the class of the collection elements.
+  -->
+<!ATTLIST fk-pointing-to-element-class
+	column CDATA #REQUIRED
+>
+
+
+<!--
+	a queryEnhancer element to enhance the 1:n query
+  -->
+<!ELEMENT query-customizer (
+	documentation?,
+	attribute*)>
+<!ATTLIST query-customizer
+	class CDATA #REQUIRED
+>
+
+<!--
+    An index-descriptor describes an index by listing its columns.  It may be
+    unique or not.
+-->
+<!ELEMENT index-descriptor (documentation?, index-column+)>
+<!ATTLIST index-descriptor
+    name CDATA #REQUIRED
+    unique (true | false) "false">
+
+<!--
+    An index-column is just the name of a column in an index.
+-->
+<!ELEMENT index-column (documentation?)>
+<!ATTLIST index-column
+    name CDATA #REQUIRED>
+
+<!--
+	Identifies the procedure/function that should be used to handle
+    insertions for a specific class-descriptor.
+
+    The nested 'argument' elements define the argument list for the
+    procedure/function as well as the source for each argument.
+
+    The name attribute identifies the name of the procedure/function to use
+
+    The return-field-ref identifies the field-descriptor that will receive
+    the value that is returned by the procedure/function.  If the procedure/
+    function does not include a return value, then do not specify a value
+    for this attribute.
+
+    The include-all-fields attribute indicates if all field-descriptors in
+    the corresponding class-descriptor are to be passed to the procedure/
+    function.  If include-all-fields is 'true', any nested 'argument'
+    elements will be ignored.  In this case, values for all field-descriptors
+    will be passed to the procedure/function.  The order of values that are
+    passed to the procedure/function will match the order of field-descriptors
+    on the corresponding class-descriptor.  If include-all-fields is false,
+    then values will be passed to the procedure/function based on the
+    information in the nested 'argument' elements.
+  -->
+<!ELEMENT insert-procedure
+	(documentation?, (runtime-argument | constant-argument)*, attribute*)>
+<!ATTLIST insert-procedure
+	name CDATA #REQUIRED
+    return-field-ref CDATA #IMPLIED
+    include-all-fields (true | false) "false"
+>
+
+<!--
+	Identifies the procedure/function that should be used to handle
+    updates for a specific class-descriptor.
+
+    The nested 'argument' elements define the argument list for the
+    procedure/function as well as the source for each argument.
+
+    The name attribute identifies the name of the procedure/function to use
+
+    The return-field-ref identifies the field-descriptor that will receive
+    the value that is returned by the procedure/function.  If the procedure/
+    function does not include a return value, then do not specify a value
+    for this attribute.
+
+    The include-all-fields attribute indicates if all field-descriptors in
+    the corresponding class-descriptor are to be passed to the procedure/
+    function.  If include-all-fields is 'true', any nested 'argument'
+    elements will be ignored.  In this case, values for all field-descriptors
+    will be passed to the procedure/function.  The order of values that are
+    passed to the procedure/function will match the order of field-descriptors
+    on the corresponding class-descriptor.  If include-all-fields is false,
+    then values will be passed to the procedure/function based on the
+    information in the nested 'argument' elements.
+  -->
+<!ELEMENT update-procedure
+	(documentation?, (runtime-argument | constant-argument)*, attribute*)>
+<!ATTLIST update-procedure
+	name CDATA #REQUIRED
+    return-field-ref CDATA #IMPLIED
+    include-all-fields (true | false) "false"
+>
+
+<!--
+	Identifies the procedure/function that should be used to handle
+    deletions for a specific class-descriptor.
+
+    The nested 'runtime-argument' and 'constant-argument' elements define
+    the argument list for the procedure/function as well as the source
+    for each argument.
+
+    The name attribute identifies the name of the procedure/function to use
+
+    The return-field-ref identifies the field-descriptor that will receive
+    the value that is returned by the procedure/function.  If the procedure/
+    function does not include a return value, then do not specify a value
+    for this attribute.
+
+    The include-pk-only attribute indicates if all field-descriptors in
+    the corresponding class-descriptor that are identified as being part of
+    the primary key are to be passed to the procedure/function.  If
+    include-pk-only is 'true', any nested 'argument' elements will be
+    ignored.  In this case, values for all field-descriptors that are identified
+    as being part of the primary key will be passed to the procedure/function.
+    The order of values that are passed to the procedure/function will match
+    the order of field-descriptors on the corresponding class-descriptor.
+    If include-pk-only is false, then values will be passed to the procedure/
+    function based on the information in the nested 'argument' elements.
+  -->
+<!ELEMENT delete-procedure
+	(documentation?, (runtime-argument | constant-argument)*, attribute*)>
+<!ATTLIST delete-procedure
+	name CDATA #REQUIRED
+    return-field-ref CDATA #IMPLIED
+    include-pk-only (true | false) "false"
+>
+<!--
+    Defines an argument that is passed to a procedure/function.  Each argument
+    will be set to a value from a field-descriptor or null.
+
+    The field-ref attribute identifies the field-descriptor in the corresponding
+    class-descriptor that provides the value for this argument.  If this attribute
+    is unspecified, then this argument will be set to null.
+-->
+<!ELEMENT runtime-argument
+	(documentation?, attribute*)>
+<!ATTLIST runtime-argument
+	field-ref CDATA #IMPLIED
+    return (true | false) "false"
+>
+<!--
+    Defines a constant value that is passed to a procedure/function.
+
+    The value attribute identifies the value that is passed to the procedure/
+    function.
+-->
+<!ELEMENT constant-argument
+	(documentation?, attribute*)>
+<!ATTLIST constant-argument
+    value CDATA #REQUIRED
+>
+