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 faq.xml tutorial4.xml performance.xml quickstart.xml
Date Sat, 06 Mar 2004 01:09:12 GMT
arminw      2004/03/05 17:09:12

  Modified:    xdocs    faq.xml tutorial4.xml performance.xml
                        quickstart.xml
  Log:
  replace /bin script calls by ant calls
  
  Revision  Changes    Path
  1.32      +3 -3      db-ojb/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/faq.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- faq.xml	2 Feb 2004 09:34:38 -0000	1.31
  +++ faq.xml	6 Mar 2004 01:09:12 -0000	1.32
  @@ -138,10 +138,10 @@
   	 First thing to do is to build the cvs's with the default database HSQL,
   	 because you know it will work. If you get past this point you should have a
   	 working OJB compiled. Now if your using JDK 1.4 you will need to set in
  -	 build.properties JDBC=+JDBC30 and do a build.sh preprocess first. Next you
  -	 will do a build.sh junit and this will build OJB and test everything for
  +	 build.properties JDBC=+JDBC30 and do a <i>ant preprocess</i> first. Next
you
  +	 will do a <i>ant junit</i> and this will build OJB and test everything for
   	 you. If you get a build successful then your in business. Then you will
  -	 want to run build.sh jar to create the OJB jar to put in your /lib. You
  +	 want to run <i>ant jar</i> to create the OJB jar to put in your /lib. You
   	 will need a couple other jars in you /lib directory to make it all work.
   	 See this page for those. http://jakarta.apache.org/ojb/deployment.html
       </p>
  
  
  
  1.14      +27 -29    db-ojb/xdocs/tutorial4.xml
  
  Index: tutorial4.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/tutorial4.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- tutorial4.xml	13 Dec 2003 18:18:33 -0000	1.13
  +++ tutorial4.xml	6 Mar 2004 01:09:12 -0000	1.14
  @@ -48,17 +48,15 @@
   			Download the JDO Reference Implementation from
   			<A HREF="http://java.sun.com/products/jdo/">Sun's JDO site</A>.<br/>
   			Extract the archiv to a local directory and copy the files
  -			<b><code>jdori.jar</code></b> and <b><code>jdo.jar</code></b>

  +			<b><code>jdori.jar</code></b> and <b><code>jdo.jar</code></b>
   			into the OJB <b><code>lib</code></b> directory.
   		</li>
   		<li>
   			Now compile the sources, setup the test database and perform bytecode
  -			enhancement
  -		  	by executing
  -            <br/><b><code>bin\build.bat with-jdori prepare-tutorials
