db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r265594 [2/2] - in /db/derby/site/trunk: build/site/ build/site/binaries/ build/site/integrate/ build/site/integrate/plugin_help/ src/documentation/content/xdocs/ src/documentation/content/xdocs/binaries/ src/documentation/content/xdocs/int...
Date Wed, 31 Aug 2005 21:58:07 GMT
Added: db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml?rev=265594&view=auto
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml (added)
+++ db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml Wed
Aug 31 14:55:48 2005
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+	<header>
+		<title>Using  Apache Derby with iBATIS JPetStore 4 running on the Geronimo J2EE server</title>
+	</header>
+	<body>
+		<p>
+The first tasks performed when installing an application that uses a database are generally
related to database setup.  These steps often involve compiling DBMS code (if the database
system is not already installed) and creating and populating the physical database used by
the application.  Such steps are required to create executables and files that can be used
in the operating environment of the host computer.  By using a database like Derby that is
implemented entirely in JAVA these build steps are not required.  Installation of the Derby
DBMS can be as simple as copying a 2 Mb jarfile to a known location.  The fully initialized
physical database can be bundled with the application thus reducing the database setup steps
to a simple copy operation.  The following instructions demonstrate this by deploying the
iBATIS JPetStore application along with a ready-to-go Derby database on a Geronimo server.
  These instructions can be used on any machine with a functioning J2SE JVM using the ASCII
codeset.  Conversion or recreation of the supporting files (but not the database) will be
required for deployment in an EBCDIC environment.
+</p>
+		<section>
+			<title>Introduction</title>
+			<p>
+This article demonstrates the ease with which a J2EE application that uses a Derby database
(the iBATIS JPetStore 4.0 web-based sales application) can be setup and deployed on  the Geronimo
J2EE server.  iBATIS JPetStore is based on Sun's J2EE Pet Store and can be setup to use a
variety of databases and executed on a variety of J2EE or JSP Servers.  JPetStore was written
by Clinton Begin as a comparison of the .NET and J2EE architectures.  JPetStore uses Struts,
the iBATIS data mapper framework and JAVA to implement the application logic and user interface.
 The three components used to implement this deployment of JPetStore, <a href="http://ibatis.apache.org">iBATIS</a>,
<a href="http://geronimo.apache.org">Geronimo</a> and <a href="http://db.apache.org/derby">Derby</a>,
are all being developed by the Apache community and are freely available thru the Apache Foundation
Website.  
+</p>
+		</section>
+				<section>
+			<title>Typographic Conventions Used</title>
+			<p> The following codes in curly braces will be used to represent installation dependant
file locations as described below:</p>
+			<ul>
+				<li>{GERONIMO_HOME}: The installation directory for the Geronimo Server.  Note
that this installation path should not contain any spaces.</li>
+				<li>{machine-name}: the hostname of the machine on which the server and application
are installed.</li>
+				<li>{Derby_Jars}: the directory containing the Derby jar file(s).  The deployment
files provided with this article use the derby jars provided with Geronimo.  Verify that the
file <em>derby-10.0.2.1.jar</em> exists in the directory  {GERONIMO_HOME}\repository\incubator-derby\jars.</li>
+				<li>{Derby_System_Home}: the directory containing the <em>derby.log</em>
file, Geronimo <em>SystemDatabase</em> and the application <em>Databases</em>
directory tree.  To use the files provided with this article this location should be {GERONIMO_HOME}/var/derby.
 Note that Geronimo creates this directory the first time it starts and sets the derby.system.home
variable to this location.  The JPetStoreDB database will be located in the  <em>{Derby_System_Home}\Databases</em>
subdirectory. </li>
+			</ul>
+					</section>
+		<section>
+			<title>Required Software / Downloads</title>
+			<ul>
+				<li>If necessary, install a functional J2SE Java Developers Kit (JDK).  A JDK of
version 1.4.1 or higher is recommended.  The JDK 'bin' directory should be included in your
PATH.</li>
+				<li> Download the <a href="http://geronimo.apache.org/downloads.html">Geronimo
1.0 Milestone 4</a> release.  Extract the Geromino installation files to {GERONIMO_HOME}.
      </li> 
+	<li>Download the <a href="../binaries/JPetStoreAPP4Geronimo.zip">JPetStoreAPP4Geronimo.zip</a>
file associated with this article.  Extract the files to a convenient working directory. 
 </li>
+			</ul>
+		</section>
+		<section>
+			<title>Setup Steps:</title>			
+			<ul>	<li>
+					<em>Extract the database zipfile and deployment files:</em> Unzip the files
from JPetStoreAPP4Geronimo.zip into a working directory.</li>
+					<li><em>Move deployment files to {GERONIMO_HOME}:</em>Move the following
three files to the {GERONIMO_HOME} directory:<ul>
+						<li><em>jpetstoreAPP.war</em> - The JPetstore application web archive
file.</li>
+						<li><em>jpetstoreAPP-geronimo-jetty.xml</em> - The Geronimo web application
deployment descriptor.</li>
+						<li><em>DbPoolDeployPlan.xml</em> - The Derby datasource deployment
descriptor.</li>
+					</ul>
+					Using the file <em>setupM4.bat</em> as a template, create a script file
for your platform that defines the locations on your machine of the Geromino installation,
the Geronimo J2EE jarfile and the Java JRE or JDK.
+					</li>
+				<li>
+					<em>Start Geronimo:</em> In a command window/shell, execute the customized
setupM4 script file then start the Geronimo server from {GERONIMO_HOME} using the command:
 <code>java -jar bin\server.jar</code></li>
