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 performance.xml faq.xml
Date Tue, 10 Jun 2003 00:57:19 GMT
arminw      2003/06/09 17:57:19

  Modified:    xdocs    performance.xml faq.xml
  Log:
  update docs:
  - add more comments
  - use perf-test instead performance2
  
  Revision  Changes    Path
  1.9       +95 -109   db-ojb/xdocs/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- performance.xml	7 Feb 2003 20:06:17 -0000	1.8
  +++ performance.xml	10 Jun 2003 00:57:19 -0000	1.9
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +<!-- @version $Id$ -->
   <document>
   
     <properties>
  @@ -13,22 +14,16 @@
   
   
   <ul>
  -    <li><a href="#1">Introduction</a></li>
  -    <li><a href="#2">The Performance Test Suite</a></li>
  -    <li><a href="#3">Interpreting test results</a></li>
  -    <li><a href="#4">How OJB compares to native JDBC programming?</a></li>
  -    <li><a href="#5">OJB performance in multi-threaded environments</a></li>
  -    <li><a href="#6">How OJB compares to other O/R mapping tools?</a></li>
  -    <li><a href="#7">Using OJB to write clean JDBC code</a></li>
  +    <li><a href="#Introduction">Introduction</a></li>
  +    <li><a href="#TestSuite">The Performance Test Suite</a></li>
  +    <li><a href="#Interpreting">Interpreting test results</a></li>
  +    <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>
   </ul>
   
  -<P>
  -<font color="#ff0000"><i><b>important note: this document is not finished
yet.</b></i></font>
  -</P>
   
  -
  -
  -<subsection name="Introduction" anchor="1">
  +<subsection name="Introduction" anchor="Introduction">
   <p><i>&quot;
   <b>There is no such thing as a free lunch.&quot;</b><br/>
   </i>
  @@ -60,20 +55,32 @@
   </p>
   </subsection>
   
  -<subsection name="The Performance Test Suite" anchor="2">
  +<subsection name="The Performance Test Suite" anchor="TestSuite">
   <p>
   The <i>OJB Performance Test Suite</i> allows to compare OJB
  -against <a href="#4">native JDBC programming</a>
  -against your RDBMS of choice and run OJB in a <a href="#5">virtual multithreaded
  -environment</a>. Further on you only need to implement two test
  -classes to <a href="#6">compare OJB against any O/R mapping tool</a>.
  +against <a href="#Compares">native JDBC programming</a>
  +against your RDBMS of choice and run OJB in a <a href="#Multithreaded">virtual multithreaded
  +environment</a>. Further on it is possible to
  +<a href="#OtherTools">compare OJB against any O/R mapping tool</a> using a
simple
  +framework.
   </p>
   <p>
  -All tests are integrated in the OJB build script,
  -perform the according ant target.
  +All tests are integrated in the OJB build script, you only need to
  +perform the according ant target:
  +<source>
  +    bin\build.bat targetName
  +    or
  +    bin/build.sh targetName
  +</source>
  +The following targets exist:
  +<ul>
  +<li><code>performance</code> test OJB API implementations (PB, ODMG)
against native JDBC</li>
  +<li><code>perf-test</code> multithreaded performance/stress test of PB/ODMG