enhance-jdori</code></b>
  -		  	<br/>under Win32 or
  -		  	<br/><b><code>bin/build.sh with-jdori prepare-tutorials enhance-jdori</code></b>
  -            <br/>under Unix/Linux
  +			enhancement by executing
  +            <source>
  +            ant with-jdori prepare-tutorials enhance-jdori
  +            </source>
   		  	from the ojb toplevel directory.
   	  	</li>
   		<li>
  @@ -319,7 +317,7 @@
   public void apply()
   {
   	PersistenceManager manager = null;
  -    	
  +
   	// ask user which object should edited
   	String in = readLineWithMessage("Edit Product with id:");
   	int id = Integer.parseInt(in);
  @@ -328,27 +326,27 @@
   	try
   	{
   		// 1. start transaction
  -		manager = factory.getPersistenceManager();          
  +		manager = factory.getPersistenceManager();
   		manager.currentTransaction().begin();
   
   		// We don't have a reference to the selected Product.
   		// So we have to look it up first,
   
   
  -		// 2. Build a query to look up product by the id            
  -		Query query = manager.newQuery(Product.class, "id == " + id);     
  -            
  -		// 3. execute query  
  +		// 2. Build a query to look up product by the id
  +		Query query = manager.newQuery(Product.class, "id == " + id);
  +
  +		// 3. execute query
   		Collection result = (Collection) query.execute();
   		toBeEdited = (Product) result.iterator().next();
  -            
  +
   		if (toBeEdited == null)
   		{
   			System.out.println("did not find a matching instance...");
   			manager.currentTransaction().rollback();
  -			return;	
  +			return;
   		}
  -            
  +
   		// 4. edit the existing entry
   		System.out.println("please edit the product entry");
   		in =
  @@ -365,7 +363,7 @@
   					+ toBeEdited.getStock()
   					+ "):");
   		toBeEdited.setStock(Integer.parseInt(in));
  -		
  +
   		// 5. commit changes
   		manager.currentTransaction().commit();
   	}
  @@ -375,9 +373,9 @@
   		manager.currentTransaction().rollback();
   		t.printStackTrace();
   	}
  -	finally 
  +	finally
   	{
  -		manager.close();	
  +		manager.close();
   	}
   }
   ]]></source>
  @@ -400,7 +398,7 @@
   	In the fourth step we check if a Product matching to the id could be found.
   	If no entry is found we print a message and quit the work.
   </p>
  -<p>	
  +<p>
   	If a Product entry was found we delete it in step 5 by calling
   	the PersistenceManager to delete the persistent object.
   
  @@ -421,28 +419,28 @@
   	try
   	{
   		// 1. start transaction
  -		manager = factory.getPersistenceManager();   
  -		tx = manager.currentTransaction();       
  +		manager = factory.getPersistenceManager();
  +		tx = manager.currentTransaction();
   		tx.begin();
   
  -		// 2. Build a query to look up product by the id            
  -		Query query = manager.newQuery(Product.class, "id == " + id);     
  -            
  -		// 3. execute query  
  +		// 2. Build a query to look up product by the id
  +		Query query = manager.newQuery(Product.class, "id == " + id);
  +
  +		// 3. execute query
   		Collection result = (Collection) query.execute();
  -			
  +
   		// 4. if no matching product was found, print a message
   		if (result.size() == 0)
   		{
   			System.out.println("did not find a Product with id=" + id);
   			tx.rollback();
   			manager.close();
  -			return;		
  +			return;
   		}
   		// 5. if a matching product was found, delete it
   		else
   		{
  -			Product toBeDeleted = (Product) result.iterator().next();        	
  +			Product toBeDeleted = (Product) result.iterator().next();
   			manager.deletePersistent(toBeDeleted);
   			tx.commit();
   			manager.close();
  
  
  
  1.16      +6 -12     db-ojb/xdocs/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- performance.xml	9 Aug 2003 06:48:55 -0000	1.15
  +++ performance.xml	6 Mar 2004 01:09:12 -0000	1.16
  @@ -69,9 +69,7 @@
   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
  +    ant targetName
   </source>
   The following 'targets' exist:
   <ul>
  @@ -125,8 +123,8 @@
   This part of the test suite is integrated into the OJB build mechanism.
   <br/>
   A single client test you can
  -invoke it by typing <code>bin\build.bat performance</code> or
  -<code>bin/build.sh performance</code>.
  +invoke it by typing <code>ant performance</code> or
  +<code>ant performance</code>.
   </p>
   
   <p>
  @@ -275,11 +273,7 @@
   <p>
   To run the multithreaded performance test call
   <source>
  -bin\build.bat perf-test
  -
  -or
  -
  -bin/build.sh perf-test
  +ant perf-test
   </source>
   </p>
   
  @@ -328,7 +322,7 @@
   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>
  +Call <code>ant 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 <code>db-ojb-XXX-performance.jar</code>
can
   be found in <code>[db-ojb]/dist</code> directory.
  
  
  
  1.15      +6 -7      db-ojb/xdocs/quickstart.xml
  
  Index: quickstart.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/quickstart.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- quickstart.xml	27 Apr 2003 09:15:18 -0000	1.14
  +++ quickstart.xml	6 Mar 2004 01:09:12 -0000	1.15
  @@ -24,11 +24,11 @@
         will be created.
       </li>
       <li>
  -    	OJB depends on several jar files that can not be shipped with the 
  +    	OJB depends on several jar files that can not be shipped with the
       	distribution for legal reasons.
       	Please download them and place them in the <code>&lt;path&gt;/db-ojb-XXX/lib</code>
       	directory.
  -    	
  +
       	<table>
   	    	<tr>
   	    		<td><b>Jar archive</b></td><td><b>how to get
it</b></td>
  @@ -42,16 +42,16 @@
   	    	<tr>
   	    		<td>jdori.jar <br/>(for the OjbStore JDORI Plugin only)</td><td>Please
get it from http://java.sun.com/products/jdo</td>
   	    	</tr>
  -	
  +
   	    	<tr>
   	    		<td>jndi.jar (for JDK1.2 only)</td><td>Please get it from http://java.sun.com/</td>
   	    	</tr>
  -	
  +
   	    	<tr>
   	    		<td>proxy.jar (for JDK1.2 only)</td><td>Please get it from http://sf.net/projects/objectbridge/</td>
   	    	</tr>
       	</table>
  -    	
  +
       </li>
       <li>
         In a terminal window (or dos box under Win32) change to the OJB installation directory
  @@ -64,8 +64,7 @@
   
       <li>
         To check if OJB runs properly out of the box execute
  -	  <b><code>bin\build junit</code></b> under Win32 and
  -	  <b><code>bin/build.sh junit</code></b> under Unix/Linux.
  +	  <b><code>ant junit</code></b>.
   	  <br/>
   	  This will launch the OJB regression test suite. If all
   	  tests are passed the console output looks like follows:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message