+				<li><em>Setup the JPetStoreDB database:</em> Unzip the files from JPetStoreAPP4Geronimo.zip
into the {Derby_System_Home} directory ({GERONIMO_HOME}/var/derby).</li>
+   <li> <em>Deploy and start the datasource:</em> In a new command shell/window
execute the customized setupM4 script file then issue the following commands to deploy and
start the JPetstore datasource:
+   <source>
+   > java -jar bin/deployer.jar --user system --password manager distribute DbPoolDeployPlan.xml
repository/tranql/rars/tranql-connector-1.0-20050716.rar
+      Distributed JPetStoreDB
+   > java -jar bin/deployer.jar --user system --password manager start JPetStoreDB
+      Started JPetStoreDB
+     </source>
+	   </li>
+				<li>
+					<em>Deploy and start the application:</em> Issue the following commands
to deploy and start the iBATIS JPetStore application:
+					   <source>  
+    >  java -jar bin\deployer.jar --user system --password manager distribute jpetstoreAPP.war
jpetstoreAPP-geronimo-jetty.xml
+         Distributed JPetStoreAPP
+    > java -jar bin/deployer.jar --user system --password manager start JPetStoreAPP
+          Started JPetStoreAPP
+					    </source>
+	   </li>
+				<li>
+					<em>Test the JPetStoreAPP:</em>  Open your browser and enter the following
URL:
+		   <source>
+   http://{machine-name}:8080/jpetstoreAPP
+		   </source>
+				</li>
+			</ul>
+		</section>
+		
+		<section>
+				<title>Optional Database Setup Instructions</title>
+
+			<p>The following steps show how to build the Derby database from scratch.  Two files
(*.sql) are supplied in the JPetStoreAPP4Geronimo.zip. file to perform the initial build and
data inserts.  You will need to download the complete set of Derby jarfiles and use the IJ
tool found in derbytools.jar to perform the build.  Place derbytools.jar in the {Derby_Jars}
directory.   The IJ tool is used to process the SQL commands in the provided scripts.  For
simplicity the examples below place all necessary files in the same directory and specify
as much a possible (including the command to create the database) on the command line.</p>
+			<ul>
+				<li>Copy the following SQL script files to the <em>{Derby_System_Home}\Databases</em>
subdirectory where you will build the database: <code>,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql</code>.
 Issue the following command to create the database, tables and indexes:
+	<source>
+   java -cp {Derby_Jars}/derby.jar;{Derby_Jars}/derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB;create=true

+	   org.apache.derby.tools.ij jpetstore-derby-schema.sql
+	</source>
+				</li>
+				<li>Now load the data into the tables using the following command:
+	<source>
+	java -cp {Derby_Jars}/derby.jar;{Derby_Jars}/derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB
+	   org.apache.derby.tools.ij jpetstore-derby-dataload.sql
+	</source>
+				</li>
+			</ul> <p>You now have a fully populated database to use with the JPetStore
application.</p>
+			</section>
+					<!--			Integration Notes Section			-->
+		<section>
+			<title>Integration Notes</title>
+			<p>
+J2EE Servers use multiple classloaders (aka hierarchies) to provide the isolation necessary
to run many applications at once.  This Derby-JPetStore integration uses a server datasource
to avoid problems that can occur when Derby is used in an environment using multiple classloaders.
 Derby is written in Java and all its classes must be loaded by the same classloader.    When
