db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: jakarta-ojb/src/test/org/apache/ojb repository.dtd
Date Wed, 15 Jan 2003 10:51:23 GMT
arminw      2003/01/15 02:51:23

  Modified:    xdocs    sequencemanager.xml repository.xml deployment.xml
               xdocs/stylesheets site.vsl
               src/test/org/apache/ojb repository.dtd
  Log:
  - update docs
  - sync. site.vsl with site.xsl
  
  Revision  Changes    Path
  1.5       +179 -60   jakarta-ojb/xdocs/sequencemanager.xml
  
  Index: sequencemanager.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/sequencemanager.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sequencemanager.xml	6 Jan 2003 14:09:20 -0000	1.4
  +++ sequencemanager.xml	15 Jan 2003 10:51:23 -0000	1.5
  @@ -12,14 +12,21 @@
   <section name="The OJB Sequence Manager">
   
   <ul>
  -    <li><a href="#1">Automatical assignment of unique values</a></li>
  -    <li><a href="#2">Force computation of unique values</a></li>
  -    <li><a href="#3">Alternative SequenceManagers</a></li>
  -    <li><a href="#4">How to change the sequence manager?</a></li>
  -    <li><a href="#5">How to write my own sequence manager?</a></li>
  +    <li><a href="#automatical">Automatical assignment of unique values</a></li>
  +    <li><a href="#force">Force computation of unique values</a></li>
  +    <li><a href="#howToChange">How to change the sequence manager?</a></li>
  +    <li><a href="#alternative">Alternative SequenceManagers</a></li>
  +    <li><a href="#whenUsing">When using sequence-name attribute in field-descriptor?</a></li>
  +    <li><a href="#sequenceManagerHandling">Sequence manager handling using
multiple databases</a></li>
  +    <li><a href="#oneSequenceManager">One sequence manager with multiple databases?</a></li>
  +    <li><a href="#directAccess">Can I get direct access to the sequence manager?</a></li>
  +    <li><a href="#howToWrite">How to write my own sequence manager?</a></li>
   </ul>
  +All sequence manager implementations you will find under the
  +<code>org.apache.ojb.broker.util.sequence</code>-package using the following
naming
  +convention <code>SequenceManagerXXXImpl</code>.
   
  -<subsection name="Automatical assignment of unique values" anchor="1">
  +<subsection name="Automatical assignment of unique values" anchor="automatical">
   <p>
   As mentioned in <A HREF="./tutorial1.html">Tutorial1</A> OJB provides a mechanism
to assign
   unique values for primary key attributes. You just have to enable the <code>autoincrement</code>
  @@ -64,7 +71,7 @@
   
   
   
  -<subsection name="Force computation of unique values" anchor="2">
  +<subsection name="Force computation of unique values" anchor="force">
   <p>
   By default OJB triggers the computation
   of unique ids during calls to PersistenceBroker.store(...).
  @@ -82,8 +89,57 @@
   
   
   
  +<subsection name="How to change the sequence manager?" anchor="howToChange">
  +<p>
  +You could change the used sequence manager implementation by adding
  +a <code>sequence-manager</code> tag in the <code>jdbc-connection-descriptor</code>.
  +If no <code>sequence-manager</code> was specified in the descriptor,
  +OJB use a default sequence manager implementation.
  +</p>
  +<p>
  +Example descriptor using <code>sequence-manager</code> tag:
  +<source><![CDATA[
  +<jdbc-connection-descriptor
  +        jcd-alias="farAway"
  +        platform="Hsqldb"
  +        jdbc-level="2.0"
  +        driver="org.hsqldb.jdbcDriver"
  +        protocol="jdbc"
  +        subprotocol="hsqldb"
  +        dbalias="../OJB_FarAway"
  +        username="sa"
  +        password=""
  +        batch-mode="false"
  +    >
  +        <connection-pool
  +            maxActive="5"
  +            whenExhaustedAction="0"
  +            validationQuery="select count(*) from OJB_HL_SEQ"
  +        />
  +
  +        <sequence-manager className="org.apache.ojb.broker.util.
  +                                      sequence.SequenceManagerHighLowImpl">
  +            <attribute attribute-name="grabSize" attribute-value="5"/>
  +        </sequence-manager>
  +</jdbc-connection-descriptor>
  +]]></source>
  +</p>
  +<p>
  +The mandatory <code>className</code> attribute needs the full-qualified class
