db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r170236 - in /incubator/derby/site/trunk: build/site/ build/site/binaries/ build/site/integrate/ build/site/releases/ src/documentation/content/binaries/ src/documentation/content/xdocs/ src/documentation/content/xdocs/integrate/
Date Sun, 15 May 2005 17:20:06 GMT
Author: jta
Date: Sun May 15 10:20:05 2005
New Revision: 170236

URL: http://svn.apache.org/viewcvs?rev=170236&view=rev
Log:
DERBY-286 (http://issues.apache.org/jira/browse/DERBY-286):
Added Stan Bradbury's article submission that describes how to
modify the iBATIS JPetStore 4 application to work with a Derby database
in a J2EE Server environment (in this case WebSphere 6.0.1).

Added:
    incubator/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip   (with props)
    incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html   (with props)
    incubator/derby/site/trunk/src/documentation/content/binaries/Derby-JPetStore.zip   (with props)
    incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml   (with props)
Modified:
    incubator/derby/site/trunk/build/site/integrate/derby_plugin.html
    incubator/derby/site/trunk/build/site/integrate/index.html
    incubator/derby/site/trunk/build/site/integrate/misc.html
    incubator/derby/site/trunk/build/site/linkmap.html
    incubator/derby/site/trunk/build/site/releases/release-10.0.2.1.html
    incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml
    incubator/derby/site/trunk/src/documentation/content/xdocs/site.xml

Added: incubator/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip?rev=170236&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html?rev=170236&view=auto
==============================================================================
--- incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html (added)
+++ incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html Sun May 15 10:20:05 2005
@@ -0,0 +1,557 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.6">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Running iBATIS JPetStore 4 using an embedded Apache Derby database</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache</a> &gt; <a href="http://incubator.apache.org/">incubator</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://incubator.apache.org"><img class="logoImage" alt="" src="../images/apache-incubator-logo.png" title=""></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://incubator.apache.org/derby/"><img class="logoImage" alt="Derby" src="../images/derby-logo.jpg" title="Derby is a zero admin java RDBMS."></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google:');" value="Search the site with google:" size="25" name="q" id="query" type="text">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="base-not-selected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="base-not-selected" href="../derby_comm.html">Community</a>
+</li>
+<li>
+<a class="base-not-selected" href="../manuals/index.html">Manuals</a>
+</li>
+<li>
+<a class="base-not-selected" href="../papers/index.html">Papers</a>
+</li>
+<li class="current">
+<a class="base-selected" href="../integrate/index.html">Integration</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript" language="JavaScript"><!--
+              document.write("Published: " + document.lastModified);
+              //  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+             
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Integration</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a title="" href="../integrate/index.html">Index</a>
+</div>
+<div class="menuitem">
+<a title="" href="../integrate/misc.html">Summary</a>
+</div>
+<div class="menuitem">
+<a title="" href="../binaries/HOWTO_CJDBC_Derby_v0.2.pdf">C-JDBC (PDF)</a>
+</div>
+<div class="menuitem">
+<a title="" href="../binaries/HOWTO_CJDBC_Derby_v0.2.sxw">C-JDBC (SXW)</a>
+</div>
+<div class="menuitem">
+<a title="" href="../DOTS_Derby.html">DOTS Derby</a>
+</div>
+<div class="menuitem">
+<a title="" href="../binaries/UsingDotsDerbySystemTest.pdf">DOTS System</a>
+</div>
+<div class="menuitem">
+<a title="" href="../integrate/derby_plugin.html">Eclipse</a>
+</div>
+<div class="menuitem">
+<a title="" href="../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">iBATIS JPetStore</div>
+</div>
+<div class="menuitem">
+<a title="" href="../binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div id="skinconf-txtlink"></div>
+<div class="trail">
+	        Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Running iBATIS JPetStore 4 using an embedded Apache Derby database</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Introduction">Introduction</a>
+</li>
+<li>
+<a href="#Required+Software">Required Software</a>
+</li>
+<li>
+<a href="#Setup+Overview">Setup Overview</a>
+</li>
+<li>
+<a href="#CookBook+Details">CookBook Details</a>
+</li>
+<li>
+<a href="#Integration+Notes">Integration Notes</a>
+</li>
+<li>
+<a href="#Related+Links">Related Links</a>
+</li>
+</ul>
+</div>
+
+<a name="N1000C"></a><a name="Introduction"></a>
+<h2 class="boxed">Introduction</h2>
+<div class="section">
+<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.  iBATIS is currently an Apache incubator project (graduation to an official Apache project is expected soon and may have occurred by the time you read this).
+</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, like iBATIS, is an Apache incubator project.
+</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>
+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>
+</div>
+
+<a name="N1001C"></a><a name="Required+Software"></a>
+<h2 class="boxed">Required Software</h2>
+<div class="section">
+<ul>
+  
+<li>   Downloaded the <a class="external" 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>
+  
+<li> WebShere Application Server version 6.0.1.  You can obtain an <a class="external" href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">evaluation</a> copy of WebSphere and the 6.0.1  <a class="external" href="http://www-1.ibm.com/support/docview.wss?rs=0&context=SW600&dc=D420&q1=WebSphere&uid=swg24009071&loc=en_US&cs=utf-8&cc=us&lang=en">upgrade</a> from IBM.  The downloads URLs are also provided in  the Links section below.
+  </li>
+
+</ul>
+</div>
+
+
+<a name="N1003F"></a><a name="Setup+Overview"></a>
+<h2 class="boxed">Setup Overview</h2>
+<div class="section">
+<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.
+	   </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:
+	   <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:
+		   <pre class="code">
+   http://{machine-name}:9080/jpetstore
+		   </pre>
+</li>
+	   
+</ul>
+	   
+</li>
+  
+</ul>
+</div>
+   
+
+<a name="N10083"></a><a name="CookBook+Details"></a>
+<h2 class="boxed">CookBook Details</h2>
+<div class="section">
+<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.
+   </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:
+    <ul>
+		
+<li> Navigate the following links to the Node  level variable definition screen:  <span class="codefrag">Environment &gt; WebSphere Variables (check or set the NODE radio button active - click [APPLY] ) &gt; NEW</span>
+</li>
+		
+<li> Enter the following information:
+		<pre class="code">
+   Name: DERBY_HOME
+   value: ${WAS_INSTALL_ROOT}/Derby
+   Description:  JPetStore Derby Files
+   Click: [SAVE]
+		</pre>
+		
+</li>	
+</ul>
+    
+</li>
+</ul>
+<ul>
+<li>Navigate the following links to the Server level JDBC Resource / datasource definition screens: <span class="codefrag">Resources &gt; JDBC providers (check or set the SERVER radio button active - click [APPLY]) &gt; NEW</span>
+  
+<ul>
+		
+<li>On the General Properties screen select from the drop down lists:
+	   <pre class="code">
+    database type: Cloudscape
+    provider type:  Cloudscape JDBC Provider
+    Implementation:  XA data source  
+    Click [NEXT]
+	   </pre>
+</li>		
+	   
+</ul>
+	
+<ul>
+		
+<li>   On the JDBC Provider screen enter:  
+			<pre class="code">
+   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]
+		   </pre>
+</li>
+		
+<li>   Under 'Additional Properties' click  'Data Sources'.  On the Data Sources screen click 'New' and enter:
+	   <pre class="code">
+   Name: JPetStoreDB
+   JNDI Name:  jdbc/JPetStoreDB
+   Uncheck the checkbox labeled: Use this Data Source in container managed persistence (CMP)
+   Click the radio button labeled: Data store helper classes provided by WebSphere Application Server 
+   Select the "Generic Datastore Helper"
+   Click [APPLY]
+	   </pre>
+</li>
+	   
+<li>   Under 'Additional Properties' click 'Custom Properties' and enter: 
+	   <pre class="code">
+   NAME: databaseName
+   Value:  ${DERBY_HOME}/JPetStoreDB
+   Click [SAVE]
+	   </pre>
+</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:
+   <pre class="code"> 
+      On the 'Preparing for the application installation - Specify..' screen:
+            Click the radio button:  'Local Filesystem'
+            Browse to the jpetstore.war file downloaded from iBATIS
+            Enter the context-root as: /jpetstore
+            Click [NEXT]
+      On the 'Preparing for the application installation - Bindings.' screen:
+		   Accept the defaults by clicking:  [NEXT]
+		   Dismiss the security warnings by clicking [CONTINUE]
+      On the Step 1 screen 
+            Select the checkbox:  'Deploy Web services'
+	            (note the application name defaults to: jpetstore_war )
+            Click [NEXT]
+      On the Step 2 screen 
+            Accept the defaults by clicking [NEXT]
+      On the Step 3 Map the JNDI datasource defined previously to the application:
+		   At the bottom of the screen 
+		         click the 'Select' checkbox next to the JPetStore Module
+		   In the 'javax.sql.DataSource' box (near the top) 
+		         select the JNDI datasource name from the dropdown list (e.g. jdbc/JPetStoreDB)
+		   Click the [APPLY] button next to the JNDI datasource name
+		   At the bottom check that the JNDI name appears in the JPetStore Module box.
+            Click [NEXT]
+      On the Step 4 screen accept the defaults by clicking [NEXT]
+      On the Step 5 screen accept the defaults by clicking [NEXT]
+      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]
+   </pre> 
+</li>   
+</ul>
+<p>
+<strong>Replace the  <span class="codefrag">sql-map-config.xml</span> 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:
+		<pre class="code">
+    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.  
+    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]
+		</pre>
+	
+</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: <span class="codefrag">derby.jar, derbytools.jar,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql</span> and issue the following command to create the database, tables and indexes:
+	<pre class="code">
+   java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB;create=true 
+	   org.apache.derby.tools.ij jpetstore-derby-schema.sql
+	</pre> 
+</li>
+	
+<li>Now load the data into the tables using the following command:
+	<pre class="code">
+	java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB
+	   org.apache.derby.tools.ij jpetstore-derby-dataload.sql
+	</pre>
+</li>
+
+</ul>
+<p>If you do not wish to use the <span class="codefrag">sql-map-config.xml</span> supplied in the Derby-JPetStore.zip file but prefer to modify the one supplied with the iBATIS JPetStore application do the following.  Edit the <span class="codefrag">sql-map-config.xml</span> file and replace the existing TransactionManager definition section with this definition:</p>
+<pre class="code">
+   &lt;transactionManager type="JDBC" &gt;
+      &lt;dataSource type="JNDI"&gt;
+         &lt;property name="DBJndiContext" value="jdbc/JPetStoreDB"/&gt;
+      &lt;/dataSource&gt;
+   &lt;/transactionManager&gt;
+   </pre>
+</div>   
+
+
+<a name="N10131"></a><a name="Integration+Notes"></a>
+<h2 class="boxed">Integration Notes</h2>
+<div class="section">
+<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>
+I recommend the following paper to people seriously interested in using Derby with WebSphere: <a class="external" 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>
+   	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>
+</div>
+
+
+<a name="N10144"></a><a name="Related+Links"></a>
+<h2 class="boxed">Related Links</h2>
+<div class="section">
+<ul>
+  
+<li>
+	Files needed for the Derby and JPetStore integration: 
+<a href="../binaries/Derby-JPetStore.zip">Derby-JPetStore.zip</a>
+  
+</li> 
+<li>
+    Download the complete <a href="http://incubator.apache.org/derby/derby_downloads.html#Official+Releases">Derby System</a> [Note: the *-bin archives contain the documentation as well as Derby]
+  </li>  
+<li>
+	Application download for
+<a class="external" href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">JPetStore</a>
+  
+</li> 
+<li>
+	WebSphere Express download - 60 day 
+	<a class="external" href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">Evaluation</a>
+  
+</li> 
+<li>
+	WebSphere 6.0.1 <a class="external" href="http://www-1.ibm.com/support/docview.wss?rs=0&context=SW600&dc=D420&q1=WebSphere&uid=swg24009071&loc=en_US&cs=utf-8&cc=us&lang=en">upgrade</a>
+  
+</li> 
+<li>
+	For more information on Derby see the <a href="http://incubator.apache.org/derby/index.html">Apache Derby incubator site</a>	
+  
+</li>
+<li>
+	For more information on iBATIS see the <a href="http://incubator.apache.org/ibatis/site/index.html">  Apache Ibatis incubator site</a>
+  
+</li>
+
+</ul>
+</div>
+
+
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+ Copyright &copy; 2004-2005 Apache Software Foundation</div>
+<div id="feedback">
+    Send feedback about the website to:
+  <a id="feedbackto" href="mailto:derby-dev@db.apache.org?subject=Feedback%C2%A0integrate/JPetStoreDerby.html">derby-dev@db.apache.org</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Propchange: incubator/derby/site/trunk/build/site/integrate/JPetStoreDerby.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/derby/site/trunk/build/site/integrate/derby_plugin.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/integrate/derby_plugin.html?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/integrate/derby_plugin.html (original)
+++ incubator/derby/site/trunk/build/site/integrate/derby_plugin.html Sun May 15 10:20:05 2005
@@ -135,6 +135,9 @@
 <a title="" href="../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
 </div>
 <div class="menuitem">
