Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 91570 invoked from network); 31 Aug 2005 21:58:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Aug 2005 21:58:17 -0000 Received: (qmail 75279 invoked by uid 500); 31 Aug 2005 21:58:17 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 75220 invoked by uid 500); 31 Aug 2005 21:58:16 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 75143 invoked by uid 99); 31 Aug 2005 21:58:16 -0000 X-ASF-Spam-Status: No, hits=-9.2 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,REMOVE_PAGE X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 31 Aug 2005 14:58:12 -0700 Received: (qmail 91502 invoked by uid 65534); 31 Aug 2005 21:58:12 -0000 Message-ID: <20050831215812.91501.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r265594 [1/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 -0000 To: derby-commits@db.apache.org From: jta@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jta Date: Wed Aug 31 14:55:48 2005 New Revision: 265594 URL: http://svn.apache.org/viewcvs?rev=265594&view=rev Log: DERBY-547: Added Stan Bradbury's modifications to the iBATIS JPetStore paper (integrate/JPetStoreDerby.html), which clarifies by file name and project zip file name that this particular file is specific to WebSphere. DERBY-548: Added Stan Bradbury's new writeup on JPetStore and Geronimo. committing both these changes at the same time because the two papers link to each other. Added: db/derby/site/trunk/build/site/binaries/JPetStoreAPP4Geronimo.zip (with props) db/derby/site/trunk/build/site/binaries/JPetStoreAPP4WebSphere.zip - copied unchanged from r265579, db/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html (with props) db/derby/site/trunk/build/site/integrate/JPetStoreWebSphere.html - copied, changed from r265579, db/derby/site/trunk/build/site/integrate/JPetStoreDerby.html db/derby/site/trunk/src/documentation/content/xdocs/binaries/JPetStoreAPP4Geronimo.zip (with props) db/derby/site/trunk/src/documentation/content/xdocs/binaries/JPetStoreAPP4WebSphere.zip - copied unchanged from r265579, db/derby/site/trunk/src/documentation/content/xdocs/binaries/Derby-JPetStore.zip db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreGeronimo.xml (with props) db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreWebSphere.xml - copied, changed from r265579, db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml Removed: db/derby/site/trunk/build/site/binaries/Derby-JPetStore.zip db/derby/site/trunk/build/site/integrate/JPetStoreDerby.html db/derby/site/trunk/src/documentation/content/xdocs/binaries/Derby-JPetStore.zip db/derby/site/trunk/src/documentation/content/xdocs/integrate/JPetStoreDerby.xml Modified: db/derby/site/trunk/build/site/integrate/Readme.html db/derby/site/trunk/build/site/integrate/derby_plugin.html db/derby/site/trunk/build/site/integrate/func_spec_plugins.html db/derby/site/trunk/build/site/integrate/index.html db/derby/site/trunk/build/site/integrate/misc.html db/derby/site/trunk/build/site/integrate/plugin_help/derby_app.html db/derby/site/trunk/build/site/integrate/plugin_help/ij.html db/derby/site/trunk/build/site/integrate/plugin_help/ij2.html db/derby/site/trunk/build/site/integrate/plugin_help/ij_toc.html db/derby/site/trunk/build/site/integrate/plugin_help/java_project.html db/derby/site/trunk/build/site/integrate/plugin_help/nature.html db/derby/site/trunk/build/site/integrate/plugin_help/nature_toc.html db/derby/site/trunk/build/site/integrate/plugin_help/properties.html db/derby/site/trunk/build/site/integrate/plugin_help/remove_nature.html db/derby/site/trunk/build/site/integrate/plugin_help/resources.html db/derby/site/trunk/build/site/integrate/plugin_help/server_toc.html db/derby/site/trunk/build/site/integrate/plugin_help/start_server.html db/derby/site/trunk/build/site/integrate/plugin_help/start_toc.html db/derby/site/trunk/build/site/integrate/plugin_help/stop_server.html db/derby/site/trunk/build/site/integrate/plugin_help/sysinfo.html db/derby/site/trunk/build/site/integrate/plugin_howto.html db/derby/site/trunk/build/site/integrate/plugin_slides.html db/derby/site/trunk/build/site/linkmap.html db/derby/site/trunk/src/documentation/content/xdocs/integrate/index.xml db/derby/site/trunk/src/documentation/content/xdocs/site.xml Added: db/derby/site/trunk/build/site/binaries/JPetStoreAPP4Geronimo.zip URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/binaries/JPetStoreAPP4Geronimo.zip?rev=265594&view=auto ============================================================================== Binary file - no diff available. Propchange: db/derby/site/trunk/build/site/binaries/JPetStoreAPP4Geronimo.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html?rev=265594&view=auto ============================================================================== --- db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html (added) +++ db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html Wed Aug 31 14:55:48 2005 @@ -0,0 +1,465 @@ + + + + + + + +Using Apache Derby with iBATIS JPetStore 4 running on the Geronimo J2EE server + + + + + + + + + +
+
+apache > db +
+
+ + + + +
+
+
+
+
+ +
+
+ +   +
+ +
+
+Font size: +   +   +   +
+

Using Apache Derby with iBATIS JPetStore 4 running on the Geronimo J2EE server

+ + +

+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. +

+ + +

Introduction

+
+

+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, iBATIS, Geronimo and Derby, are all being developed by the Apache community and are freely available thru the Apache Foundation Website. +

+
+ + +

Typographic Conventions Used

+
+

The following codes in curly braces will be used to represent installation dependant file locations as described below:

+
    + +
  • {GERONIMO_HOME}: The installation directory for the Geronimo Server. Note that this installation path should not contain any spaces.
  • + +
  • {machine-name}: the hostname of the machine on which the server and application are installed.
  • + +
  • {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 derby-10.0.2.1.jar exists in the directory {GERONIMO_HOME}\repository\incubator-derby\jars.
  • + +
  • {Derby_System_Home}: the directory containing the derby.log file, Geronimo SystemDatabase and the application Databases 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 {Derby_System_Home}\Databases subdirectory.
  • + +
+
+ + +

Required Software / Downloads

+
+
    + +
  • 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.
  • + +
  • Download the Geronimo 1.0 Milestone 4 release. Extract the Geromino installation files to {GERONIMO_HOME}.
  • + +
  • Download the JPetStoreAPP4Geronimo.zip file associated with this article. Extract the files to a convenient working directory.
  • + +
+
+ + +

Setup Steps:

+
+
    +
  • + +Extract the database zipfile and deployment files: Unzip the files from JPetStoreAPP4Geronimo.zip into a working directory.
  • + +
  • +Move deployment files to {GERONIMO_HOME}:Move the following three files to the {GERONIMO_HOME} directory:
      + +
    • +jpetstoreAPP.war - The JPetstore application web archive file.
    • + +
    • +jpetstoreAPP-geronimo-jetty.xml - The Geronimo web application deployment descriptor.
    • + +
    • +DbPoolDeployPlan.xml - The Derby datasource deployment descriptor.
    • + +
    + Using the file setupM4.bat 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. +
  • + +
  • + +Start Geronimo: In a command window/shell, execute the customized setupM4 script file then start the Geronimo server from {GERONIMO_HOME} using the command: java -jar bin\server.jar +
  • + +
  • +Setup the JPetStoreDB database: Unzip the files from JPetStoreAPP4Geronimo.zip into the {Derby_System_Home} directory ({GERONIMO_HOME}/var/derby).
  • + +
  • +Deploy and start the datasource: In a new command shell/window execute the customized setupM4 script file then issue the following commands to deploy and start the JPetstore datasource: +
    +   > 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
    +     
    + +
  • + +
  • + +Deploy and start the application: Issue the following commands to deploy and start the iBATIS JPetStore application: +
      
    +    >  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
    +					    
    + +
  • + +
  • + +Test the JPetStoreAPP: Open your browser and enter the following URL: +
    +   http://{machine-name}:8080/jpetstoreAPP
    +		   
    + +
  • + +
+
+ + + +

Optional Database Setup Instructions

+
+

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.

+
    + +
  • Copy the following SQL script files to the {Derby_System_Home}\Databases subdirectory where you will build the database: ,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql. Issue the following command to create the database, tables and indexes: +
    +   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
    +	
    + +
  • + +
  • Now load the data into the tables using the following command: +
    +	java -cp {Derby_Jars}/derby.jar;{Derby_Jars}/derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB
    +	   org.apache.derby.tools.ij jpetstore-derby-dataload.sql
    +	
    + +
  • + +
+

You now have a fully populated database to use with the JPetStore application.

+
+ + + +

Integration Notes

+
+

+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. +

+

+ 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.

+

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:

+
    + +
  • + Edit the sql-map-config.xml 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: +
    +   <transactionManager type="JDBC" >
    +      <dataSource type="JNDI">
    +         <property name="DBJndiContext" value="jdbc/JPetStoreDB"/>
    +      </dataSource>
    +   </transactionManager>
    +   
    +
  • + +
  • Edit the web.xml file and replace the existing resource-ref definition with the following: +
    +      <resource-ref> 
    +   <description>JPetStore DataSource</description>
    +	<res-ref-name>jdbc/JPetStoreDB</res-ref-name>
    +	<res-type>javax.sql.DataSource</res-type>
    +	<res-auth>Container</res-auth>
    +	<res-sharing-scope>Shareable</res-sharing-scope>
    +   </resource-ref>
    +   
    +
  • + +
+

+ 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. +

+
+ + + + +

Related Links

+
+

Required Downloads to perform this deployment:

+ +

Download links for software used in creating this deployment:

+ +

Main websites references:

+ +

Related products and artilces:

+ +
+ +
+
 
+
+ + + Propchange: db/derby/site/trunk/build/site/integrate/JPetStoreGeronimo.html ------------------------------------------------------------------------------ svn:eol-style = native Copied: db/derby/site/trunk/build/site/integrate/JPetStoreWebSphere.html (from r265579, db/derby/site/trunk/build/site/integrate/JPetStoreDerby.html) URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/JPetStoreWebSphere.html?p2=db/derby/site/trunk/build/site/integrate/JPetStoreWebSphere.html&p1=db/derby/site/trunk/build/site/integrate/JPetStoreDerby.html&r1=265579&r2=265594&rev=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/JPetStoreDerby.html (original) +++ db/derby/site/trunk/build/site/integrate/JPetStoreWebSphere.html Wed Aug 31 14:55:48 2005 @@ -5,7 +5,7 @@ -Running iBATIS JPetStore 4 using an embedded Apache Derby database +Using Apache Derby with iBATIS JPetStore 4 on the WebSphere Server @@ -86,12 +86,15 @@ - + + -

Running iBATIS JPetStore 4 using an embedded Apache Derby database

+

Using Apache Derby with iBATIS JPetStore 4 on the WebSphere Server

  • @@ -200,7 +203,7 @@
- +

Introduction

@@ -217,108 +220,115 @@ 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.

- - + +

Required Software

    - +
  • Downloaded the JPetStore Demo - the download URL is also provided in the Links section below.
  • - -
  • Downloaded the Derby-JPetStore.zip 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. + +
  • Downloaded the JPetStoreAPP4WebSphere.zip 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.
  • - +
  • WebShere Application Server version 6.0.1. You can obtain an evaluation copy of WebSphere and the 6.0.1 upgrade from IBM. The downloads URLs are also provided in the Links section below.
  • - +
- - - + +

Setup Overview

Details on the following steps can be found in the CookBook Details section below. The following abbreviations will be used in the sections below:

-
    +
      +
    • WAS: WebSphere Application Server.
    • - +
    • {machine-name}: the hostname of the machine on which the server and application are installed.
    • - -
    • {SrvRoot}: the main directory of the WebSphere application server.
    • - + +
    • {SrvRoot}: the main directory of the WebSphere application server.
    • +
    • {Derby_Home}: the directory into which the Derby jar file(s) are placed. In a Server environment a good choice would be {SvrRoot}/Derby.
    • - +
    • {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 )
    • - +

    + Steps: +

      - -
    • Setup {Derby_Home}: Unzip Derby-JPetStorezip and move the Derby directory in from the Derby-JPetStore zip file into {Derby_Home}.
    • - + +
    • Setup {Derby_Home}: Unzip JPetStoreAPP4WebSphere.zip and move the Derby directory from the zip file into {Derby_Home}.
    • +
    • 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.
    • - +
    • 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:
        - +
      • Step 1: Check "Deploy Web Services".
      • - +
      • Step 3: Map the application to the datasource created above ( jdbc/JPetStoreDB)
      • - +
      - +
        - -
      • Update the JPetStore sql-map-config.xml file with the one provided in the Derby-JPetStore.zip file
      • - + +
      • Update the JPetStore sql-map-config.xml file with the one provided in the JPetStoreAPP4WebSphere.zip file
      • +
      • Restart WebSphere
      • - +
      • Stat the JPetStore application by entering the following URL into your favorite browser:
            http://{machine-name}:9080/jpetstore
         		   
        +
      • - +
      - +
    • - +
- - - + +

CookBook Details

+ Setup Derby +

    - -
  • 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. + +
  • 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.
  • - +
  • 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.
  • +

- + Create the WebSphere datasource +

    - +
  • Start WAS and start the administrative console
  • - +
  • Define a WAS environment variable for {Derby_Home} with the following steps:
      - +
    • Navigate the following links to the Node level variable definition screen: Environment > WebSphere Variables (check or set the NODE radio button active - click [APPLY] ) > NEW +
    • - +
    • Enter the following information:
          Name: DERBY_HOME
      @@ -326,17 +336,20 @@
          Description:  JPetStore Derby Files
          Click: [SAVE]
       		
      - -
    • + + +
    - +
  • +
    +
  • Navigate the following links to the Server level JDBC Resource / datasource definition screens: Resources > JDBC providers (check or set the SERVER radio button active - click [APPLY]) > NEW - +
      - +
    • On the General Properties screen select from the drop down lists:
           database type: Cloudscape
      @@ -344,12 +357,13 @@
           Implementation:  XA data source  
           Click [NEXT]
       	   
      -
    • - + + +
    - +
      - +
    • On the JDBC Provider screen enter:
          Name:Derby JDBC Provider (XA)
      @@ -358,8 +372,9 @@
          Implementation class name :  org.apache.derby.jdbc.EmbeddedXADataSource
          Click [APPLY]
       		   
      +
    • - +
    • Under 'Additional Properties' click 'Data Sources'. On the Data Sources screen click 'New' and enter:
          Name: JPetStoreDB
      @@ -369,29 +384,34 @@
          Select the "Generic Datastore Helper"
          Click [APPLY]
       	   
      +
    • - +
    • Under 'Additional Properties' click 'Custom Properties' and enter:
          NAME: databaseName
          Value:  ${DERBY_HOME}/JPetStoreDB
          Click [SAVE]
       	   
      +
    • - -
    • 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
    • - + +
    • 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
    • +
    +
  • +

- + Install the JPetStore Application +

    - +
  • 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
  • - +
  • 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:
     
           On the 'Preparing for the application installation - Specify..' screen:
    @@ -421,65 +441,76 @@
           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]
    -   
    -
  • + + + +

+ Replace the sql-map-config.xml file in the application +

    - -
  • In the WebSphere Application Console click on 'Enterprise Applications' in the left navigation pane under Applications
  • - + +
  • In the WebSphere Application Console click on 'Enterprise Applications' in the left navigation pane under Applications
  • +
  • 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.
  • - +
  • Click the 'Update' button
  • - +
  • On the 'Preparing for the application installation' screen:
         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]
     		
    - +
  • - +
    - +
  • + Restart the server and test the application +
  • +