name of the
  +desired sequence-manager implementation. If a implementation needs configuration
  +properties you pass them using <code>attribute</code> tags with
  +<code>attribute-name</code> represents the property name and <code>attribute-value</code>
  +the property value. Each sequence manager implementation shows all properties on
  +the according javadoc page. Further information you could find in the
  +<a href="repository.dtd.txt">repository.dtd</a>.
  +</p>
  +</subsection>
  +
  +
  +
  +
  +<subsection name="Alternative SequenceManagers" anchor="alternative">
   
  -<subsection name="Alternative SequenceManagers" anchor="3">
   <p>
   <b>High/Low sequence manager</b><br/>
   Per default OJB internally uses a High/Low algorithm based sequence manager
  @@ -93,21 +149,40 @@
   This implementation is called
   <code>ojb.broker.util.sequence.SequenceManagerHighLowImpl</code>.
   <br/>
  -It is able to generate IDs unique to a given object and all extent objects declarated
  -in the objects class descriptor. If you ask for an uid for an interface with several
  +This implementation is able to generate IDs unique to a given object and
  +all extent objects declarated in the objects class descriptor.
  +If you ask for an uid using an interface with several
   implementor classes, or a baseclass with several subclasses the returned
   uid have to be unique accross all tables representing objects of the
   extent in question.
  +
  +<source><![CDATA[
  +<sequence-manager className="org.apache.ojb.broker.util.
  +                                      sequence.SequenceManagerHighLowImpl">
  +   <attribute attribute-name="grabSize" attribute-value="20"/>
  +   <attribute attribute-name="globalSequenceId" attribute-value="false"/>
  +</sequence-manager>
  +]]></source>
  +
  +With the property <code>grabSize</code> you set the size of the assigned ids.
  +If property <code>globalSequenceId</code> was set <code>true</code>
you will
  +get unique ids over all persistent objects (Normally you don't need this, anymore
  +this is not a extent-aware adjustment). Default was <code>false</code>.
   </p>
  +<p>
  +This sequence manager implementation supports user defined sequence-names
  +to manage the high/low sequences - see <a href="#sequenceName">more</a>.
  +</p>
  +
   
   <p>
   <b>In-Memory sequence manager</b><br/>
   Another implementation is a In-Memory sequence manager
   <code>ojb.broker.util.sequence.SequenceManagerInMemoryImpl</code>.
   Only the first time an id was requested for a object,
  -the manager query the database for the max value of the uid
  +the manager query the database for the max value of the target
   column - all following request were performed in memory. This
  -implementation should ditto generate unique ids across all
  +implementation ditto generate unique ids across all
   extents, using the same mechanism as the High/Low implementation.
   <br/>
   This is the fastest standard sequence manager implementation, but
  @@ -115,17 +190,33 @@
   <br/>- do not use in client/server mode
   <br/>- do not use in clustered environments
   <br/>- do not use if other entities generate id's for the persistent objects
  +<source><![CDATA[
  +<sequence-manager className="org.apache.ojb.broker.util.
  +                                      sequence.SequenceManagerInMemoryImpl">
  +</sequence-manager>
  +]]></source>
   </p>
   
  +
   <p>
   <b>Database sequences based implementation</b><br/>
   If your database support sequence key generation (e.g. Oracle, SAP DB, PostgreSQL)
  -you could use the <code>ojb.broker.util.sequence.SequenceManagerNextValImpl</code>