using a J2EE Server this can be assured by defining Derby datasources at the server level.
This is particularly important when using Derby in it's embedded configuration.   When using
a database or other datasource in a J2EE environment it is also a good design practice to
access them via a J2EE resource managed by the server.    
+   	</p>
+			<p>
+   	The zipfile provided contains a fully initialized database to demonstrate that a Derby
database built and populated on one platform (in this case Windows) can be transferred to
different platforms and work fine.  Try copying the database and derby jarfiles to different
platforms and you will see that the system works without modification.  The text files included
in the zipfile will not do well in an EBCDIC architecture but the Derby engine and supplied
database will work fine. If you want to build the database from scratch you can use the SQL
files supplied in the archive.  See the 'Optional Database Setup Instructions' section for
how to use the IJ tools to build and populate the database.</p>
+   				<p>If you wish to build your own iBATIS JPetstore war file like the one supplied
in the JPetStoreAPP4Geronimo.zip file  you will need to download the JPetStore application
source code (see the 'Related Links' section) and make the following modifications to the
source files before performing a build as described in the JPetStore build instructions: </p>
+   				<ul>
+					<li>
+					Edit the <code>sql-map-config.xml</code> file and replace the existing TransactionManager
definition section with the this section that specifies a JNDI lookup should be performed
to obtain the datasource to use:
+			<source>
+   &lt;transactionManager type="JDBC" &gt;
+      &lt;dataSource type="JNDI"&gt;
+         &lt;property name="DBJndiContext" value="jdbc/JPetStoreDB"/&gt;
+      &lt;/dataSource&gt;
+   &lt;/transactionManager&gt;
+   </source> </li>
+   <li>Edit the <code>web.xml</code> file and replace the existing resource-ref
definition with the following:
+      <source>
+      &lt;resource-ref&gt; 
+   &lt;description&gt;JPetStore DataSource&lt;/description&gt;
+	&lt;res-ref-name&gt;jdbc/JPetStoreDB&lt;/res-ref-name&gt;
+	&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+	&lt;res-auth&gt;Container&lt;/res-auth&gt;
+	&lt;res-sharing-scope>Shareable&lt;/res-sharing-scope&gt;
+   &lt;/resource-ref&gt;
+   </source>  </li>
+   </ul> <p>
+  If you are interested in using Geronimo you may also want to check out the Gluecode SE
application server.  The Gluecode SE application server bundles Geronimo and provides a GUI
management console that simplifies and automates the operations outlined above. Rather than
creating the XML descriptor files using a text editor the datasource and application deployments
are performed from console screens. Starting the datasource(s) and application(s) can also
be done from the console or defined to start automatically when the Gluecode server starts.
 For more information see the Geronimo link in the 'Related Links' section of this document.
+   </p>
+		</section>
+		
+		<!--		RELATED LINKS SECTION  -->
+		<section>
+			<title>Related Links</title>
+			<p>Required Downloads to perform this deployment: </p> 
+				<ul>
+				<li> <a href="../binaries/JPetStoreAPP4Geronimo.zip">JPetStoreAPP4Geronimo.zip</a>
+				</li>	<li>	Geronimo Server M4
+	<a href="http://geronimo.apache.org/downloads.html">Geronimo Binaries</a>
+				</li> 				</ul>
+ <p>Download links for software used in creating this deployment:</p>
+				<ul>
+				<li>
+    <a href="http://db.apache.org/derby/releases/release-10.0.2.1.html">Apache Derby
version 10.0.2.1</a> [Note: the *-bin archives contain the documentation as well as
Derby].
+  </li>
+				<li>
+<a href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">iBATIS
JPetStore version 4.0.5</a> </li> </ul>
+  <p>Main websites references:</p>
+			<ul> <li>
+	For more information on Derby see the <a href="http://db.apache.org/derby/index.html">Apache
Derby Project site</a>
+				</li>
+				<li>
+	For more information on iBATIS see the <a href="http://ibatis.apache.org">iBATIS Home
page</a>
+				</li>
+				<li>For more information on Geronimo see the <a href="http://geronimo.apache.org">Apache
Geronimo Project site</a>
+				</li>								
+				</ul>
+					<p>Related products and artilces:</p>
+					<ul>
+				<li>For information on Gluecode SE application server see the <a href="http://www.gluecode.com">Gluecode
Software site</a>
+				</li>
+				<li>Follow this link for details of a similar deployemnt of <a href="JPetStoreWebSphere.html">JPetStore
and Derby in a WebSphere</a> Server environment.</li>
+			</ul>
+		</section>
+	</body>
+</document>

Propchange: db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreWebSphere.xml
(from r265579, db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml)
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreWebSphere.xml?p2=db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreWebSphere.xml&p1=db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml&r1=265579&r2=265594&rev=265594&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreWebSphere.xml Wed
Aug 31 14:55:48 2005
@@ -1,112 +1,124 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
- <header>
-  <title>Running iBATIS JPetStore 4 using an embedded Apache Derby database</title>
- </header>
-
-<body>
-<section>
-   <title>Introduction</title>
-<p>
+	<header>
+		<title>Using Apache Derby with iBATIS JPetStore 4 on the WebSphere Server</title>
+	</header>
+	<body>
+		<section>
+			<title>Introduction</title>
+			<p>
 JPetStore is a rewritten Pet Store application based on Sun's J2EE Pet Store.  It was originally
designed to compare the .NET and J2EE architectures.  It is now the official example application
for the iBATIS SQL Maps 2.0 and DAO 2.0 open source software products.  See the 'JPetStore'
and 'iBATIS' links in the related links section below to download JPetStore and for more information
on the application history and architecture.  
-</p><p>
+</p>
+			<p>
 This document demonstrates setting up the JPetStore 4.0 application to run on a J2EE Application
Server using an embedded Apache Derby database as the persistence layer.  Apache Derby is
a small footprint, open source, relational database engine written in Java.  It is ideally
suited for use with J2EE and Web applications where reliability, portability, ease of use
and low maintenance is important.  Derby is an Apache DB project.
-</p><p>
+</p>
+			<p>
 One of the more difficult parts of installing JPetStore is meeting the initial assumption