+ Optional instructions +

-

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.

+

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.

    - +
  • Copy the following files to the directory where you want to build the database: derby.jar, derbytools.jar,jpetstore-derby-schema.sql, jpetstore-derby-dataload.sql and issue the following command to create the database, tables and indexes:
        java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB;create=true 
     	   org.apache.derby.tools.ij jpetstore-derby-schema.sql
    -	
    + +
  • - +
  • Now load the data into the tables using the following command:
     	java -cp ./derby.jar;./derbytools.jar -Dij.database=jdbc:derby:JPetStoreDB
     	   org.apache.derby.tools.ij jpetstore-derby-dataload.sql
     	
    +
  • - +
-

If you do not wish to use the sql-map-config.xml supplied in the Derby-JPetStore.zip file but prefer to modify the one supplied with the iBATIS JPetStore application do the following. Edit the sql-map-config.xml file and replace the existing TransactionManager definition section with this definition:

+

If you do not wish to use the sql-map-config.xml supplied in the JPetStoreAPP4WebSphere.zip file but prefer to modify the one supplied with the iBATIS JPetStore application do the following. Edit the sql-map-config.xml file and replace the existing TransactionManager definition section with this definition:

    <transactionManager type="JDBC" >
       <dataSource type="JNDI">
@@ -487,10 +518,9 @@
       </dataSource>
    </transactionManager>
    