and let
  +you could use the <code>SequenceManagerNextValImpl</code> implementation let
   your database generate the requested ids.
  +<source><![CDATA[
  +<sequence-manager className="org.apache.ojb.broker.util.
  +                                sequence.SequenceManagerNextValImpl">
  +</sequence-manager>
  +]]></source>
   <br/>
  -For using this sequence manager with your database it is mandatory
  +<a name="sequenceName"/>
  +When using this sequence manager it is possible
   to define a <code>sequence-name</code> field-descriptor attribute
   in the repository file for each autoincrement field.
  +<br/>
  +Keep in mind that in this case you are responsible to be aware of extents.
  +Thus you have to use the same <code>sequence-name</code> attribute value
  +for all extents, even if the extents were mapped to different database tables.
   <source><![CDATA[
   <class-descriptor
         class="org.apache.ojb.broker.sequence.SMDatabaseSequence"
  @@ -144,76 +235,104 @@
       </class-descriptor>
   ]]></source>
   <br/>
  -Keep in mind that in this case you are responsible to be aware of extents.
  -Thus you have to use the same <code>sequence-name</code> attribute value
  -for all extents, if the extents were mapped to different database tables.
  +When you don't specify a sequence name, the implementation try to
  +build a extent-aware sequence name on its own.
  +</p>
  +
  +
  +<p>
  +<b>Database sequences based high/low implementation</b><br/>
  +Based on the sequence manager implementation described above, but
  +use a high/low algorithm to avoid database access.
  +<source><![CDATA[
  +<sequence-manager className="org.apache.ojb.broker.util.
  +                                      sequence.SequenceManagerSeqHiLoImpl">
  +    <attribute attribute-name="grabSize" attribute-value="20"/>
  +</sequence-manager>
  +]]></source>
  +With the property
  +<code>grabSize</code> you set the size of the assigned ids.
   </p>
   
   <p>
  -If you still think something is missing you can just write your own
  +If you still think something is missing you can just write your <a href="#howToWrite">own</a>
   sequence manager implementation.
   </p>
   </subsection>
   
   
  -<subsection name="How to change the sequence manager?" anchor="4">
  +
  +
  +
  +<subsection name="When using sequence-name attribute in field-descriptor?" anchor="whenUsing">
   <p>
  -You could change the used sequence manager by changing the sequence manager class
  -entry in the OJB.properties file:
  -<source><![CDATA[
  -#-------------------------------------------------------------------
  -# SequenceManager
  -#-------------------------------------------------------------------
  -#
  -# The SequenceManagerClass entry determines the SequenceManager to
  -# be used choose one of the implementations:
  -#----------------------------------
  -# 1. SequenceManagerHighLowImpl
  -#    High/Low sequence manager implementation generates continuous
  -#    id's during runtime. This is OJB's default sequence manager.
  -# 2. SequenceManagerInMemoryImpl
  -#    InMemory-sequence manager generates continuous id's
  -#    during runtime. This is the fastest standard sequence
  -#    manager implementation, but has some Limitations:
  -#    - do not use in client/server mode
  -#    - do not use in clustered environments
  -#    - do not use if other entities generate id's for the
  -#      persistent objects
  -# 3. SequenceManagerNextValImpl
  -#    Use database based sequence generation. Check your DB for
  -#    support, add 'sequence-name' attribute to your
  -#    autoincrement field descriptors
  -#
  -SequenceManagerClass=
  -  org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
  -#SequenceManagerClass=
  -#  org.apache.ojb.broker.util.sequence.SequenceManagerInMemoryImpl
  -#SequenceManagerClass=
  -#  org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
  -#-----------------------------------
  -]]></source>
  +TODO
  +</p>
  +</subsection>
  +
  +
  +
  +
  +<subsection name="Sequence manager handling using multiple databases" anchor="sequenceManagerHandling">
  +<p>
  +TODO
  +</p>
  +</subsection>
  +
  +
  +
  +
  +<subsection name="One sequence manager with multiple databases?" anchor="oneSequenceManager">
  +<p>
  +TODO
  +</p>
  +</subsection>
  +
  +
  +
  +
  +<subsection name="Can I get direct access to the sequence manager?" anchor="directAccess">
  +<p>
  +TODO
   </p>
   </subsection>
   
   
   
  -<subsection name="How to write my own sequence manager?" anchor="5">
  +<subsection name="How to write my own sequence manager?" anchor="howToWrite">
   <p>
   Very easy to do, just write a implementation class of the
  -interface <code>ojb.broker.util.sequence.SequenceManager</code>.
  -OJB use a simple factory
  -<code>ojb.broker.util.sequence.SequenceManagerFactory</code>
  +interface <code>org.apache.ojb.broker.util.sequence.SequenceManager</code>.
  +OJB use a factory (<code>SequenceManagerFactory</code>)
   to obtain sequence manager instances.
   </p>
   
   <p>
   This Factory can be configured to generate instances of your
  -specific implementation by changing the corresponding entry
  -in the OJB properties file:
  +specific implementation by adding a <code>sequence-manager</code>
  +tag in the <code>jdbc-connection-descriptor</code>.
   <source><![CDATA[
  -SequenceManagerClass=org.my.SequenceManagerMY_OWNImpl
  +<sequence-manager className="my.SequenceManagerMYImpl">
  +</sequence-manager>
   ]]></source>
   That's it!
  +</p>
  +
  +<p>
  +If your sequence manager implementation was derived from
  +<code>org.apache.ojb.broker.util.sequence.AbstractSequenceManager</code>
  +it's easy to pass configuration properties to your implementation using
  +<code>attribute</code> tags.
  +<source><![CDATA[
  +<sequence-manager className="my.SequenceManagerMYImpl">
  +    <attribute attribute-name="myProperty" attribute-value="test"/>
  +</sequence-manager>
  +]]></source>
  +With
  +<source>
  +public String getConfigurationProperty(String key, String defaultValue)
  +</source>
  +method get the properties in your implementation class.
   </p>
   
   <p>
  
  
  
  1.12      +148 -67   jakarta-ojb/xdocs/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/repository.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- repository.xml	6 Jan 2003 14:09:20 -0000	1.11
  +++ repository.xml	15 Jan 2003 10:51:23 -0000	1.12
  @@ -55,7 +55,7 @@
   	It consists of one jdbc-connection-descriptor and at least one
   	class-descriptor element.
   <br/><br/>
  -	The jdbc-connection-descriptor element specifies the default jdbc
  +	The jdbc-connection-descriptor element specifies a jdbc
   	connection for the repository.
   <br/><br/>
   	class-descriptor elements specify o/r mapping information for
  @@ -69,6 +69,8 @@
   <p>
       The isolation attribute defines the default isolation level for
       class-descriptor that do not define a specific isolation level.
  +    This isolation level is used within the ODMG-api and does not
  +    touch the isolation-level off the database.
   <br/><br/>
   	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.
  @@ -85,52 +87,94 @@
   </subsection>
   <subsection name="jdbc-connection-descriptor">
   <p>
  -	The jdbc-connection-descriptor element specifies the default jdbc
  -	connection for the repository. All class-descriptor elements that do not
  -	specify their own jdbc-connection-descriptor will use the default jdbc
  -	connection.
  +	The <code>jdbc-connection-descriptor</code> element specifies a jdbc
  +	connection for the repository. It is allowed to define more than
  +    one <code>jdbc-connection-descriptor</code>. All class-descriptor
  +    elements are independent from the jdbc-connection-descriptors.
   </p>
   <p>
  -	A connection-pool element may be used to define connection pool
  +	A <code>connection-pool</code> element may be used to define connection pool
   	properties for the specified JDBC connection.
   </p>
  +<p>
  +    Further a <code>sequence-manager</code> element may be used to
  +    define which sequence manager implementation should be used within
  +    the defined connection.
  +</p>
   <source><![CDATA[
  -<!ELEMENT jdbc-connection-descriptor (connection-pool?)>
  +<!ELEMENT jdbc-connection-descriptor (documentation?,
  +                        connection-pool?, sequence-manager?)>
   ]]></source>
   <p>
  -	The platform attribute is used to define the specific
  -    RDBMS Platform. This attribute corresponds to a
  +The <code>jdbc-connection-descriptor</code> element contains a bunch
  +of required and implied attributes:
  +</p>
  +<p>
  +    The <code>jcdAlias</code> attribute is a shortcut name for the defined