that you have some sort of relational database installed and working.  Apache Derby, in it's
embedded configuration, is a single 2 Mb jarfile that simply needs to be in the classpath
of the application.  The jarfile can be bundled with the application files and in many cases
the user is not aware that a database is in use at all.  Because it's java it does not matter
what physical architecture the application will be deployed on.  The same database files and
database classes can be copied directly to any platform and used as-is.  No local application
or database build is required, only a functioning JVM is needed.
-</p><p>
+</p>
+			<p>
 The following outlines the steps needed to install and run JPetStore 4 using Apache Derby
on WebSphere Application Server version 6.0.  Though WebSphere is used for this example, any
J2EE Application Server could be used to run this demonstration.  Only the cookbook details
portion on installing the application in WebSphere will differ.
 </p>
-</section>
-<section>
-   <title>Required Software</title>
-<ul>
-  <li>   Downloaded the <a href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">JPetStore</a>
Demo - the download URL is also provided in  the Links section below.
+		</section>
+		<section>
+			<title>Required Software</title>
+			<ul>
+				<li>   Downloaded the <a href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">JPetStore</a>
Demo - the download URL is also provided in  the Links section below.
   </li>
-  <li> Downloaded the <a href="../binaries/Derby-JPetStore.zip">Derby-JPetStore.zip</a>
file or plan to download Derby separately and manually edit the application configuration
as described in the CookBook Details section below.  The downloads URLs are also provided
in  the Links section below.
+				<li> Downloaded the <a href="../binaries/JPetStoreAPP4WebSphere.zip">JPetStoreAPP4WebSphere.zip</a>
file or plan to download Derby separately and manually edit the application configuration
as described in the CookBook Details section below.  The downloads URLs are also provided
in  the Links section below.
   </li>
-  <li> WebShere Application Server version 6.0.1.  You can obtain an <a href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">evaluation</a>
copy of WebSphere and the 6.0.1  <a href="http://www-1.ibm.com/support/docview.wss?rs=0&amp;context=SW600&amp;dc=D420&amp;q1=WebSphere&amp;uid=swg24009071&amp;loc=en_US&amp;cs=utf-8&amp;cc=us&amp;lang=en">upgrade</a>
from IBM.  The downloads URLs are also provided in  the Links section below.
+				<li> WebShere Application Server version 6.0.1.  You can obtain an <a href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">evaluation</a>
copy of WebSphere and the 6.0.1  <a href="http://www-1.ibm.com/support/docview.wss?rs=0&amp;context=SW600&amp;dc=D420&amp;q1=WebSphere&amp;uid=swg24009071&amp;loc=en_US&amp;cs=utf-8&amp;cc=us&amp;lang=en">upgrade</a>
from IBM.  The downloads URLs are also provided in  the Links section below.
   </li>
-</ul>
-</section>
-
-<section>
-   <title>Setup Overview</title>
-	 <p> Details on the following steps can be found in the CookBook Details section below.
+			</ul>
+		</section>
+		<section>
+			<title>Setup Overview</title>
+			<p> Details on the following steps can be found in the CookBook Details section
below.
    The following abbreviations will be used in the sections below:</p>
-	 <ul>  <li>WAS: WebSphere Application Server.</li>
-		  <li>{machine-name}: the hostname of the machine on which the server and application
are installed.</li>
-		<li>{SrvRoot}: the main directory of the WebSphere application server. </li>
  
-		<li>{Derby_Home}: the directory into which the Derby jar file(s) are placed.  In
a Server environment a good choice would be {SvrRoot}/Derby.</li>
-		<li>{AppRoot}: the directory into which the JPetStore WAR file was installed by WebSphere
( if the default names are used this will be: {SrvRoot}/profiles/default/installedApps/{machine-name}Node01Cell/jpetstore_war.ear
)</li>
-	</ul>
-
-   <p><strong>Steps:</strong></p>
-   <ul>
-	   <li>Setup {Derby_Home}: Unzip Derby-JPetStorezip and move the Derby directory in
from the Derby-JPetStore zip file into {Derby_Home}. </li>
-	   <li> Create the datasource: Define a Server JDBC datasource for the JPetStore database
with the JNDI name of jdbc/JPetStoreDB.  Select 'Cloudscape' as the WAS database type and
use the Derby embedded XA datasource.
+			<ul>
+				<li>WAS: WebSphere Application Server.</li>
+				<li>{machine-name}: the hostname of the machine on which the server and application
are installed.</li>
+				<li>{SrvRoot}: the main directory of the WebSphere application server. </li>
+				<li>{Derby_Home}: the directory into which the Derby jar file(s) are placed.  In
a Server environment a good choice would be {SvrRoot}/Derby.</li>
+				<li>{AppRoot}: the directory into which the JPetStore WAR file was installed by
WebSphere ( if the default names are used this will be: {SrvRoot}/profiles/default/installedApps/{machine-name}Node01Cell/jpetstore_war.ear
)</li>
+			</ul>
+			<p>
+				<strong>Steps:</strong>
+			</p>
+			<ul>
+				<li>Setup {Derby_Home}: Unzip JPetStoreAPP4WebSphere.zip and move the Derby directory
from the zip file into {Derby_Home}. </li>
+				<li> Create the datasource: Define a Server JDBC datasource for the JPetStore database
with the JNDI name of jdbc/JPetStoreDB.  Select 'Cloudscape' as the WAS database type and
use the Derby embedded XA datasource.
 	   </li>
