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 project.xml performance.xml faq.xml
Date Mon, 30 Jun 2003 13:46:25 GMT
arminw      2003/06/30 06:46:24

  Modified:    xdocs    project.xml performance.xml faq.xml
  Log:
  - add faq
  - move faq to performance.xml
  - fix typo
  
  Revision  Changes    Path
  1.22      +1 -1      db-ojb/xdocs/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/project.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- project.xml	29 Jun 2003 12:12:38 -0000	1.21
  +++ project.xml	30 Jun 2003 13:46:24 -0000	1.22
  @@ -12,7 +12,7 @@
         <item name="Features"                href="/features.html"/>
         <item name="Quickstart"              href="/quickstart.html"/>
         <item name="FAQs"                    href="/faq.html"/>
  -      <item name="Mailing lists"           href="/mail-lists.html"/>
  +      <!-- item name="Mailing lists"           href="/mail-lists.html"/-->
         <item name="Mail archives"           href="/mail-archives.html"/>
         <item name="references"              href="/references.html"/>
       </menu>
  
  
  
  1.13      +39 -1     db-ojb/xdocs/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- performance.xml	25 Jun 2003 16:43:18 -0000	1.12
  +++ performance.xml	30 Jun 2003 13:46:24 -0000	1.13
  @@ -20,6 +20,7 @@
       <li><a href="#Compares">How OJB compares to native JDBC programming?</a></li>
       <li><a href="#Multithreaded">OJB performance in multi-threaded environments</a></li>
       <li><a href="#OtherTools">How OJB compares to other O/R mapping tools?</a></li>
  +    <li><a href="#bestPerformance">What are the best settings for maximal performance?</a></li>
   </ul>
   
   
  @@ -404,6 +405,43 @@
   </p>
   
   </subsection>
  +
  +
  +<subsection name="What are the best settings for maximal performance?" anchor="bestPerformance">
  +    <p>
  +    We don't know, that depends from the environment OJB runs (hardware, database, driver,
application server, ...).
  +    But there are some settings which affect the performance:
  +    <ul>
  +        <li>
  +        The API you use, e.g. PB-api is much faster then the ODMG-api. See <a href="faq.html#FAQ9">which
  +        API</a> for more information.
  +        </li>
  +        <li>
  +        ConnectionFactory implementation / Connection pooling. See <a href="faq.html#FAQ23">connection
pooling</a>
  +        for more information.
  +        </li>
  +        <li>
  +        PersistentField class implementation.See <a href="OJB.properties.txt">OJB.properties
section
  +        'PersistentFieldClass'</a> for more information.
  +        </li>
  +        <li>
  +        Used sequence manager implementation. See <a href="sequencemanager.html">sequence
manager</a> for
  +        more information.
  +        </li>
  +        <li>
  +        Use of batch mode (when supported by the DB). See <a href="repository.dtd.txt">repository.dtd
  +        element 'jdbc-connection-descriptor'</a>
  +        for more information.
  +        </li>
  +        <li>
  +        PersistenceBroker pool size. See <a href="OJB.properties.txt">OJB.properties</a>
for more information.
  +        </li>
  +    </ul>
  +    </p>
  +    <p>
  +    To test the different settings use the tests of the <a href="#TestSuite">performance
test suite</a>.
  +    </p>
  +    </subsection>
   
   
   </section>
  
  
  
  1.26      +65 -67    db-ojb/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- faq.xml	29 Jun 2003 12:11:30 -0000	1.25
  +++ faq.xml	30 Jun 2003 13:46:24 -0000	1.26
  @@ -52,6 +52,7 @@
       <li><a href="#FAQ19">How can Collections of primitive typed elements be
mapped?</a></li>
   
       <li><a href="#FAQ20">How could class 'myClass' represent a collection of
'myClass' objects</a></li>
  +    <li><a href="#FAQ37">Needed to put user/password of database connection
in repository file?</a></li>
       <li><a href="#FAQ21">Many different database user - How do they login?</a></li>
       <li><a href="#FAQ22">How do I use multiple databases within OJB?</a></li>
       <li><a href="#FAQ23">How does OJB handle connection pooling?</a></li>
  @@ -293,8 +294,8 @@
   		OJB is also the persistence layer of choice in several books on
   		programming J2EE based enterprise business systems.
   		(see <a href="links.html">our links and references section</a>)<br/><br/>
  -		
  -		Reference projects and user testimonials are listed 
  +
  +		Reference projects and user testimonials are listed
   		<a href="references.html">here.</a>
       </p>
   
  @@ -337,35 +338,7 @@
   
      <subsection name="What are the best settings for maximal performance?" anchor="FAQ32">
       <p>
  -    We don't know, that depends from the environment OJB runs (hardware, database, driver,
application server, ...).
  -    But there are some settings which affect the performance:
  -    <ul>
  -        <li>The API you use, e.g. PB-api is much faster then the ODMG-api. See <a
href="#FAQ9">which API</a> for more information</li>
  -        <li>PersistenceBroker pool size. See <a href="OJB.properties.txt">OJB.properties</a>