connection
  +    descriptor. OJB use jcdAlias as key for the defined connections.
  +<br/><br/>
  +    The <code>default-connection</code> 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.
  +<br/><br/>
  +    The <code>platform</code> attribute is used to define the specific RDBMS
  +    Platform. This attribute corresponds to a
   	org.apache.ojb.broker.platforms.PlatformXXXImpl class.
   <br/><br/>
  -	The jdbc-level attribute is used to specify the Jdbc compliance
  +	The <code>jdbc-level</code> attribute is used to specify the Jdbc compliance
   	level of the used Jdbc driver.
   <br/><br/>
  -	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.
  -<br/><br/>
  -    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'll have to perform an explicit call to PersistenceBroker.open(...).
  -<br/><br/>
  -	If you are using OJB in an application server, add
  -    eager-release="true" to your connection descriptor
  -    to have OJB return the connection to the pool
  -    as soon as it's done using it.
  -<br/><br/>
  -	You can turn the batch mode on via the batch-mode attribute.
  -    In the batch mode OJB gathers SQL statements into batches
  -    and executes them when transaction commits.
  +    The <code>eager-release</code> attribute was adopt to solve a problem occured
when
  +    using OJB within JBoss (>=3.0). Only use within JBoss.
  +<br/><br/>
  +    The <code>batch-mode</code> attribute allow to set batch mode modus global
  +    from the used connection. It is also possible to change
  +    batch mode at runtime, using the
  +    PB.serviceConnectionManager.setBatchMode(...) method.
  +<br/><br/>
  +    The <code>useAutoCommit</code> 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.
  +<br/><br/>
  +    If the <code>ignoreAutoCommitExceptions</code> attribute is set 'true',