-	   <li>   Install JPetStore.  Use the WAS Administration console to install the downloaded
jpetstore.war file.  Enter the context root as "/jpetstore".  Accept all the defaults except:
+				<li>   Install JPetStore.  Use the WAS Administration console to install the downloaded
jpetstore.war file.  Enter the context root as "/jpetstore".  Accept all the defaults except:
 	   <ul>
-			<li>Step 1: Check "Deploy Web Services". </li>
-			<li>Step 3: Map the application to the datasource created above ( jdbc/JPetStoreDB)</li>
-	   </ul>
-	<ul>
-		<li>Update the JPetStore sql-map-config.xml file with the one provided in the Derby-JPetStore.zip
file</li>
-		<li> Restart WebSphere </li>
-		<li> Stat the JPetStore application by entering the following URL into your favorite
browser:
+						<li>Step 1: Check "Deploy Web Services". </li>
+						<li>Step 3: Map the application to the datasource created above ( jdbc/JPetStoreDB)</li>
+					</ul>
+					<ul>
+						<li>Update the JPetStore sql-map-config.xml file with the one provided in the
JPetStoreAPP4WebSphere.zip file</li>
+						<li> Restart WebSphere </li>
+						<li> Stat the JPetStore application by entering the following URL into your favorite
browser:
 		   <source>
    http://{machine-name}:9080/jpetstore
-		   </source></li>
-	   </ul>
-	   </li>
-  </ul>   
-   </section>
-   
-<section>
-<title>CookBook Details</title>
-<p><strong>Setup Derby</strong></p>
-<ul>
-   <li>Unzip the Derby folder from the Derby-JPetStore.zip file.  It is recommended
this be placed in the {SrvRoot} directory.  The folder contains the initialized JPetStore
database (the directory tree JPetStoreDB) the derby.jar file and the new sql-map-config.xml
file needed to define the JNDI datasource to the iBATIS system.  Two sql files are also included
so the database can be built from scratch if desired.  See the Integration Notes section for
information on how to use the scripts.
+		   </source>
+						</li>
+					</ul>
+				</li>
+			</ul>
+		</section>
+		<section>
+			<title>CookBook Details</title>
+			<p>
+				<strong>Setup Derby</strong>
+			</p>
+			<ul>
+				<li>Unzip the Derby folder from the JPetStoreAPP4WebSphere.zip file.  It is recommended
this be placed in the {SrvRoot} directory.  The folder contains the initialized JPetStore
database (the directory tree JPetStoreDB) the derby.jar file and the new sql-map-config.xml
file needed to define the JNDI datasource to the iBATIS system.  Two sql files are also included
so the database can be built from scratch if desired.  See the Integration Notes section for
information on how to use the scripts.
    </li>
-   <li>Starting the WebSphere 'First steps' program will provide an easy way to start
and stop the server and the administrative console while performing the operations detailed
below. </li></ul>
-
-<p>
-    <strong>Create the WebSphere datasource</strong></p>
-<ul>
-    <li> Start WAS and start the administrative console </li>
-    <li>Define a WAS environment variable for {Derby_Home} with the following steps:
+				<li>Starting the WebSphere 'First steps' program will provide an easy way to start
and stop the server and the administrative console while performing the operations detailed
below. </li>
+			</ul>
+			<p>
+				<strong>Create the WebSphere datasource</strong>
+			</p>
+			<ul>
+				<li> Start WAS and start the administrative console </li>
+				<li>Define a WAS environment variable for {Derby_Home} with the following steps:
     <ul>
-		<li> Navigate the following links to the Node  level variable definition screen:
 <code>Environment > WebSphere Variables (check or set the NODE radio button active
- click [APPLY] ) > NEW</code></li>
-		<li> Enter the following information:
+						<li> Navigate the following links to the Node  level variable definition screen:
 <code>Environment > WebSphere Variables (check or set the NODE radio button active
- click [APPLY] ) > NEW</code>
+						</li>
+						<li> Enter the following information:
 		<source>
    Name: DERBY_HOME
    value: ${WAS_INSTALL_ROOT}/Derby
    Description:  JPetStore Derby Files
    Click: [SAVE]
 		</source>
-		</li>	</ul>
-    </li></ul>	
-<ul><li>Navigate the following links to the Server level JDBC Resource / datasource
definition screens: <code>Resources > JDBC providers (check or set the SERVER radio
button active - click [APPLY]) > NEW</code>
-  <ul>
-		<li>On the General Properties screen select from the drop down lists:
+						</li>
+					</ul>
+				</li>
+			</ul>
+			<ul>
+				<li>Navigate the following links to the Server level JDBC Resource / datasource
definition screens: <code>Resources > JDBC providers (check or set the SERVER radio
button active - click [APPLY]) > NEW</code>
+					<ul>
+						<li>On the General Properties screen select from the drop down lists:
 	   <source>
     database type: Cloudscape
     provider type:  Cloudscape JDBC Provider
     Implementation:  XA data source  
     Click [NEXT]
