db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/xdocs metadata.xml project.xml objectcache.xml faq.xml
Date Wed, 11 Jun 2003 14:02:42 GMT
arminw      2003/06/11 07:02:42

  Modified:    xdocs    project.xml objectcache.xml faq.xml
  Added:       xdocs    metadata.xml
  Log:
  - update docs
  - add metadata doc
  
  Revision  Changes    Path
  1.19      +6 -5      db-ojb/xdocs/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/project.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- project.xml	5 Jun 2003 06:04:46 -0000	1.18
  +++ project.xml	11 Jun 2003 14:02:42 -0000	1.19
  @@ -19,9 +19,9 @@
   		<item name="Binaries" href="http://db.apache.org/builds/ojb"/>
   		<item name="Source"   href="http://db.apache.org/builds/ojb"/>
   		<!--item name="Binaries"    href="http://sourceforge.net/project/showfiles.php?group_id=13647"/-->
  -		<!--item name="Source"      href="http://sourceforge.net/project/showfiles.php?group_id=13647"/-->
	
  +		<!--item name="Source"      href="http://sourceforge.net/project/showfiles.php?group_id=13647"/-->
   	</menu>
  -    
  +
       <menu name="Tutorials">
      		<item name="PersistenceBroker API" href="/tutorial1.html"/>
      		<item name="OJB Queries"           href="/query.html"/>
  @@ -29,7 +29,7 @@
      		<item name="JDO API"               href="/tutorial4.html"/>
      		<item name="Advanced O/R"          href="/tutorial3.html"/>
       </menu>
  -    
  +
       <menu name="User Documentation">
      		<item name="JDBC types"            href="/jdbc-types.html"/>
      		<item name="The repository.xml"    href="/repository.html"/>
  @@ -53,10 +53,11 @@
      		<item name="The Objectcache"       href="/objectcache.html"/>
      		<item name="The Sequence Manager"  href="/sequencemanager.html"/>
      		<item name="The Lockmanager"       href="/lockmanager.html"/>
  +   		<item name="Metadata Handling"     href="/metadata.html"/>
      		<item name="Performance"           href="/performance.html"/>
       </menu>
  -  
  -    
  +
  +
       <menu name="Development">
         <item name="ToDo"                  href="/todo.html"/>
         <item name="project's Wiki"        href="http://nagoya.apache.org/wiki/apachewiki.cgi?OJBProjectPages"
/>
  
  
  
  1.4       +70 -6     db-ojb/xdocs/objectcache.xml
  
  Index: objectcache.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/objectcache.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- objectcache.xml	9 Apr 2003 09:28:52 -0000	1.3
  +++ objectcache.xml	11 Jun 2003 14:02:42 -0000	1.4
  @@ -1,4 +1,5 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
  +<!-- @version $Id$ -->
   <document>
   
     <properties>
  @@ -14,6 +15,7 @@
   <ul>
       <li><a href="#why cache">Why a cache?</a></li>
       <li><a href="#how works">How it works</a></li>
  +    <li><a href="#change">How to change the used ObjectCache implementation</a></li>
       <li><a href="#alternative">Alternative cache implementations</a></li>
       <li><a href="#implement cache">Implement your own cache</a></li>
       <li><a href="#"></a></li>
  @@ -31,6 +33,10 @@
   </p>
   
   
  +<P>
  +<font color="#ff0000"><i><b>important note: this document is not finished