api</li>
  +<li>[<code>performance3</code> multithreaded test against two different
databases]</li>
  +</ul>
   </p>
   <p>
  -By changing the JdbcConnectionDescriptor in the repository.xml file
  +By changing the JdbcConnectionDescriptor in the configuration files
   you can point to your specific RDBMS. Please
   refer to this <a href="platforms.html">document for details</a>.
   </p>
  @@ -81,7 +88,7 @@
   
   
   
  -<subsection name="Interpreting test results" anchor="3">
  +<subsection name="Interpreting test results" anchor="Interpreting">
   <p>
   Interpreting the result of these benchmarks carefully will help to
   decide whether using OJB is viable for specific application scenarios
  @@ -94,10 +101,11 @@
   <p>
   If the decision made to use an O/R mapping tool the comparison with
   other tools helps to find the best one for the thought scenario.
  -<br/>
   But performance shouldn't be the only reason to take a specific
   O/R tool. There are many other points to consider:
  -<br/>- Usability of the supported API's
  +</p>
  +<p>
  +- Usability of the supported API's
   <br/>- Flexibility of the framework
   <br/>- Scalability of the framework
   <br/>- Community support
  @@ -109,30 +117,11 @@
   
   
   
  -<subsection name="How OJB compares to native JDBC programming?" anchor="4">
  -
  -<font color="#ff0000"><i><b>
  -TODO
  -</b></i></font>
  -
  -<p>
  -test.ojb.broker.PerformanceTest
  -test.ojb.odmg.PerformanceTest
  -test.ojb.broker.PerformanceJdbcReferenceTest
  -<br/>
  -<br/>
  -<H3>the Test scenarios</H3>
  -<H4>inserting objects</H4>
  -<H4>updating objects</H4>
  -<H4>retrieving objects by primary key based lookup</H4>
  -<H4>perform last test again to test caching behaviour</H4>
  -<H4>fetch objects from a cursor</H4>
  -<H4>deleting objects</H4>
  -<H3>running the test suite</H3>
  -</p>
  -
  +<subsection name="How OJB compares to native JDBC programming?" anchor="Compares">
   <p>
  -The test suite is integrated into the OJB build mechanism. You can
  +OJB is shipped with a test compares native JDBC with ODMG and
  +PB-API implementation.
  +This part of the test suite is integrated into the OJB build mechanism. You can
   invoke it by typing <code>bin\build.bat performance</code> or
   <code>bin/build.sh performance</code>.
   </p>
  @@ -142,41 +131,43 @@
   the Hypersonic SQL shipped with OJB. A typical output looks like
   follows:
   <source>
  -performance:
  -      [ojb] .[performance] INFO: Test for PB-api
  -      [ojb] [performance] INFO: inserting 2500 Objects: 1462 msec
  -      [ojb] [performance] INFO: updating 2500 Objects: 942 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 761 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 50 msec
  -      [ojb] [performance] INFO: fetching 2500 Objects: 260 msec
  -      [ojb] [performance] INFO: deleting 2500 Objects: 341 msec
  -      [ojb] [performance] INFO:
  -      [ojb] [performance] INFO: inserting 2500 Objects: 681 msec
  -      [ojb] [performance] INFO: updating 2500 Objects: 971 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 621 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 30 msec
  -      [ojb] [performance] INFO: fetching 2500 Objects: 210 msec
  -      [ojb] [performance] INFO: deleting 2500 Objects: 301 msec
  -      [ojb] [performance] INFO:
  -      [ojb] [performance] INFO: inserting 2500 Objects: 761 msec
  -      [ojb] [performance] INFO: updating 2500 Objects: 901 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 631 msec
  -      [ojb] [performance] INFO: querying 2500 Objects: 30 msec
  -      [ojb] [performance] INFO: fetching 2500 Objects: 221 msec
  -      [ojb] [performance] INFO: deleting 2500 Objects: 300 msec
  + [ojb] .[performance] INFO: Test for PB-api
  + [ojb] [performance] INFO:
  + [ojb] [performance] INFO: inserting 2500 Objects: 621 msec
  + [ojb] [performance] INFO: updating 2500 Objects: 921 msec
  + [ojb] [performance] INFO: querying 2500 Objects: 511 msec
  + [ojb] [performance] INFO: querying 2500 Objects: 20 msec
  + [ojb] [performance] INFO: fetching 2500 Objects: 130 msec
  + [ojb] [performance] INFO: deleting 2500 Objects: 331 msec
  +
  + .....
  +
  +[jdbc] .[performance] INFO: Test for native JDBC
  +[jdbc] [performance] INFO:
  +[jdbc] [performance] INFO: inserting 2500 Objects: 450 msec
  +[jdbc] [performance] INFO: updating 2500 Objects: 571 msec
  +[jdbc] [performance] INFO: querying 2500 Objects: 341 msec
  +[jdbc] [performance] INFO: querying 2500 Objects: 320 msec
  +[jdbc] [performance] INFO: fetching 2500 Objects: 20 msec
  +[jdbc] [performance] INFO: deleting 2500 Objects: 150 msec
   
  -      [ojb] Time: 10,916
  +.....
   
  -      [ojb] OK (1 test)
   </source>
  -
  +</p>
  +<p>
  +It's easy to change target database. Please
  +refer to this <a href="platforms.html">document for details</a>.
  +<br/>
  +Also it's possible to change the number of test objects by
  +editing the ant-target in build.xml.
   </p>
   </subsection>
   
   
   
   
  -<subsection name="OJB performance in multi-threaded environments" anchor="5">
  +<subsection name="OJB performance in multi-threaded environments" anchor="Multithreaded">
   
   <p>
   This test was created to check the performance and stability of the
  @@ -234,31 +225,38 @@
   
   
   
  -<subsection name="How OJB compares to other O/R mapping tools?" anchor="6">
  +<subsection name="How OJB compares to other O/R mapping tools?" anchor="OtherTools">
   
   <p>
  -Many user ask this question and we don't know the answer. But OJB was
  +Many user ask this question and there is more than one answer. But OJB was
   shipped with a simple performance framework which allows a rudimentarily
   comparision of OJB with other (java-based) O/R mapping tools.
   <br/>
   Call <code>bin\build.bat perf-test-jar</code> or <code>bin/build.sh perf-test-jar</code>
   to build the jar file contain all necessary classes to set up a test with an
  -arbitrary O/R mapper. After build the jar is in <code>/dist</code>.
  +arbitrary O/R mapper. After build the <code>db-ojb-XXX-performance.jar</code>