-	   </source></li>		
-	   </ul>
-	<ul>
-		<li>   On the JDBC Provider screen enter:  
+	   </source>
+						</li>
+					</ul>
+					<ul>
+						<li>   On the JDBC Provider screen enter:  
 			<source>
    Name:Derby JDBC Provider (XA)
    Desc:Derby 10 embedded JDBC2-compliant Provider
    Path:  ${DERBY_HOME}/derby.jar
    Implementation class name :  org.apache.derby.jdbc.EmbeddedXADataSource
    Click [APPLY]
-		   </source></li>
-		<li>   Under 'Additional Properties' click  'Data Sources'.  On the Data Sources
screen click 'New' and enter:
+		   </source>
+						</li>
+						<li>   Under 'Additional Properties' click  'Data Sources'.  On the Data Sources
screen click 'New' and enter:
 	   <source>
    Name: JPetStoreDB
    JNDI Name:  jdbc/JPetStoreDB
@@ -114,21 +126,25 @@
    Click the radio button labeled: Data store helper classes provided by WebSphere Application
Server 
    Select the "Generic Datastore Helper"
    Click [APPLY]
-	   </source></li>
-	   <li>   Under 'Additional Properties' click 'Custom Properties' and enter: 
+	   </source>
+						</li>
+						<li>   Under 'Additional Properties' click 'Custom Properties' and enter: 
 	   <source>
    NAME: databaseName
    Value:  ${DERBY_HOME}/JPetStoreDB
    Click [SAVE]
-	   </source></li>
-	   <li> In the 'messages' box at the top of the page click the 'save' link.  On the
Application servers - Save screen click the button [SAVE] to save the new definitions</li>
  
-	   </ul></li></ul>
-	   
-<p>
-   <strong>Install the JPetStore Application </strong></p>
-<ul>
-	<li>Unzip the iBATIS JPetStore files in your favorite developement area and locate
the jpetstore.war supplied.  In the distribution I downloaded this was in:  {favorite-development-area}/build/wars</li>
-	<li>In the WebSphere Application Console click on 'Install New Application' - this
is in the left navigation pane under Applications.  On the following screens accept the default
values except as noted:
+	   </source>
+						</li>
+						<li> In the 'messages' box at the top of the page click the 'save' link.  On
the Application servers - Save screen click the button [SAVE] to save the new definitions</li>
+					</ul>
+				</li>
+			</ul>
+			<p>
+				<strong>Install the JPetStore Application </strong>
+			</p>
+			<ul>
+				<li>Unzip the iBATIS JPetStore files in your favorite developement area and locate
the jpetstore.war supplied.  In the distribution I downloaded this was in:  {favorite-development-area}/build/wars</li>
+				<li>In the WebSphere Application Console click on 'Install New Application' - this
is in the left navigation pane under Applications.  On the following screens accept the default
values except as noted:
    <source> 
       On the 'Preparing for the application installation - Specify..' screen:
             Click the radio button:  'Local Filesystem'
@@ -157,90 +173,105 @@
       On the Step 6 screen review the SUMMARY, correct or click  [FINISH]
        After the 'Installing...' reports '..installed successfully.' click the 'Save to Master
Configuration' link.
       The 'Changed documents' screen is displayed - click:  [SAVE]
-   </source> </li>   </ul>
-
-   <p><strong>Replace the  <code>sql-map-config.xml</code> file in
the application</strong></p>
-<ul>
-	<li>In the WebSphere Application Console click on 'Enterprise Applications' in the
left navigation pane under Applications</li> 
-	<li> Select the check box next to the JPetStore application (jpetstore_war).  The
application will be stopped and have a red X next to it - this is not a problem.  The application
will automatically start when WebSphere is started.</li>
-	<li>Click the 'Update' button</li>
-	<li>On the 'Preparing for the application installation' screen:
+   </source>
+				</li>
+			</ul>
+			<p>
+				<strong>Replace the  <code>sql-map-config.xml</code> file in the application</strong>
+			</p>
+			<ul>
+				<li>In the WebSphere Application Console click on 'Enterprise Applications' in
the left navigation pane under Applications</li>
+				<li> Select the check box next to the JPetStore application (jpetstore_war).  The
application will be stopped and have a red X next to it - this is not a problem.  The application
will automatically start when WebSphere is started.</li>
+				<li>Click the 'Update' button</li>
+				<li>On the 'Preparing for the application installation' screen:
 		<source>
     Select the 'Single File' radio button
     Enter the path relative to {AppRoot} for the sql-map-config.xml file just installed (e.g.

        jpetstore.war/WEB-INF/classes/com/ibatis/jpetstore/persistence/sqlmapdao/sql/sql-map-config.xml)
     Click the 'Local file system' radio button and browse to the directory where