yet.</b></i></font>
  +</P>
  +
   
   <subsection name="Why a cache?" anchor="why cache">
   <p>
  @@ -120,11 +126,72 @@
   </subsection>
   
   
  +<subsection name="How to change the used ObjectCache implementation" anchor="change">
  +<p>
  +To change the used <code>ObjectCache</code> implementation you only
  +need to set the property <code>ObjectCacheClass</code> in <a href="OJB.properties.txt">
  +OJB.properties</a> file:
  +<source>
  +
  +#-------------------------------------------------------------------
  +# Object cache
  +#-------------------------------------------------------------------
  +# The ObjectCacheClass entry tells OJB which concrete instance Cache
  +# implementation is to be used.
  +ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
  +#
  +</source>
  +</p>
  +</subsection>
  +
   
   
   <subsection name="Alternative cache implementations" anchor="alternative" >
   <p>
  -TODO
  +OJB was shipped with several <code>ObjectCache</code> implementations. All
  +implementations can be found in <code>org.apache.ojb.broker.cache</code> package.
  +</p>
  +
  +<p>
  +<b>ObjectCacheDefaultImpl</b><br/>
  +Per default OJB use a global reference based <code>ObjectCache</code>
  +implementation. It's a fast and simple cache but has some drawbacks.
  +There is no transaction isolation, when thread one modify an object,
  +thread two will see the modification when lookup the same object.
  +If you rollback/abort a transaction the corrupted objects will not
  +be removed from the cache. You have to do this using
  +<source>
  +    broker.removeFromCache(obj);
  +
  +    // or (using Identity object)
  +
  +    ObjectCache cache = broker.serviceObjectCache();
  +    cache.remove(oid);
  +</source>
  +by your own.
  +</p>
  +
  +<p>
  +<b>ObjectCachePerBrokerImpl</b><br/>
  +This local cache implementation allows to have dedicated caches per broker.
  +All calls are delegated to the cache associated with the currentBroker.
  +When the broker was closed (returned to pool) the cache was cleared.
  +</p>
  +
  +<p>
  +<b>ObjectCacheJCSImpl</b><br/>
  +A global <code>ObjectCache</code> implementation using JCS region for
  +each classname. More info see <a href="http://jakarta.apache.org/turbine/jcs/index.html">
  +turbine-JCS</a>.
  +</p>
  +
  +<p>
  +<b>ObjectCacheEmptyImpl</b><br/>
  +This is an 'empty' ObjectCache implementation.
  +Useful when caching was not desired.
  +To support 'circular references' this implementation
  +use a temporary map while store and delete operation
  +(this may change in further versions).
   </p>
   </subsection>
   
  @@ -132,7 +199,7 @@
   
   <subsection name="Implement your own cache" anchor="implement own">
   <p>
  -The OJB cache is quite simple but does a good job for most
  +The OJB cache implementations are quite simple but do a good job for most
   scenarios. If you need a more sophisticated cache (e.g. with MRU
   memory management strategies) you'll write your own implementation of
   the interface <code>ojb.broker.cache.ObjectCache</code>.
  @@ -140,10 +207,7 @@
   Integration of your implementation in OJB is easy since the object cache is
   a pluggable component. All you have to do, is to declare it in the
   <code>OJB.properties</code> file by setting the <code>ObjectCacheClass</code>
  -property:
  -<source>
  -ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheMyOwnImpl
  -</source>
  +property. <a href="#change">See more</a>.
   </p>
   
   <p>Of course I'm interested in your solutions! If you have
  
  
  
  1.21      +11 -5     db-ojb/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- faq.xml	10 Jun 2003 00:57:19 -0000	1.20
  +++ faq.xml	11 Jun 2003 14:02:42 -0000	1.21
  @@ -255,13 +255,13 @@
   
       <subsection name="How OJB performance compares to native JDBC programming?" anchor="FAQ34">
       <p>
  -        See section <a href="performance.html">Performance</a>.
  +        See section <a href="#FAQ32">faq max. performance</a> and <a href="performance.html">Performance</a>.
       </p>
       </subsection>
   
       <subsection name="How OJB performance compares to other O/R mapping tools?" anchor="FAQ35">
       <p>
  -        See section <a href="performance.html">Performance</a>.
  +        See section <a href="#FAQ32">faq max. performance</a> and <a href="performance.html">Performance</a>.
       </p>
       </subsection>
   
  @@ -637,7 +637,7 @@
       </p>
      </subsection>
   
  -   <subsection name="What are the OJB internal tables for?" anchor="FAQ10">
  +   <subsection name="What are the OJB internal tables for?" anchor="FAQ33">
       <p>
        <a href="platforms.html">please refer to this document</a>.
       </p>
  @@ -1015,18 +1015,24 @@
   dr.setClassDescriptor(cld);
       </source>
       </p>
  +    <p>
  +    Please see section <a href="metadata.html">Metadata Handling</a> in
  +    system documentation for further information.
  +    </p>
       </subsection>
   
   
       <subsection name="Global metadata changes at runtime?" anchor="FAQ28">
       <p>
  -    TODO
  +    Please see section <a href="metadata.html">Metadata Handling</a> in
  +    system documentation.
       </p>
       </subsection>
   
       <subsection name="Per thread metadata changes at runtime?" anchor="FAQ29">
       <p>
  -    TODO
  +    Please see section <a href="metadata.html">Metadata Handling</a> in
  +    system documentation.
       </p>
       </subsection>
   
  
  
  
  1.1                  db-ojb/xdocs/metadata.xml
  
  Index: metadata.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- @version $Id: metadata.xml,v 1.1 2003/06/11 14:02:42 arminw Exp $ -->
  <document>
  
    <properties>
      <author>Armin Waibel</author>
      <title>ObJectRelationalBridge System Documentation</title>
    </properties>
  
  <body>
  
  <section name="Metadata Handling">
  
  <ul>
      <li><a href="#intro">Introduction</a></li>
      <li><a href="#connection">Connection metadata</a></li>
      <li><a href="#persistentObject">Persistent object metadata</a></li>
      <li><a href="#globalChanges">Global metadata changes</a></li>
      <li><a href="#perThreadChanges">Per thread metadata changes</a></li>
      <li><a href="#"></a>
          <ul>
              <li><a href="#"></a></li>
          </ul>
      </li>
  </ul>
  
  <P>
  <font color="#ff0000"><i><b>important note: this document is not finished