could
  +be found in <code>[db-ojb]/dist</code> directory.
   </p>
   <p>
   <b>Steps to set up the test:</b>
   <br/>
  -You could find a example implementation (test for the PB-/ODMG-api) called
  -<code>org.apache.ojb.broker.OJBPerfTest</code> in the test-sources directory.
  +<p>
  +You could find a example implementation called
  +<code>org.apache.ojb.broker.OJBPerfTest</code> in the test-sources directory
  +under <code>[db-ojb]/src/test/org/apache/ojb</code> (when using source-distribution).
  +This implementation class is used to compare the PB-API with ODMG-API and to test
  +the performance of the API implementations. See more section
  +<a href="#Multithreaded">multi-threaded performance</a>
  +</p>
   <ul>
   <li>Implement a class derived from <code>org.apache.ojb.performance.PerfTest</code></li>
   <li>Implement a class derived from <code>org.apache.ojb.performance.PerfHandle</code></li>
  -<li>If the persistent objects of your mapping tool must be derived from a special
base
  -class or must be implement a special interface write a class by implementing
  -the <code>org.apache.ojb.performance.PerfArticle</code> interface and override
  -<code>newPerfArticle()</code> in your PerfHandle implementation class.
  +<li>[If persistent objects used within your mapping tool must be derived from a special
base
  +class or must be implement a special interface write your own persistent object class
  +by implementing <code>org.apache.ojb.performance.PerfArticle</code> interface
and override
  +method <code>newPerfArticle()</code> in your PerfHandle implementation class.
   <br/>
  -Otherwise the test use a default implementation of this interface.</li>
  +Otherwise the test use a default implementation of this interface.]</li>
   </ul>
   That's it!
   </p>
  @@ -283,45 +281,33 @@
   It's possible to run the test using <code>org.apache.ojb.performance.PerfMain</code>.
   <source>
   java -classpath CLASSPATH org.apache.ojb.performance.PerfMain
  -
  -[comma separated list of PerfTest implementation classes, no blanks!]
  -
  -[number of test loops]
  -
  -[number of threads]
  -
  -[number of insert/fetch/delete loops per thread]
  -
  -[boolean - run in stress mode if set true,
  -run in performance mode if set false, default false]
  + [comma separated list of PerfTest implementation classes, no blanks!]
  + [number of test loops]
  + [number of threads]
  + [number of insert/fetch/delete loops per thread]
  + [boolean - run in stress mode if set true,
  +  run in performance mode if set false, default false]
   
   For example:
  -java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000 fale
  +java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000 false
   </source>
   
   </p>
  -
  +<p>
  +Take care of compareable configuration properties when run
  +performance tests with different O/R tools (caching, locking,
  +sequence key generation, connection pooling, ...).
  +</p>
   <p>
   <font color="#ff0000"><b>Please:</b></font>
  -<br/>Don't start flame wars by posting performance results to the
  +<br/>Don't start flame wars by posting performance results to
   mailing lists made with this simple test. This test was created for
  -OJB QA and to give a clue how good or bad OJB performs. NOT to start
  +OJB QA and to give a clue how good or bad OJB performs, NOT to start
   discussion like <i>XY is 12% faster then XZ</i>!!.
   </p>
   
   </subsection>
   
  -
  -
  -
  -<subsection name="Using OJB to write clean JDBC code" anchor="7">
  -
  -<font color="#ff0000"><i><b>
  -TODO
  -</b></i></font>
  -
  -
  -</subsection>
   
   </section>
   </body>
  
  
  
  1.20      +113 -94   db-ojb/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- faq.xml	5 Jun 2003 20:42:10 -0000	1.19
  +++ faq.xml	10 Jun 2003 00:57:19 -0000	1.20
  @@ -13,62 +13,62 @@
     <section name="Frequently Asked Questions" anchor="faq">
     <p><b>General</b></p>
     <ul>
  -    <li><a href="#3">Why OJB? Why do we need another O/R mapping tool?</a></li>
  -    <li><a href="#8">How is OJB related to ODMG and JDO?</a></li>
  -    <li><a href="#17">What are the OJB design principals?</a></li>
  -    <li><a href="#18">Where can I learn more about Object/Relational mapping