for more information.</li>
  -        <li>Used sequence manager implementation. See <a href="sequencemanager.html">sequence
manager</a> for more information.</li>
  -        <li>ConnectionFactory implementation / Connection pooling. See <a href="#FAQ23">connection
pooling</a> for more information.</li>
  -        <li>Use of batch mode (when supported by the DB). See <a href="repository.dtd.txt">repository.dtd</a>
for more information.</li>
  -    </ul>
  -    </p>
  -    <p>
  -    To test the different settings OJB was shipped with a small performance
  -    test suite, call
  -    <code>bin\build.bat <font color="red">xxx</font></code> or
  -    <code>bin/build.sh <font color="red">xxx</font></code> with
xxx:
  -    <ul>
  -        <li><code>performance</code>
  -        <br/>
  -        This test compare the OJB api's with direct JDBC calls. To change the programm
  -        parameters see <code>build.xml</code> target <code>performance</code>.
  -        </li>
  -        <li><code>perf-test</code>
  -        <br/>
  -        This test checks the multi-threaded performance of OJB. To change the programm
  -        parameters see <code>build.xml</code> target <code>perf-test</code>.
It's also
  -        possible to run this test standalone, see javadocs <code>org.apache.ojb.broker.performance.PerfMain</code>
  -        </li>
  -    </ul>
  -    See for further information <a href="performance.html">performance section</a>.
  +    See <a href="performance.html">performance section</a>.
       </p>
       </subsection>
   
  @@ -730,6 +703,31 @@
       </p>
      </subsection>
   
  +
  +   <subsection name="Needed to put user/password of database connection in repository
file?" anchor="FAQ37">
  +   <p>
  +   There is no need to put user/password in the repository file (more exact in the
  +   <code>jdbc-connection-descriptor</code>). You can pass this
  +   information at runtime. See <a href="#FAQ21">Many different database user - How
do they login</a>.
  +   </p>
  +   <p>
  +   Only if you want to use convenience <code>PersistenceBroker</code> lookup
method
  +   of <code>PersistenceBrokerFactory</code>, OJB needs
  +   all database connection information in the configuration files. More details see
  +   <a href="repository.html">repository file doc - section jdbc-connection-descriptor
  +   <code>default-connection</code> attribute</a>
  +   <source>
  +   PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +
  +   // convenience for
  +
  +   PBKey pbKey = new PBKey(jcdAlias, user, passwd);
  +   PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(pbKey);
  +   </source>
  +   </p>
  +   </subsection>
  +
  +
   <subsection name="How could class 'myClass' represent a collection of 'myClass' objects"
anchor="FAQ20">
      <p>
       OJB can handle such recursive associations without problems.
  @@ -771,7 +769,7 @@
       <p>
       PersistenceBroker-api example:
       <source>
  -    PBKey user_1 = new PBKey("jcdAlias","User_1", "passwd");
  +    PBKey user_1 = new PBKey(jcdAlias,username, passwd);
       PersistenceBroker broker =
               PersistenceBrokerFactory.createPersistenceBroker(user_1);
       ...
  @@ -780,7 +778,7 @@
       <source>
       Implementation odmg = OJB.getInstance();
       Database db = odmg.newDatabase();
  -    db.open("jcdAlias#user_1,passwd", Database.OPEN_READ_WRITE);
  +    db.open("jcdAlias#username#passwd", Database.OPEN_READ_WRITE);
       ...
       </source>
       </p>
  @@ -1170,9 +1168,9 @@
   	<subsection name="How to set up Optimistic Locking">
   	<ol>
   		<li>
  -			In your table you need a dedicated column of type <code>INTEGER</code> 
  +			In your table you need a dedicated column of type <code>INTEGER</code>
   			or <code>TIMESTAMP</code>.
  -			Say the column is typed as <code>INTEGER</code> and named 
  +			Say the column is typed as <code>INTEGER</code> and named
   			<code>VERSION_MAINTAINED_BY_OJB</code>.
   		</li>
   		<li>
  @@ -1182,7 +1180,7 @@
   		</li>
   		<li>
   			in repository.xml you need a field-descriptor for this attribute.
  -   			this field-descriptor must specify <code>locking="true"</code> 
  +   			this field-descriptor must specify <code>locking="true"</code>
   		</li>
   		The resulting field-descriptor will look as follows:
   		<source><![CDATA[
  @@ -1194,13 +1192,13 @@
   />
   		]]></source>
   	</ol>
  -	For further reference see also 
  +	For further reference see also
   	<a href="repository.html#field-descriptor">the repository documentation</a>.
   	</subsection>
  -	
  -	
  +
  +
   	<subsection name="How to use OJB in a cluster">
  -		<p>	
  +		<p>
   			Q: I'm running a web site in a load-balanced/cluster environment.
   			Multiple servlet engines (different VMs/HTTP sessions), each running an OJB
   			instance, against a single shared database.
  @@ -1210,7 +1208,7 @@
   
   		<p>
   			<b>transactional isolation and locking</b><br/>
  -			If you are using the PersistenceBroker API 
  +			If you are using the PersistenceBroker API
   			use optimistic locking (OL) to let OJB handle write conflicts.
   			To use OL define a TIMESTAMP or INTEGER column and the respective Java attribute for