-       you unzipped the Derby-JPetStore.zip file.  
+       you unzipped the JPetStoreAPP4WebSphere.zip file.  
     Select the sql-map-config.xml file provided in the zipfile
     Click [NEXT]
     On the 'Confirmation' screen click [OK]
     On the 'Update' screen click the 'Save to Master Configuration' link.
     On the 'Changed documents' screen click:  [SAVE]
 		</source>
-	</li>
-</ul><ul>
-	 <li><strong>Restart the server and test the application</strong></li></ul>
-	 
-  <p><strong>Optional instructions</strong></p>
-<p>The following steps show how to build the Derby database from scratch.  Two files
are supplied in the Derby-JPetStore.zip file to perform the initial build and data inserts.
 You will need to download the complete set of Derby jarfiles and place derbytools.jar in
your classpath to perform the build as these instructions utilize the IJ tool to process the
commands in the provided scripts.  For simplicity the examples below place all necessary files
in the same directory and specify as much a possible (including the command to create the
database) on the command line.</p>
-<ul>
-	<li>Copy the following files to the directory where you want to build the database:
<code>derby.jar, derbytools.jar,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql</code>
and issue the following command to create the database, tables and indexes:
+				</li>
+			</ul>
+			<ul>
+				<li>
+					<strong>Restart the server and test the application</strong>
+				</li>
+			</ul>
+			<p>
+				<strong>Optional instructions</strong>
+			</p>
+			<p>The following steps show how to build the Derby database from scratch.  Two files
are supplied in the JPetStoreAPP4WebSphere.zip file to perform the initial build and data
inserts.  You will need to download the complete set of Derby jarfiles and place derbytools.jar
in your classpath to perform the build as these instructions utilize the IJ tool to process
the commands in the provided scripts.  For simplicity the examples below place all necessary
files in the same directory and specify as much a possible (including the command to create
the database) on the command line.</p>
+			<ul>
+				<li>Copy the following files to the directory where you want to build the database:
<code>derby.jar, derbytools.jar,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql</code>
and issue the following command to create the database, tables and indexes:
 	<source>
    java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB;create=true

 	   org.apache.derby.tools.ij jpetstore-derby-schema.sql
-	</source> </li>
-	<li>Now load the data into the tables using the following command:
+	</source>
+				</li>
+				<li>Now load the data into the tables using the following command:
 	<source>
 	java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB
 	   org.apache.derby.tools.ij jpetstore-derby-dataload.sql
-	</source></li>
-</ul>
-<p>If you do not wish to use the <code>sql-map-config.xml</code> supplied
in the Derby-JPetStore.zip file but prefer to modify the one supplied with the iBATIS JPetStore
application do the following.  Edit the <code>sql-map-config.xml</code> file and
replace the existing TransactionManager definition section with this definition:</p>
-<source>
+	</source>
+				</li>
+			</ul>
+			<p>If you do not wish to use the <code>sql-map-config.xml</code> supplied
in the JPetStoreAPP4WebSphere.zip file but prefer to modify the one supplied with the iBATIS
JPetStore application do the following.  Edit the <code>sql-map-config.xml</code>
file and replace the existing TransactionManager definition section with this definition:</p>
+			<source>
    &lt;transactionManager type="JDBC" &gt;
       &lt;dataSource type="JNDI"&gt;
          &lt;property name="DBJndiContext" value="jdbc/JPetStoreDB"/&gt;
       &lt;/dataSource&gt;
    &lt;/transactionManager&gt;
    </source>
-</section>   
-
-<section>
-   <title>Integration Notes</title>
-   <p>
+		</section>
+		<section>
+			<title>Integration Notes</title>
+			<p>
 J2EE Servers use multiple classloaders (aka hierarchies) to provide the isolation necessary
to run many applications at once.  This Derby-JPetStore integration uses a server datasource
to avoid problems that can occur when Derby is used in an environment using multiple classloaders.
 Derby is written in Java and all its classes must be loaded by the same classloader.    When
using a J2EE Server this can be assured by defining Derby datasources at the server level.
This is particularly important when using Derby in it's embedded configuration.   When using
a database or other datasource in a J2EE environment it is also a good design practice to
access them via a J2EE resource managed by the server.    
-   	</p><p>
+   	</p>
+			<p>
 I recommend the following paper to people seriously interested in using Derby with WebSphere:
<a href="http://www-128.ibm.com/developerworks/websphere/library/techarticles/0501_barghouthi/0501_barghouthi.html">Using
IBM Cloudscape V10 with IBM WebSphere Application Server V6</a>.  It describes how to
setup datasources to use the various drivers provided with Derby as well as how to create
a helper class to assist with Derby usage rather than the Generic Datasource Helper used here.</p>
-   	<p>
+			<p>
    	The zipfile provided contains a fully initialized database to demonstrate that a Derby