in general?</a></li>
  -    <li><a href="#34">How OJB performance compares to native JDBC programming?</a></li>
  -    <li><a href="#35">How OJB performance compares to other O/R mapping tools?</a></li>
  +    <li><a href="#FAQ3">Why OJB? Why do we need another O/R mapping tool?</a></li>
  +    <li><a href="#FAQ8">How is OJB related to ODMG and JDO?</a></li>
  +    <li><a href="#FAQ17">What are the OJB design principals?</a></li>
  +    <li><a href="#FAQ18">Where can I learn more about Object/Relational mapping
in general?</a></li>
  +    <li><a href="#FAQ34">How OJB performance compares to native JDBC programming?</a></li>
  +    <li><a href="#FAQ35">How OJB performance compares to other O/R mapping
tools?</a></li>
       <li><a href="#Is OJB ready for production environments?">Is OJB ready for
production environments?</a></li>
     </ul>
   
     <p><b>Getting started</b></p>
      <ul>
  -    <li><a href="#1">Help! I'm having problems installing and using OJB!</a></li>
  -    <li><a href="#2">Help! I still have serious problems installing OJB!</a></li>
  -    <li><a href="#4">Does OJB support my RDBMS?</a></li>
  -    <li><a href="#33">What are the OJB internal tables for?</a></li>
  +    <li><a href="#FAQ1">Help! I'm having problems installing and using OJB!</a></li>
  +    <li><a href="#FAQ2">Help! I still have serious problems installing OJB!</a></li>
  +    <li><a href="#FAQ4">Does OJB support my RDBMS?</a></li>
  +    <li><a href="#FAQ33">What are the OJB internal tables for?</a></li>
   
   	</ul>
   
     <p><b>OJB APIs</b></p>
     <ul>
  -    <li><a href="#9">What are the differences between the PersistenceBroker
API and the ODMG API? Which one should I use in my applications?</a></li>
  -    <li><a href="#15">I don't like OQL, can I use the PersistenceBroker Queries
within ODMG?</a></li>
  -    <li><a href="#16">The OJB JDO implementation is not finished, how can I
start using OJB?</a></li>
  +    <li><a href="#FAQ9">What are the differences between the PersistenceBroker
API and the ODMG API? Which one should I use in my applications?</a></li>
  +    <li><a href="#FAQ15">I don't like OQL, can I use the PersistenceBroker
Queries within ODMG?</a></li>
  +    <li><a href="#FAQ16">The OJB JDO implementation is not finished, how can
I start using OJB?</a></li>
   
     </ul>
   
     <p><b>Howto</b></p>
     <ul>
  -    <li><a href="#5">How to use OJB with my RDBMS?</a></li>
  -    <li><a href="#32">What the best settings for maximal performance?</a></li>
  -    <li><a href="#6">How to page and sort?</a></li>
  -    <li><a href="#7">What about performance and memory usage if thousands of
objects matching a query are returned as a Collection?</a></li>
  -    <li><a href="#11">When is it helpful to use Proxy Classes?</a></li>
  -    <li><a href="#12">How can I convert data between RDBMS and OJB?</a></li>
  -    <li><a href="#13">How can I trace and/or profile SQL statements executed
by OJB?</a></li>
  -    <li><a href="#14">How does OJB manage foreign keys?</a></li>
  -    <li><a href="#19">How can Collections of primitive typed elements be mapped?</a></li>
  -
  -    <li><a href="#20">How could class 'myClass' represent a collection of 'myClass'
objects</a></li>
  -    <li><a href="#21">Many different database user - How do they login?</a></li>
  -    <li><a href="#22">How do I use multiple databases within OJB?</a></li>
  -    <li><a href="#23">How does OJB handle connection pooling?</a></li>
  -    <li><a href="#24">Can I directly obtain a <code>java.sql.Connection</code>
within OJB?</a></li>
  -    <li><a href="#25">Is it possible to perform my own sql-queries in OJB?</a></li>
  -    <li><a href="#31">Start OJB without a repository file?</a></li>
  -    <li><a href="#26">Connect to database at runtime?</a></li>
  -    <li><a href="#27">Add new persistent objects (<code>class-descriptor</code>)
at runtime?</a></li>
  -    <li><a href="#28">Global metadata changes at runtime?</a></li>
  -    <li><a href="#29">Per thread metadata changes at runtime?</a></li>
  -    <li><a href="#30">Is it possible to use OJB within EJB's?</a></li>
  -	<li><a href="#36">Can OJB handle ternary (or higher) associations?</a></li>
  +    <li><a href="#FAQ5">How to use OJB with my RDBMS?</a></li>
  +    <li><a href="#FAQ32">What the best settings for maximal performance?</a></li>
  +    <li><a href="#FAQ6">How to page and sort?</a></li>
  +    <li><a href="#FAQ7">What about performance and memory usage if thousands