-
- - - + + +

Integration Notes

@@ -501,48 +531,58 @@

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.

- - - + +

Related Links

+

Related Aticles

+
- - +
 
@@ -557,7 +597,7 @@ 2004-2005 Apache Software Foundation
Send feedback about the website to: - derby-dev@db.apache.org + derby-dev@db.apache.org
Modified: db/derby/site/trunk/build/site/integrate/Readme.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/Readme.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/Readme.html (original) +++ db/derby/site/trunk/build/site/integrate/Readme.html Wed Aug 31 14:55:48 2005 @@ -225,10 +225,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/derby_plugin.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/derby_plugin.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/derby_plugin.html (original) +++ db/derby/site/trunk/build/site/integrate/derby_plugin.html Wed Aug 31 14:55:48 2005 @@ -87,10 +87,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/func_spec_plugins.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/func_spec_plugins.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/func_spec_plugins.html (original) +++ db/derby/site/trunk/build/site/integrate/func_spec_plugins.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/index.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/index.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/index.html (original) +++ db/derby/site/trunk/build/site/integrate/index.html Wed Aug 31 14:55:48 2005 @@ -87,10 +87,13 @@ EMMA + @@ -241,18 +244,27 @@ -iBATIS JPetStore - Running iBATIS JPetStore 4 using an - embedded Apache Derby database +JOnAS + Apache + Derby and Red Hat Application Server: JOnAS + Integration -JOnAS - Apache - Derby and Red Hat Application Server: JOnAS - Integration +JPetStore Geronimo + Using Apache Derby with + iBATIS JPetStore 4 running on the Geronimo J2EE Server + + + + + + +JPetStore WebSphere + Using Apache Derby with + iBATIS JPetStore 4 on the WebSphere Server @@ -325,7 +337,7 @@