all
  +    exceptions caused by setting autocommit state, will be ignored.
  +    Default mode 'false'.
  +<br/><br/>
  +	If a <code>jndi-datasource-name</code> 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.
  +<br/><br/>
  +    The <code>username</code> and <code>password</code> 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
   </p>
   <source><![CDATA[
   <!ATTLIST jdbc-connection-descriptor
  -	platform (Db2 | Hsqldb | Informix | MsAccess | MsSQLServer |
  -	          MySQL | Oracle | PostgreSQL | Sybase | Sapdb) "Hsqldb"
  +	jcd-alias CDATA #REQUIRED
  +    default-connection (true | false) "false"
  +    platform (Db2 | Hsqldb | Informix | MsAccess | MsSQLServer |
  +	          MySQL | Oracle | PostgreSQL | Sybase | SybaseASE|
  +              SybaseASA | Sapdb) "Hsqldb"
   	jdbc-level (1.0 | 2.0 | 3.0) "1.0"
   	eager-release (true | false) "false"
  -	batch-mode (true | false) "false"
  +    batch-mode (true | false) "false"
  +    useAutoCommit (0 | 1 | 2) "1"
  +    ignoreAutoCommitExceptions (true | false) "false"
   
   	jndi-datasource-name CDATA #IMPLIED
   
  @@ -215,6 +259,30 @@
   The number of connections to examine during each run of the
   idle object evictor thread (if any)
   </li>
  +<li>
  +logAbandoned<br/>
  +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.
  +</li>
  +<li>
  +removeAbandoned/removeAbandonedTimeout<br/>
  +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.
  +</li>
   </ul>
   </p>
   
  @@ -230,7 +298,11 @@
       testWhileIdle                   (true|false) #IMPLIED
       timeBetweenEvictionRunsMillis   CDATA #IMPLIED
       whenExhaustedAction             (0|1|2) #IMPLIED
  -    connectionFactory               CDATA #IMPLIED
  +    validationQuery                 CDATA #IMPLIED
  +
  +    logAbandoned                    (true|false) #IMPLIED
  +    removeAbandoned                 (true|false) #IMPLIED
  +    removeAbandonedTimeout          CDATA #IMPLIED
   >
   ]]></source>
   
  @@ -239,15 +311,15 @@
   
   <subsection name="class-descriptor">
   <p>
  -	For interfaces or abstract classes a class-descriptor holds a sequence of
  -	extent-class elements.
  +	For interfaces or abstract classes a <code>class-descriptor</code>
  +    holds a sequence of extent-class elements.
   <br/><br/>
  -	For concrete classes it must have field-descriptors that describe primitive
  -	typed instance variables.
  +	For concrete classes it must have <code>field-descriptors</code> that
  +    describe primitive typed instance variables.
   	References to other persistent entity classes are specified by
  -	reference-descriptor elements.
  +	<code>reference-descriptor</code> elements.
   	Collections or arrays attributes that contain other persistent entity
  -	classes are specified by collection-descriptor elements
  +	classes are specified by <code>collection-descriptor</code> elements
   	<br/>
   	Concrete base classes, may specify a sequence of extent-class elements,
   	naming the derived classes.
  @@ -256,23 +328,24 @@
   </p>
   <source><![CDATA[
   <!ELEMENT class-descriptor
  -	((extent-class+, attribute*) |
  -	(extent-class*, field-descriptor+,
  +	((documentation?, extent-class+, attribute*) |
  +	(documentation?, extent-class*, field-descriptor+,
   	 reference-descriptor*, collection-descriptor*, attribute*))>
   ]]></source>
   
   <p>
  -	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.
  -<br/><br/>
  -	The isolation-level attribute specifies the transactional isolation to be
  -	used for this class.
  -<br/><br/>
  -	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.
  +	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.
  +<br/><br/>
  +	The isolation-level attribute specifies the transactional
  +    isolation to be used for this class on ODMG-level (does not
  +    touch the jdbc-connection isolation level).
  +<br/><br/>
  +	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.
   <br/><br/>
   	The schema attribute may contain the database schema owning the table
   	mapped to this class.
  @@ -283,21 +356,20 @@
   	This class will be used as the RowReader implementation used to
   	materialize instances of the persistent class.
   <br/><br/>
  -	The sequence-manager attribute may contain a full qualified class name.
  -	This class will be used as the SequenceManager implementation for
  -	the persistent class. <b>Important note:</b> this feature is not yet implemented!
  +	The accept-locks attribute specifies whether implicit locking should
  +	propagate to this class.  Currently relevant for the ODMG layer only.
   </p>
   <source><![CDATA[
   <!ATTLIST class-descriptor
   	class ID #REQUIRED
   	isolation-level (read-uncommitted | read-committed |
  -                    repeatable-read | serializable |
  -                    optimistic) "read-uncommitted"
  +        repeatable-read | serializable | optimistic) "read-uncommitted"
   	proxy CDATA #IMPLIED
   	schema CDATA #IMPLIED
   	table CDATA #IMPLIED
   	row-reader CDATA #IMPLIED
  -	sequence-manager CDATA #IMPLIED
  +    extends IDREF #IMPLIED
  +	accept-locks (true | false) "true"
   >
   ]]></source>
   
  @@ -305,8 +377,8 @@
   <subsection name="extent-class">
   <p>
   	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.
  +	derived class that belongs to the extent of all instances of the
  +    interface or base class.
   </p>
   <source><![CDATA[
   <!ELEMENT extent-class EMPTY>
  @@ -331,13 +403,13 @@
       A field descriptor may contain custom attribute elements.
   </p>
   <source><![CDATA[
  -<!ELEMENT field-descriptor (attribute*)>
  +<!ELEMENT field-descriptor (documentation?, attribute*)>
   ]]></source>
   
   <p>
  -	The id attribute must contain a unique number identifying the decriptor.
  +    The id attribute must contain a unique number identifying the decriptor.
   	The numbers for the attributes of a class must correspond to the order
  -	of columns in the mapped table. The id attribute is optional.
  +	of columns in the mapped table.
   <br/><br/>
   	The name attribute holds the name of the persistent classes attribute.
   	If the PersistentFieldDefaultImpl is used there must be an attribute
  @@ -346,9 +418,9 @@
   	compliant property of this name.
   <br/><br/>
   	The table attribute may specify a table different from the mapped
  -	table for the persistent class. (not yet implemented).
  +	table for the persistent class. (currently not implemented).
   <br/><br/>
  -	The column attribute specifies the column the persistentent classes field
  +	The column attribute specifies the column the persistent classes field
   	is mapped to.
   <br/><br/>
   	The jdbc-type attribute specifies the JDBC type of the column.
  @@ -362,12 +434,18 @@
   	The autoincrement attribute specifies if the values for the persistent
   	attribute are automatically generated by OJB.
   <br/><br/>
  +    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.
  +<br/><br/>
   	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.
   <br/><br/>
   	The default-fetch attribute specifies whether the persistent attribute
  -	belongs to the JDO default fetch group. (not yet implemented).
  +	belongs to the JDO default fetch group.
   <br/><br/>
   	The conversion attribute contains a fully qualified class name.
   	This class must implement the interface
  @@ -398,6 +476,7 @@
   	nullable (true | false) "true"
   	indexed (true | false) "false"
   	autoincrement (true | false) "false"
  +    sequence-name CDATA #IMPLIED
   	locking (true | false) "false"
   	default-fetch (true | false) "false"
   	conversion CDATA #IMPLIED
  @@ -531,10 +610,12 @@
   </p>
   <source><![CDATA[
   <!ELEMENT collection-descriptor (
  +    documentation?,
  +    orderby*,
       inverse-foreignkey*,
   	fk-pointing-to-this-class*,
  -	fk-pointing-to-element-class*)
  ->
  +	fk-pointing-to-element-class*,
  +	attribute*)>
   ]]></source>
   
   <p>
  
  
  
  1.10      +11 -9     jakarta-ojb/xdocs/deployment.xml
  
  Index: deployment.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/deployment.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- deployment.xml	13 Jan 2003 18:12:29 -0000	1.9
  +++ deployment.xml	15 Jan 2003 10:51:23 -0000	1.10
  @@ -93,7 +93,7 @@
   	Apart from wasting disk space they do no harm. If you don't care you just take all jars
from
   	<code>jakarta-ojb-&lt;version&gt;/lib</code>.
   	<br/>
  -	If you do care, here is the list of jars you can ommit during runtime:
  +	If you do care, here is the list of jars you can omit during runtime:
   	<ul>
   		<li><code>ant.jar</code>
   		</li>
  @@ -233,7 +233,7 @@
   configurations to integrate OJB into the container mechanisms.
   </p>
   <p>
  -The instructions to make OJB running within your Application Server
  +The instructions to make OJB running within your application server
   should be similar for all server. So the following instructions for JBoss
   should be useful for all users.
   </p>
  @@ -272,7 +272,7 @@
   
   <p>
   <b>3. Declare datasources in the repository (repository_database) file:</b>
  -Do only use datasources from the appServer to connect your databases.
  +Do only use datasources from the application server to connect your databases.
   <source><![CDATA[
   <!-- Datasource example -->
   <jdbc-connection-descriptor
  @@ -299,7 +299,7 @@
   allowed to change autoCommit state.
   <br/>
   When using jboss >3.0 you have to set
  -<code>eager-release="true"</code> - when using other appServer
  +<code>eager-release="true"</code> - when using other application server
   <code>false</code> should be ok.
   </p>
   
  @@ -338,18 +338,20 @@
   <br/>
   <code>[jakarta-ojb]/src/ejb/org/apache/ojb/ejb</code>
   <br/>
  -and after running the <code>ejb-example</code> ant target, you will find
  -the complete sources (including the generated interfaces) under
  +and after running the <code>ejb-examples</code> ant target (see below),
  +you will find the complete sources (including the generated interfaces)
  +under
   <br/>
   <code>[jakarta-ojb]/target/srcejb</code>
   <br/>
   in three sub-dirs.
  -<br/>
  +</p>
  +<p>
   Run the following ant target
   <source><![CDATA[
  -bin/build.sh ejb-example
  +bin/build.sh ejb-examples
   or
  -bin\build.bat ejb-example
  +bin\build.bat ejb-examples
   ]]></source>
   to generate the the bean and client jars prepared for use in JBoss. If you using
   a different application server, you have to modifiy the xdoclet ant target in
  
  
  
  1.3       +5 -5      jakarta-ojb/xdocs/stylesheets/site.vsl
  
  Index: site.vsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/stylesheets/site.vsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site.vsl	8 Dec 2002 12:01:04 -0000	1.2
  +++ site.vsl	15 Jan 2003 10:51:23 -0000	1.3
  @@ -12,7 +12,7 @@
       #set ($subbannerfg = "#ffffff")
       #set ($tablethbg = "#039acc")
       #set ($tabletdbg = "#a0ddf0")
  -    
  +
   <!-- start the processing -->
   #document()
   <!-- end the processing -->
  @@ -242,7 +242,7 @@
               <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
           </head>
   
  -        <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">        
  +        <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
               <table border="0" width="100%" cellspacing="0">
                   <!-- TOP IMAGE -->
                   <tr>
  @@ -253,13 +253,13 @@
                   <tr><td colspan="2">
                       <hr noshade="" size="1"/>
                   </td></tr>
  -                
  +
                   <tr>
                       <!-- LEFT SIDE NAVIGATION -->
  -                    <td width="20%" valign="top" nowrap="true">
  +                    <td width="15%" valign="top" nowrap="true">
                       #makeProject()
                       </td>
  -                    <td width="80%" align="left" valign="top">
  +                    <td width="85%" align="left" valign="top">
                       #set ($allSections = $root.getChild("body").getChildren("section"))
                       #foreach ( $section in $allSections )
                           #section ($section)
  
  
  
  1.30      +24 -15    jakarta-ojb/src/test/org/apache/ojb/repository.dtd
  
  Index: repository.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/repository.dtd,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- repository.dtd	9 Jan 2003 17:30:49 -0000	1.29
  +++ repository.dtd	15 Jan 2003 10:51:23 -0000	1.30
  @@ -43,13 +43,15 @@
   <!ELEMENT database-repository (jdbc-connection-descriptor*)>
   
   <!--
  -	The jdbc-connection-descriptor element specifies the default jdbc
  -	connection for the repository. All class-descriptor elements that do not
  -	specify their own jdbc-connection-descriptor will use the default jdbc
  -	connection.
  +	The jdbc-connection-descriptor element specifies the a jdbc
  +	connection for the repository.
   
   	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?, connection-pool?, sequence-manager?)>
   <!--
  @@ -60,10 +62,12 @@
       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
  +    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
  +    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
  @@ -89,13 +93,14 @@
           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.
  +    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.
  @@ -237,7 +242,7 @@
       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 could find under
  +    All sequence manager implementations you find will under
       org.apache.ojb.broker.util.sequence package named as SequenceManagerXXXImpl
   
       Sequence Manager implementations
  @@ -315,6 +320,8 @@
   	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.
     -->
  @@ -537,6 +544,8 @@
   	fk-pointing-to-this-class*,
   	fk-pointing-to-element-class*,
   	attribute*)>
  +
  +
   <!--
   	The name attribute holds the name of the persistent classes attribute.
   	If the PersistentFieldDefaultImpl is used there must be an attribute
  
  
  

Mime
View raw message