of objects matching a query are returned as a Collection?</a></li>
  +    <li><a href="#FAQ11">When is it helpful to use Proxy Classes?</a></li>
  +    <li><a href="#FAQ12">How can I convert data between RDBMS and OJB?</a></li>
  +    <li><a href="#FAQ13">How can I trace and/or profile SQL statements executed
by OJB?</a></li>
  +    <li><a href="#FAQ14">How does OJB manage foreign keys?</a></li>
  +    <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="#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>
  +    <li><a href="#FAQ24">Can I directly obtain a <code>java.sql.Connection</code>
within OJB?</a></li>
  +    <li><a href="#FAQ25">Is it possible to perform my own sql-queries in OJB?</a></li>
  +    <li><a href="#FAQ31">Start OJB without a repository file?</a></li>
  +    <li><a href="#FAQ26">Connect to database at runtime?</a></li>
  +    <li><a href="#FAQ27">Add new persistent objects (<code>class-descriptor</code>)
at runtime?</a></li>
  +    <li><a href="#FAQ28">Global metadata changes at runtime?</a></li>
  +    <li><a href="#FAQ29">Per thread metadata changes at runtime?</a></li>
  +    <li><a href="#FAQ30">Is it possible to use OJB within EJB's?</a></li>
  +	<li><a href="#FAQ36">Can OJB handle ternary (or higher) associations?</a></li>
   	<li><a href="#How to map a list of Strings">How to map a list of Strings</a></li>
   
      </ul>
   
  -   <subsection name="Help! I'm having problems installing and using OJB!" anchor="1">
  +   <subsection name="Help! I'm having problems installing and using OJB!" anchor="FAQ1">
       <p>
        Please read the <a href="quickstart.html">OJB Quick Start</a> document.
OJB is a
        powerful and complex system - installing and configuring OJB is not a trivial task.
  @@ -83,7 +83,7 @@
       </p>
      </subsection>
   
  -   <subsection name="Help! I still have serious problems installing OJB!" anchor="2">
  +   <subsection name="Help! I still have serious problems installing OJB!" anchor="FAQ2">
       <p>
   	 The following answer is quoted from the OJB user-list. It is from a
   	 reply to a user who had serious problems getting started with OJB.
  @@ -167,7 +167,7 @@
       </p>
      </subsection>
   
  -   <subsection name="Why OJB? Why do we need another O/R mapping tool?" anchor="3">
  +   <subsection name="Why OJB? Why do we need another O/R mapping tool?" anchor="FAQ3">
       <p>
        here are some outstanding OJB features:
        <ul>
  @@ -239,27 +239,27 @@
       </p>
      </subsection>
   
  -   <subsection name="What are the OJB design principals?" anchor="17">
  +   <subsection name="What are the OJB design principals?" anchor="FAQ17">
       <p>
       OJB has a "pattern driven" design.
       <a href="links.html#design">Please refer to this document for more details</a>
       </p>
      </subsection>
   
  -   <subsection name="Where can I learn more about Object/Relational mapping in general?"
anchor="18">
  +   <subsection name="Where can I learn more about Object/Relational mapping in general?"
anchor="FAQ18">
       <p>
       <a href="links.html#further readings on O/R mapping">We have a link list pointing