database built and populated on one platform (in this case Windows) can be transferred to
different platforms and work fine.  Try copying the database and derby jarfiles to different
platforms and you will see that the system works without modification.  The text files included
in the zipfile will not do well in an EBCDIC architecture but the Derby engine and supplied
database will work fine. If you want to build the database from scratch you can use the SQL
files supplied in the archive.  See the 'CookBook Details' section for how to use the IJ tools
to build and populate the database.</p>
-   </section>
-
-<section>
-   <title>Related Links</title>
-
-<ul>
-  <li>
+		</section>
+		<section>
+			<title>Related Links</title>
+			<ul>
+				<li>
 	Files needed for the Derby and JPetStore integration: 
-<a href="../binaries/Derby-JPetStore.zip">Derby-JPetStore.zip</a>
-  </li> <li>
+<a href="../binaries/JPetStoreAPP4WebSphere.zip">JPetStoreAPP4WebSphere.zip</a>
+				</li>
+				<li>
     Download the complete <a href="http://db.apache.org/derby/derby_downloads.html#Official+Releases">Derby
System</a> [Note: the *-bin archives contain the documentation as well as Derby]
-  </li>  <li>
+  </li>
+				<li>
 	Application download for
 <a href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">JPetStore</a>
-  </li> <li>
+				</li>
+				<li>
 	WebSphere Express download - 60 day 
 	<a href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">Evaluation</a>
-  </li> <li>
+				</li>
+				<li>
 	WebSphere 6.0.1 <a href="http://www-1.ibm.com/support/docview.wss?rs=0&amp;context=SW600&amp;dc=D420&amp;q1=WebSphere&amp;uid=swg24009071&amp;loc=en_US&amp;cs=utf-8&amp;cc=us&amp;lang=en">upgrade</a>
-  </li> <li>
-	For more information on Derby see the <a href="http://db.apache.org/derby/index.html">Apache
Derby site</a>	
-  </li><li>
+				</li>
+				<li>
+	For more information on Derby see the <a href="http://db.apache.org/derby/index.html">Apache
Derby site</a>
+				</li>
+				<li>
 	For more information on iBATIS see the <a href="http://ibatis.apache.org">  Apache
iBATIS site</a>
-  </li>
-</ul>
-
-</section>
-
-</body>
-
+				</li>
+			</ul>
+			<p>Related Aticles</p>
+			<ul>
+				<li>Follow this link for details of a similar deployemnt of <a href="JPetStoreGeronimo.html">JPetStore
and Derby in a Geronimo</a> Server environment.</li>
+			</ul>
+		</section>
+	</body>
 </document>

Modified: db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml?rev=265594&r1=265593&r2=265594&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml Wed Aug 31 14:55:48
2005
@@ -45,16 +45,22 @@
             Code Coverage Using EMMA</a></em></td>
 </tr>
 <tr>
-   <td>iBATIS JPetStore</td>
-   <td><em><a href="JPetStoreDerby.html">Running iBATIS JPetStore 4 using
an 
-         embedded Apache Derby database</a></em></td>
-</tr>
-<tr>
    <td>JOnAS</td>
    <td><em><a href="../binaries/DerbyAndRedHatAppServer.pdf">Apache 
              Derby and Red Hat Application Server: JOnAS
 	     Integration</a></em></td>
 </tr>
+<tr>
+   <td>JPetStore Geronimo</td>
+   <td><em><a href="JPetStoreGeronimo.html">Using Apache Derby with 
+         iBATIS JPetStore 4 running on the Geronimo J2EE Server</a></em></td>
+</tr>
+
+<tr>
+   <td>JPetStore WebSphere</td>
+   <td><em><a href="JPetStoreWebSphere.html">Using Apache Derby with 
+         iBATIS JPetStore 4 on the WebSphere Server</a></em></td>
+</tr>
 </table>
 <p>
 
@@ -100,7 +106,7 @@
 </tr>
 </table>
 
-<p><em>Last Updated: August 23, 2005</em></p>
+<p><em>Last Updated: August 31, 2005</em></p>
 
 </body>
 </document>

Modified: db/derby/site/trunk/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/site.xml?rev=265594&r1=265593&r2=265594&view=diff
==============================================================================
--- db/derby/site/trunk/src/documentation/content/xdocs/site.xml (original)
+++ db/derby/site/trunk/src/documentation/content/xdocs/site.xml Wed Aug 31 14:55:48 2005
@@ -72,8 +72,9 @@
       <dots      label="DOTS Derby"   href="DOTS_Derby.htm"/>
       <dots      label="DOTS System"  href="../binaries/UsingDotsDerbySystemTest.pdf"/>
       <emma      label="EMMA"         href="../binaries/DerbyCodeCoverageUsingEmma.pdf"/>
-      <jpetstore label="iBATIS JPetStore" href="JPetStoreDerby.html" />
       <jonas     label="JOnAS (PDF)"  href="../binaries/DerbyAndRedHatAppServer.pdf" />
+      <jpetstoreG label="JPetStore Geronimo" href="JPetStoreGeronimo.html" />
+      <jpetstoreW label="JPetStore WebSphere" href="JPetStoreWebSphere.html" />
   </integrate>
 
       <eclipse label="Eclipse Plug-ins" href="integrate/" tab="integrate">



Mime
View raw message