it.
   			In the field-descriptor of this attribute set the attribute
  @@ -1219,14 +1217,14 @@
   			If you are working with the ODMG API use the PersistenLockMapImpl,
   			by setting the respective flag in OJB.properties.
   		</p>
  -		
  +
   		<p>
   			<b>sequence numbers</b><br/>
  -			Use a SequenceManager that is safe across multiple JVMs. 
  -			The NextVal based SequenceManagers or any other SequenceManager 
  +			Use a SequenceManager that is safe across multiple JVMs.
  +			The NextVal based SequenceManagers or any other SequenceManager
   			based on database mechanisms will be fine.
   		</p>
  -		
  +
   		<p>
   			<b>caching</b><br/>
   			You could
  @@ -1251,7 +1249,7 @@
   			 available that covers these topics.
   		</p>
   	</subsection>
  -	
  +
   	<subsection name="How to work with the ObjectCacheEmptyImpl">
   		<p>
   			<b>Q: </b>I just tried to turn caching off by using ObjectCacheEmptyImpl
setting
  @@ -1265,51 +1263,51 @@
   			<b>A: </b>The Problem you see is due to circular references in your data.
   			Say A references B and B has a backreference to A.
   			<br/>
  -			Now we load A from the DB. If autoretrieve="true" for the reference-descriptor 
  +			Now we load A from the DB. If autoretrieve="true" for the reference-descriptor
   			defining the reference to B, OJB will also load B.
  -			If autoretrieve="true" for the B-reference-descriptor describing 
  +			If autoretrieve="true" for the B-reference-descriptor describing
   			the back-reference to A, OJB must retrieve A. And here is the key point.
   			<br/>
  -			If we use the defaultcache A will be in the cache already, as it was loaded first. 
  +			If we use the defaultcache A will be in the cache already, as it was loaded first.
   			So OJB will simply lookup A from the cache. No endless recursion!
   			<br/>
  -			But if we use the emptycache, A will not be cached. So OJB must load A from the DB.

  +			But if we use the emptycache, A will not be cached. So OJB must load A from the DB.
   			And then again B is retrieved, etc., etc.
   			There's you endless recursion.
   			<br/>
  -			In other words: A non-empty cache is needed to allow proper loading of circular 
  +			In other words: A non-empty cache is needed to allow proper loading of circular
   			references. (Other O/R tools like TopLink work the same way).
   			<br/>
  -			If you still want to use the EmptyCacheImpl you should set autoretrieve="false" 
  -			and load references explicitely by broker.retrieveReference(...).		
  +			If you still want to use the EmptyCacheImpl you should set autoretrieve="false"
  +			and load references explicitely by broker.retrieveReference(...).
   		</p>
   	</subsection>
  -	
  +
   	<subsection name="Why must my persisten class implement javax.jdo.spi.PersistenceCapable">
  -		As specified by JDO all persistent classe must implement the interface 
  +		As specified by JDO all persistent classe must implement the interface
   		<code>javax.jdo.spi.PersistenceCapable</code>.
  -		If a class does not implement this interface a JDO implementation does not know how to

  +		If a class does not implement this interface a JDO implementation does not know how to
   		handle it.
   		<br/>
  -		On the other hand the JDO spec claims to provide transaparent persistence. 
  -		That is no persistence class is required to implement a specific interface or 
  +		On the other hand the JDO spec claims to provide transaparent persistence.
  +		That is no persistence class is required to implement a specific interface or
   		to be derived from a special base class.
   		<br/>
  -		Sounds like a contradiction? It is! The JDO spec resolves this contradiction by 
  -		stating that a JDO implemention is responsible to add the methods required by 
  -		<code>javax.jdo.spi.PersistenceCapable</code> to the the user classes. 
  -		This "injection" could be achieved by Pre- or Post-processing. 
  -		The strategy most implementations use is called "bytecode-enhancement". 
  -		This is a postprocesing step that adds the required methods to the .class files 
  +		Sounds like a contradiction? It is! The JDO spec resolves this contradiction by
  +		stating that a JDO implemention is responsible to add the methods required by
  +		<code>javax.jdo.spi.PersistenceCapable</code> to the the user classes.
  +		This "injection" could be achieved by Pre- or Post-processing.
  +		The strategy most implementations use is called "bytecode-enhancement".
  +		This is a postprocesing step that adds the required methods to the .class files
   		of the persistent user classes.
   		<br/>
   		The JDO Reference implementation also uses bytecode-enhancement.
  -		In order to enhance the Product class to implement the 
  -		<code>javax.jdo.spi.PersistenceCapable</code> interface use the ant target

  +		In order to enhance the Product class to implement the
  +		<code>javax.jdo.spi.PersistenceCapable</code> interface use the ant target
   		"enhance-jdori" before launching the tutorial5 application.
   		This is documentated in the first section of tutorial4.html.
   	</subsection>
  -	
  +
     </section>
    </body>
   </document>
  
  
  

Mime
View raw message