to further readings.</a>
       </p>
      </subsection>
   
   
  -    <subsection name="How OJB performance compares to native JDBC programming?" anchor="34">
  +    <subsection name="How OJB performance compares to native JDBC programming?" anchor="FAQ34">
       <p>
           See section <a href="performance.html">Performance</a>.
       </p>
       </subsection>
   
  -    <subsection name="How OJB performance compares to other O/R mapping tools?" anchor="35">
  +    <subsection name="How OJB performance compares to other O/R mapping tools?" anchor="FAQ35">
       <p>
           See section <a href="performance.html">Performance</a>.
       </p>
  @@ -293,7 +293,7 @@
       <p>
       	<a href="http://www.openemed.org/">The OpenEMed project</a>
       	<br/>
  -    	<a href="http://www.ebi.ac.uk/intact/">The IntAct project</a>    	
  +    	<a href="http://www.ebi.ac.uk/intact/">The IntAct project</a>
       </p>
   	<p><b>Here are some user testimonials from the user mailing list:</b></p>
   	<p>
  @@ -354,35 +354,35 @@
   		to achieve with it. And there have been some tricky aspects,
   		but these could be solved by simple workarounds and small hacks.
   		<br/><br/>
  -		
  -		The main thing about OJB is that AFAIK it has an overall clean 
  -		design, and it far beats making your own database abstraction 
  +
  +		The main thing about OJB is that AFAIK it has an overall clean
  +		design, and it far beats making your own database abstraction
   		layer and object/relational mapper. We certainly do not use all
   		of it, only the Persistence Broker parts, so there was less to
  -		learn. We love the virtual proxy and collection proxy concepts, 
  +		learn. We love the virtual proxy and collection proxy concepts,
   		the criteria objects for building queries, and the nice little
  -		hidden features that you find when you start to learn the system."	
  +		hidden features that you find when you start to learn the system."
   	</p>
   
   	<p>
  -		"My Company is building medium to large scale, mission critical 
  +		"My Company is building medium to large scale, mission critical
   		applications (100 - 5.000 concurrent users) for our customers.
   		Our largest customer is KarstadtQuelle, Europes largest retail company.
   		The next big system that will go in production (in June) is the new
   		logistics system for the stationary logistics of Karstadt.<br/>
  -		
  +
   		Of course we are using OJB in those Systems!
   		We have several OJB based systems now in production for over a year.
   		We never had any OJB releated problems in production.<br/>
  -		
  -		Most problems we faced during development were related to the 
  +
  +		Most problems we faced during development were related to the
   		learning curve developers had to face who were new to O/R mapping."
   	</p>
  -	
  +
       </subsection>
   
   
  -   <subsection name="How can Collections of primitive typed elements be mapped?" anchor="19">
  +   <subsection name="How can Collections of primitive typed elements be mapped?" anchor="FAQ19">
       <p>
   		The first thing to ask is:
   		How are these primitive typed elements (Strings are also treated as primitive types here)
  @@ -403,28 +403,28 @@
      </subsection>
   
   
  -   <subsection name="Does OJB support my RDBMS?" anchor="4">
  +   <subsection name="Does OJB support my RDBMS?" anchor="FAQ4">
       <p>
        <A HREF="platforms.html">please refer to this document</A>.
       </p>
      </subsection>
   
  -   <subsection name="How to use OJB with my RDBMS?" anchor="5">
  +   <subsection name="How to use OJB with my RDBMS?" anchor="FAQ5">
       <p>
        <A HREF="platforms.html">please refer to this document</A>.
       </p>
      </subsection>
   
   
  -   <subsection name="What are the best settings for maximal performance?" anchor="32">
  +   <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="#9">which API</a> for more information</li>
  +        <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="#23">connection
pooling</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>
  @@ -439,19 +439,19 @@
           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>performance2</code>
  +        <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>performance2</code>.
It's also
  -        possible to run this test standalone, see javadocs <code>org.apache.ojb.broker.Performance2</code>
  +        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</a>
section.
  +    See for further information <a href="performance.html">performance section</a>.
       </p>
       </subsection>
   
   
  -   <subsection name="How to page and sort?" anchor="6">
  +   <subsection name="How to page and sort?" anchor="FAQ6">
       <p>
        Sorting can be configured by
        org.apache.ojb.broker.query.Criteria::orderBy(column_name).
  @@ -471,7 +471,7 @@
      </subsection>
   
      <subsection name="What about performance and memory usage if thousands of
  -    objects matching a query are returned as a Collection?" anchor="7">
  +    objects matching a query are returned as a Collection?" anchor="FAQ7">
       <p>
        You can do two things to enhance performance if you have to process queries
        that produce thousands of result objects:
  @@ -503,7 +503,7 @@
       </p>
      </subsection>
   
  -   <subsection name="How is OJB related to ODMG and JDO?" anchor="8">
  +   <subsection name="How is OJB related to ODMG and JDO?" anchor="FAQ8">
       <p>
        ODMG is a standard API for Object Persistence specified by the ODMG
        consortium (www.odmg.org).
  @@ -570,7 +570,7 @@
      </subsection>
   
      <subsection name="What are the differences between the PersistenceBroker API and
  -     the ODMG API? Which one should I use in my applications?" anchor="9">
  +     the ODMG API? Which one should I use in my applications?" anchor="FAQ9">
       <p>
        The PersistenceBroker (PB) provides a minimal API for transparent
        persistence:
  @@ -637,13 +637,13 @@
       </p>
      </subsection>
   
  -   <subsection name="What are the OJB internal tables for?" anchor="10">
  +   <subsection name="What are the OJB internal tables for?" anchor="FAQ10">
       <p>
        <a href="platforms.html">please refer to this document</a>.
       </p>
      </subsection>
   
  -   <subsection name="When is it helpful to use Proxy Classes?" anchor="11">
  +   <subsection name="When is it helpful to use Proxy Classes?" anchor="FAQ11">
       <p>
        Proxy classes can be used for &quot;lazy loading&quot; aka
        &quot;lazy materialization&quot;. Using Proxy classes can help you in
  @@ -673,7 +673,7 @@
       </p>
      </subsection>
   
  -   <subsection name="How can I convert data between RDBMS and OJB?" anchor="12">
  +   <subsection name="How can I convert data between RDBMS and OJB?" anchor="FAQ12">
       <p>
        For Example I have a DB column of type INTEGER but a class atribute of type
        boolean. How can I provide an automatic mapping with OJB?
  @@ -687,7 +687,7 @@
   
   
   
  -   <subsection name="How can I trace and/or profile SQL statements executed by OJB?"
anchor="13">
  +   <subsection name="How can I trace and/or profile SQL statements executed by OJB?"
anchor="FAQ13">
       <p>
      	 OJB  ships with out of the box support for P6Spy.
   	 P6Spy is a JDBC proxy. It delegates all JDBC calls to the
  @@ -713,7 +713,7 @@
       </p>
      </subsection>
   
  -   <subsection name="How does OJB manage foreign keys?" anchor="14">
  +   <subsection name="How does OJB manage foreign keys?" anchor="FAQ14">
       <p>
   	 Automatically! you just define 1:1, 1:n or m:n associations in the
   	 repository_user.xml file.
  @@ -725,7 +725,7 @@
       </p>
      </subsection>
   
  -   <subsection name="I don't like OQL, can I use the PersistenceBroker Queries within
ODMG?" anchor="15">
  +   <subsection name="I don't like OQL, can I use the PersistenceBroker Queries within
ODMG?" anchor="FAQ15">
       <p>
   	 Yes you can! The ODMG implementation relies on PB Queries internally!
   	 Several users (including myself) are doing this.
  @@ -760,7 +760,7 @@
       </source>
      </subsection>
   
  -   <subsection name="The OJB JDO implementation is not finished, how can I start using
OJB?" anchor="16">
  +   <subsection name="The OJB JDO implementation is not finished, how can I start using
OJB?" anchor="FAQ16">
       <p>
    	 I recommend to not use JDO now, but to use the existing ODMG api
   	 for the time being.
  @@ -811,7 +811,7 @@
       </p>
      </subsection>
   
  -<subsection name="How could class 'myClass' represent a collection of 'myClass' objects"
anchor="20">
  +<subsection name="How could class 'myClass' represent a collection of 'myClass' objects"
anchor="FAQ20">
      <p>
       OJB can handle such recursive associations without problems.
       <ul>
  @@ -838,7 +838,7 @@
      </subsection>
   
   
  -    <subsection name="Many different database user - How do they login?" anchor="21">
  +    <subsection name="Many different database user - How do they login?" anchor="FAQ21">
       <p>
       There are two ways to do that. Define for each user a <code>jdbc-connection-descriptor</code>
       (unattractive way, because we have to add each new user to repository file),
  @@ -847,14 +847,33 @@
       For it define <b>one</b> <code>jdbc-connection-descriptor</code>,
       now you can use the same <code>jcdAlias</code> name with different <code>User/Password</code>.
OJB
       <b>copy</b> the defined <code>jdbc-connection-descriptor</code>
and replace the <code>username</code>
  -    and <code>password</code> with the given <code>User/Password</code>.
Keep in mind, when the
  +    and <code>password</code> with the given <code>User/Password</code>.
  +    </p>
  +    <p>
  +    PersistenceBroker-api example:
  +    <source>
  +    PBKey user_1 = new PBKey("jcdAlias","User_1", "passwd");
  +    PersistenceBroker broker =
  +            PersistenceBrokerFactory.createPersistenceBroker(user_1);
  +    ...
  +    </source>
  +    ODMG-api example:
  +    <source>
  +    Implementation odmg = OJB.getInstance();
  +    Database db = odmg.newDatabase();
  +    db.open("jcdAlias#user_1,passwd", Database.OPEN_READ_WRITE);
  +    ...
  +    </source>
  +    </p>
  +    <p>
  +    Keep in mind, when the
       <code>connection-pool</code> element enables connection pooling, every
user get its separate pool.
  -    See <a HREF="#23">How does OJB handle connection pooling</a>.
  +    See <a href="#FAQ23">How does OJB handle connection pooling</a>.
       </p>
       </subsection>
   
   
  -    <subsection name="How do I use multiple databases within OJB?" anchor="22">
  +    <subsection name="How do I use multiple databases within OJB?" anchor="FAQ22">
       <p>
       Define for each database a <code>jdbc-connection-descriptor</code>, use