+<a title="" href="../integrate/JPetStoreDerby.html">iBATIS JPetStore</a>
+</div>
+<div class="menuitem">
 <a title="" href="../binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
 </div>
 </div>

Modified: incubator/derby/site/trunk/build/site/integrate/index.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/integrate/index.html?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/integrate/index.html (original)
+++ incubator/derby/site/trunk/build/site/integrate/index.html Sun May 15 10:20:05 2005
@@ -135,6 +135,9 @@
 <a title="" href="../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
 </div>
 <div class="menuitem">
+<a title="" href="../integrate/JPetStoreDerby.html">iBATIS JPetStore</a>
+</div>
+<div class="menuitem">
 <a title="" href="../binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
 </div>
 </div>
@@ -165,49 +168,88 @@
 <p>
 This <em>ad hoc</em> spot in the Derby site hosts information about
 products that work with Derby.
-The <a href="misc.html">Summary</a> contains pointers
+</p>
+
+
+<p>
+The <a href="misc.html">Summary</a> link contains pointers
 to other products that work (or might work) with Derby.
 Detailed writeups are also available and so far include:
 </p>
 
+
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+
+<tr>
+  
+<th colspan="1" rowspan="1">Navigation Menu Entry</th>
+  <th colspan="1" rowspan="1">Title</th>
+
+</tr>
+
+<tr>
+  
+<td colspan="1" rowspan="1">C-JDBC</td>
+  <td colspan="1" rowspan="1"><em>HOWTO use C-JDBC with Apache Derby</em>
+       [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.pdf">pdf</a>]
+       [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.sxw">Open Office</a>]</td>
+
+</tr>
+
+<tr>
+  
+<td colspan="1" rowspan="1">DOTS Derby</td>
+  <td colspan="1" rowspan="1"><a href="../DOTS_Derby.html"><em>Running DOTS 
+	    (Database Open Source Test Suite) with Derby</em></a></td>
+
+</tr>
+
+<tr>
+  
+<td colspan="1" rowspan="1"> DOTS System</td>
+  <td colspan="1" rowspan="1"> <a href="../binaries/UsingDotsDerbySystemTest.pdf"><em>Using DOTS 
+       as Apache Derby System Test</em></a></td>
+
+</tr>
+
+<tr>
+  
+<td colspan="1" rowspan="1">Eclipse</td>
+  <td colspan="1" rowspan="1"><em><a href="derby_plugin.html">Apache Derby Core Plug-in 
+      for Eclipse</a></em></td>
+
+</tr>
+
+<tr>
+  
+<td colspan="1" rowspan="1">EMMA</td>
+  <td colspan="1" rowspan="1"><em><a href="../binaries/DerbyCodeCoverageUsingEmma.pdf">Derby
+            Code Coverage Using EMMA</a></em></td>
+
+</tr>
+
+<tr>
+   
+<td colspan="1" rowspan="1">iBATIS JPetStore</td>
+   <td colspan="1" rowspan="1"><em><a href="JPetStoreDerby.html">Running iBATIS JPetStore 4 using an 
+         embedded Apache Derby database</a></em></td>
+
+</tr>
+
+<tr>
    
-<ul>
-        
-<li>C-JDBC: <em>HOWTO use C-JDBC with Apache Derby</em>
-	    [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.pdf">pdf</a>]
-	    [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.sxw">Open Office</a>].
-	</li>
-        
-<li>DOTS Derby: <a href="../DOTS_Derby.html"><em>Running DOTS 
-	    (Database Open Source Test Suite) with Derby</em></a>
-</li>
-        
-<li>DOTS System: 
-            <a href="../binaries/UsingDotsDerbySystemTest.pdf"><em>Using DOTS 
-	    as Apache Derby System Test</em></a>
-</li>
-        
-<li>Eclipse: <a href="derby_plugin.html">Apache Derby Core Plug-in for Eclipse</a>
-	
-</li>
-	
-<li>EMMA: <a href="../binaries/DerbyCodeCoverageUsingEmma.pdf">Derby
-            Code Coverage Using EMMA</a>
-	
-</li>
-	
-<li>JOnAS:
-	     <a href="../binaries/DerbyAndRedHatAppServer.pdf">Apache 
+<td colspan="1" rowspan="1">JOnAS</td>
+   <td colspan="1" rowspan="1"><em><a href="../binaries/DerbyAndRedHatAppServer.pdf">Apache 
              Derby and Red Hat Application Server: JOnAS
-	     Integration</a>
-	
-</li>
-    
-</ul>
+	     Integration</a></em></td>
+
+</tr>
+
+</table>
 
 
 <p>
-<em>Last Updated: March 23, 2005</em>
+<em>Last Updated: May 15, 2005</em>
 </p>
 
 

Modified: incubator/derby/site/trunk/build/site/integrate/misc.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/integrate/misc.html?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/integrate/misc.html (original)
+++ incubator/derby/site/trunk/build/site/integrate/misc.html Sun May 15 10:20:05 2005
@@ -135,6 +135,9 @@
 <a title="" href="../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
 </div>
 <div class="menuitem">
+<a title="" href="../integrate/JPetStoreDerby.html">iBATIS JPetStore</a>
+</div>
+<div class="menuitem">
 <a title="" href="../binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
 </div>
 </div>

Modified: incubator/derby/site/trunk/build/site/linkmap.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/linkmap.html?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/linkmap.html (original)
+++ incubator/derby/site/trunk/build/site/linkmap.html Sun May 15 10:20:05 2005
@@ -243,6 +243,9 @@
 <a title="" href="binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
 </div>
 <div class="menuitem">
+<a title="" href="integrate/JPetStoreDerby.html">iBATIS JPetStore</a>
+</div>
+<div class="menuitem">
 <a title="" href="binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
 </div>
 </div>
@@ -596,6 +599,10 @@
       
 <li>
 <a href="integrate/../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>&nbsp;&nbsp;&nbsp;_________________________&nbsp;&nbsp;<em>emma</em>
+</li>
+      
+<li>
+<a href="integrate/JPetStoreDerby.html">iBATIS JPetStore</a>&nbsp;&nbsp;&nbsp;_________________________&nbsp;&nbsp;<em>jpetstore</em>
 </li>
       
 <li>

Modified: incubator/derby/site/trunk/build/site/releases/release-10.0.2.1.html
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/build/site/releases/release-10.0.2.1.html?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/build/site/releases/release-10.0.2.1.html (original)
+++ incubator/derby/site/trunk/build/site/releases/release-10.0.2.1.html Sun May 15 10:20:05 2005
@@ -243,6 +243,9 @@
 <a title="" href="../binaries/DerbyCodeCoverageUsingEmma.pdf">EMMA</a>
 </div>
 <div class="menuitem">
+<a title="" href="../integrate/JPetStoreDerby.html">iBATIS JPetStore</a>
+</div>
+<div class="menuitem">
 <a title="" href="../binaries/DerbyAndRedHatAppServer.pdf">JOnAS (PDF)</a>
 </div>
 </div>

Added: incubator/derby/site/trunk/src/documentation/content/binaries/Derby-JPetStore.zip
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documentation/content/binaries/Derby-JPetStore.zip?rev=170236&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/derby/site/trunk/src/documentation/content/binaries/Derby-JPetStore.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml?rev=170236&view=auto
==============================================================================
--- incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml (added)
+++ incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml Sun May 15 10:20:05 2005
@@ -0,0 +1,246 @@
+<?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>
+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.  iBATIS is currently an Apache incubator project (graduation to an official Apache project is expected soon and may have occurred by the time you read this).
+</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, like iBATIS, is an Apache incubator project.
+</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>
+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.
+  </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>
+  <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.
+   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.
+	   </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:
+	   <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:
+		   <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.
+   </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:
+    <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:
+		<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:
+	   <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>
+   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>
+   Name: JPetStoreDB
+   JNDI Name:  jdbc/JPetStoreDB
+   Uncheck the checkbox labeled: Use this Data Source in container managed persistence (CMP)
+   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>
+   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> 
+      On the 'Preparing for the application installation - Specify..' screen:
+            Click the radio button:  'Local Filesystem'
+            Browse to the jpetstore.war file downloaded from iBATIS
+            Enter the context-root as: /jpetstore
+            Click [NEXT]
+      On the 'Preparing for the application installation - Bindings.' screen:
+		   Accept the defaults by clicking:  [NEXT]
+		   Dismiss the security warnings by clicking [CONTINUE]
+      On the Step 1 screen 
+            Select the checkbox:  'Deploy Web services'
+	            (note the application name defaults to: jpetstore_war )
+            Click [NEXT]
+      On the Step 2 screen 
+            Accept the defaults by clicking [NEXT]
+      On the Step 3 Map the JNDI datasource defined previously to the application:
+		   At the bottom of the screen 
+		         click the 'Select' checkbox next to the JPetStore Module
+		   In the 'javax.sql.DataSource' box (near the top) 
+		         select the JNDI datasource name from the dropdown list (e.g. jdbc/JPetStoreDB)
+		   Click the [APPLY] button next to the JNDI datasource name
+		   At the bottom check that the JNDI name appears in the JPetStore Module box.
+            Click [NEXT]
+      On the Step 4 screen accept the defaults by clicking [NEXT]
+      On the Step 5 screen accept the defaults by clicking [NEXT]
+      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>
+    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.  
+    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:
+	<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>
+	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>
+   &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>
+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>
+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>
+   	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>
+	Files needed for the Derby and JPetStore integration: 
+<a href="../binaries/Derby-JPetStore.zip">Derby-JPetStore.zip</a>
+  </li> <li>
+    Download the complete <a href="http://incubator.apache.org/derby/derby_downloads.html#Official+Releases">Derby System</a> [Note: the *-bin archives contain the documentation as well as Derby]
+  </li>  <li>
+	Application download for
+<a href="http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download">JPetStore</a>
+  </li> <li>
+	WebSphere Express download - 60 day 
+	<a href="http://www-128.ibm.com/developerworks/downloads/ws/wasexp">Evaluation</a>
+  </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://incubator.apache.org/derby/index.html">Apache Derby incubator site</a>	
+  </li><li>
+	For more information on iBATIS see the <a href="http://incubator.apache.org/ibatis/site/index.html">  Apache Ibatis incubator site</a>
+  </li>
+</ul>
+
+</section>
+
+</body>
+
+</document>

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

Modified: incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml (original)
+++ incubator/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml Sun May 15 10:20:05 2005
@@ -9,34 +9,59 @@
 <p>
 This <em>ad hoc</em> spot in the Derby site hosts information about
 products that work with Derby.
-The <a href="misc.html">Summary</a> contains pointers
+</p>
+
+<p>
+The <a href="misc.html">Summary</a> link contains pointers
 to other products that work (or might work) with Derby.
 Detailed writeups are also available and so far include:
 </p>
 
-   <ul>
-        <li>C-JDBC: <em>HOWTO use C-JDBC with Apache Derby</em>
-	    [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.pdf">pdf</a>]
-	    [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.sxw">Open Office</a>].
-	</li>
-        <li>DOTS Derby: <a href="../DOTS_Derby.html"><em>Running DOTS 
-	    (Database Open Source Test Suite) with Derby</em></a></li>
-        <li>DOTS System: 
-            <a href="../binaries/UsingDotsDerbySystemTest.pdf"><em>Using DOTS 
-	    as Apache Derby System Test</em></a></li>
-        <li>Eclipse: <a href="derby_plugin.html">Apache Derby Core Plug-in for Eclipse</a>
-	</li>
-	<li>EMMA: <a href="../binaries/DerbyCodeCoverageUsingEmma.pdf">Derby
-            Code Coverage Using EMMA</a>
-	</li>
-	<li>JOnAS:
-	     <a href="../binaries/DerbyAndRedHatAppServer.pdf">Apache 
+<table>
+<tr>
+  <th>Navigation Menu Entry</th>
+  <th>Title</th>
+</tr>
+<tr>
+  <td>C-JDBC</td>
+  <td><em>HOWTO use C-JDBC with Apache Derby</em>
+       [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.pdf">pdf</a>]
+       [<a href="../binaries/HOWTO_CJDBC_Derby_v0.2.sxw">Open Office</a>]</td>
+</tr>
+<tr>
+  <td>DOTS Derby</td>
+  <td><a href="../DOTS_Derby.html"><em>Running DOTS 
+	    (Database Open Source Test Suite) with Derby</em></a></td>
+</tr>
+<tr>
+  <td> DOTS System</td>
+  <td> <a href="../binaries/UsingDotsDerbySystemTest.pdf"><em>Using DOTS 
+       as Apache Derby System Test</em></a></td>
+</tr>
+<tr>
+  <td>Eclipse</td>
+  <td><em><a href="derby_plugin.html">Apache Derby Core Plug-in 
+      for Eclipse</a></em></td>
+</tr>
+<tr>
+  <td>EMMA</td>
+  <td><em><a href="../binaries/DerbyCodeCoverageUsingEmma.pdf">Derby
+            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>
-	</li>
-    </ul>
+	     Integration</a></em></td>
+</tr>
+</table>
 
-<p><em>Last Updated: March 23, 2005</em></p>
+<p><em>Last Updated: May 15, 2005</em></p>
 
 </body>
 </document>

Modified: incubator/derby/site/trunk/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/site/trunk/src/documentation/content/xdocs/site.xml?rev=170236&r1=170235&r2=170236&view=diff
==============================================================================
--- incubator/derby/site/trunk/src/documentation/content/xdocs/site.xml (original)
+++ incubator/derby/site/trunk/src/documentation/content/xdocs/site.xml Sun May 15 10:20:05 2005
@@ -61,6 +61,7 @@
       <dots      label="DOTS System"  href="../binaries/UsingDotsDerbySystemTest.pdf"/>
       <eclipse   label="Eclipse"      href="derby_plugin.html"/>
       <emma      label="EMMA"         href="../binaries/DerbyCodeCoverageUsingEmma.pdf"/>
+      <jpetstore label="iBATIS JPetStore" href="JPetStoreDerby.html" />
       <jonas     label="JOnAS (PDF)"  href="../binaries/DerbyAndRedHatAppServer.pdf" />
   </integrate>
 



Mime
View raw message