yet.</b></i></font>
  </P>
  
  
  <subsection name="Introduction" anchor="intro">
  <p>
  To make OJB proper work it needs information about the used
  database connections, <a href="sequencemanager.html">sequence managers</a>,
  <a href="faq.html#FAQ23">connection pool configurations</a> (hence
  called <tt>connection metadata</tt>) and information about
  the persistent objects and their associations (hence called <tt>(persistent)
  object metadata</tt>) used in the supported API's.
  </p>
  <p>
  The connection metadata are completely decoupled from the persistent object
  metadata.
  </p>
  <p>
  <br/>
  In OJB there are several ways to make metadata available:
  <ul>
      <li>using xml configuration files parsed at start up</li>
      <li>set metadata at runtime by handling metadata 'container' classes</li>
      <li>parse additional xml configuration files and merge at runtime</li>
  </ul>
  </p>
  <p>
  All classes belonging to metadata handling can be find under
  <code>org.apache.ojb.broker.metadata</code>-package.
  <br/>
  The main class
  for metadata handling and entry point for metadata manipulation at
  runtime is <code>org.apache.ojb.broker.metadata.MetadataManager</code>.
  </p>
  </subsection>
  
  
  
  <subsection name="Connection metadata" anchor="connection">
  <p>
  TODO
  </p>
  </subsection>
  
  
  
  <subsection name="Persistent object metadata" anchor="persistentObject">
  <p>
  TODO
  </p>
  </subsection>
  
  
  
  <subsection name="Global metadata changes" anchor="globalChanges">
  <p>
  TODO
  </p>
  </subsection>
  
  
  
  <subsection name="Per thread metadata changes" anchor="perThreadChanges">
  <p>
  TODO
  </p>
  </subsection>
  
  </section>
  
  </body>
  </document>
  
  
  

Mime
View raw message