the
       different <code>jcdAlias</code> names to match the according database.
  @@ -862,7 +881,7 @@
       </subsection>
   
   
  -    <subsection name="How does OJB handle connection pooling?" anchor="23">
  +    <subsection name="How does OJB handle connection pooling?" anchor="FAQ23">
       <p>
       OJB does connection pooling per default, expect for datasources. Datasources never
will be pooled.
       <br/>
  @@ -881,7 +900,7 @@
       </subsection>
   
   
  -    <subsection name="Can I directly obtain a java.sql.Connection within OJB?" anchor="24">
  +    <subsection name="Can I directly obtain a java.sql.Connection within OJB?" anchor="FAQ24">
       <p>
       The PB-api enabled the possibility to obtain a connection from the current
       used <code>PersistenceBroker</code> instance:
  @@ -898,17 +917,17 @@
   broker.close();
       </source>
       Do not close or commit the connection, this will be done by OJB.
  -    See ditto <a href="#25">perform sql queries</a>.
  +    See ditto <a href="#FAQ25">perform sql queries</a>.
       </p>
       </subsection>
   
   
  -    <subsection name="Is it possible to perform my own sql-queries in OJB?" anchor="25">
  +    <subsection name="Is it possible to perform my own sql-queries in OJB?" anchor="FAQ25">
       <p>
       There are serveral ways in OJB to do that.
       <br/>
       If you completely want to bypass the OJB
  -    query-api see <a href="#21">direct connection use</a>.
  +    query-api see <a href="#FAQ21">direct connection use</a>.
       <br/>
       A more elegant way is to use a <code>QueryBySQL</code> object:
       <source>
  @@ -927,7 +946,7 @@
       </subsection>
   
   
  -    <subsection name="Start OJB without a repository file?" anchor="31">
  +    <subsection name="Start OJB without a repository file?" anchor="FAQ31">
       <p>
       It is possible to start OJB with an 'empty' repository.xml file:
       <source><![CDATA[
  @@ -939,15 +958,15 @@
   </descriptor-repository>
       ]]></source>
       Now you have to declare the <code>jdbc-connection-descriptor</code> and
  -    <code>class-descriptor</code> at runtime. See <a href="#26">Connect
to database at
  -    runtime</a> and <a href="#27">Add a new persistent object (class-descriptor)
at runtime</a>
  +    <code>class-descriptor</code> at runtime. See <a href="#FAQ26">Connect
to database at
  +    runtime</a> and <a href="#FAQ27">Add a new persistent object (class-descriptor)
at runtime</a>
       for more information.
       </p>
       </subsection>
   
   
   
  -    <subsection name="Connect to database at runtime?" anchor="26">
  +    <subsection name="Connect to database at runtime?" anchor="FAQ26">
       <p>
       You could add <code>jdbc-connection-descriptors</code> at runtime, using
       the <code>MetadataManager</code>:
  @@ -975,7 +994,7 @@
       </subsection>
   
   
  -    <subsection name="Add a new persistent object (class-descriptor) at runtime?" anchor="27">
  +    <subsection name="Add a new persistent object (class-descriptor) at runtime?" anchor="FAQ27">
       <p>
       You could add <code>class-descriptors</code> at runtime, using
       the <code>MetadataManager</code>:
  @@ -999,19 +1018,19 @@
       </subsection>
   
   
  -    <subsection name="Global metadata changes at runtime?" anchor="28">
  +    <subsection name="Global metadata changes at runtime?" anchor="FAQ28">
       <p>
       TODO
       </p>
       </subsection>
   
  -    <subsection name="Per thread metadata changes at runtime?" anchor="29">
  +    <subsection name="Per thread metadata changes at runtime?" anchor="FAQ29">
       <p>
       TODO
       </p>
       </subsection>
   
  -    <subsection name="Is it possible to use OJB within EJB's?" anchor="30">
  +    <subsection name="Is it possible to use OJB within EJB's?" anchor="FAQ30">
       <p>
       Yes, see <a href="deployment.html">deployment</a> instructions in the docs.
       Additional you can find some EJB example beans in package <code>org.apache.ojb.ejb</code>
  @@ -1019,7 +1038,7 @@
       </p>
       </subsection>
   
  -    <subsection name="Can OJB handle ternary (or higher) associations?" anchor="36">
  +    <subsection name="Can OJB handle ternary (or higher) associations?" anchor="FAQ36">
       <p>
       	Yes, that's possible. Here is an example.
   		With a ternary relationship there are three (or more) entities
  
  
  

Mime
View raw message