-Last Updated: August 23, 2005 +Last Updated: August 31, 2005

Modified: db/derby/site/trunk/build/site/integrate/misc.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/misc.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/misc.html (original) +++ db/derby/site/trunk/build/site/integrate/misc.html Wed Aug 31 14:55:48 2005 @@ -87,10 +87,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/derby_app.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/derby_app.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/derby_app.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/derby_app.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/ij.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/ij.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/ij.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/ij.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/ij2.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/ij2.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/ij2.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/ij2.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/ij_toc.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/ij_toc.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/ij_toc.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/ij_toc.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/java_project.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/java_project.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/java_project.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/java_project.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/nature.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/nature.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/nature.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/nature.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/nature_toc.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/nature_toc.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/nature_toc.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/nature_toc.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/properties.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/properties.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/properties.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/properties.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/remove_nature.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/remove_nature.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/remove_nature.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/remove_nature.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/resources.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/resources.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/resources.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/resources.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/server_toc.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/server_toc.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/server_toc.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/server_toc.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/start_server.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/start_server.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/start_server.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/start_server.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/start_toc.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/start_toc.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/start_toc.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/start_toc.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/stop_server.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/stop_server.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/stop_server.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/stop_server.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_help/sysinfo.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_help/sysinfo.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_help/sysinfo.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_help/sysinfo.html Wed Aug 31 14:55:48 2005 @@ -88,10 +88,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_howto.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_howto.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_howto.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_howto.html Wed Aug 31 14:55:48 2005 @@ -87,10 +87,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/integrate/plugin_slides.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/integrate/plugin_slides.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/integrate/plugin_slides.html (original) +++ db/derby/site/trunk/build/site/integrate/plugin_slides.html Wed Aug 31 14:55:48 2005 @@ -87,10 +87,13 @@ EMMA + Modified: db/derby/site/trunk/build/site/linkmap.html URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/build/site/linkmap.html?rev=265594&r1=265593&r2=265594&view=diff ============================================================================== --- db/derby/site/trunk/build/site/linkmap.html (original) +++ db/derby/site/trunk/build/site/linkmap.html Wed Aug 31 14:55:48 2005 @@ -225,10 +225,13 @@ EMMA + @@ -880,13 +883,19 @@ + + Added: db/derby/site/trunk/src/documentation/content/xdocs/binaries/JPetStoreAPP4Geronimo.zip URL: http://svn.apache.org/viewcvs/db/derby/site/trunk/src/documentation/content/xdocs/binaries/JPetStoreAPP4Geronimo.zip?rev=265594&view=auto ============================================================================== Binary file - no diff available. Propchange: db/derby/site/trunk/src/documentation/content/xdocs/binaries/JPetStoreAPP4Geronimo.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream