You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xi...@apache.org on 2010/11/24 10:42:21 UTC

svn commit: r1038541 [1/3] - in /geronimo/daytrader/branches/2.1: ./ modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/ modules/web/src/main/webapp/dbscripts/informix/ modules/web/src/main/webapp/dbscripts/mysql/ modules/web/src/main/...

Author: xiaming
Date: Wed Nov 24 09:42:20 2010
New Revision: 1038541

URL: http://svn.apache.org/viewvc?rev=1038541&view=rev
Log:
Add new deployment plan for different database vendor and update readme

Added:
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/Table.ddl
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/
    geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl
    geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-informix-xa-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-mysql-xa-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-oracle-xa-plan.xml
    geronimo/daytrader/branches/2.1/plans/daytrader-postgre-xa-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-sqlserver-plan.xml   (with props)
    geronimo/daytrader/branches/2.1/plans/daytrader-sqlserver-xa-plan.xml   (with props)
Removed:
    geronimo/daytrader/branches/2.1/plans/dayTrader-db2-9.1-XA-plan.xml
    geronimo/daytrader/branches/2.1/plans/dayTrader-derby-plan.xml
    geronimo/daytrader/branches/2.1/plans/dayTrader-oracle-XA-plan.xml
    geronimo/daytrader/branches/2.1/plans/dayTrader-sqlserver-plan.xml
Modified:
    geronimo/daytrader/branches/2.1/README
    geronimo/daytrader/branches/2.1/README.jboss
    geronimo/daytrader/branches/2.1/README.jboss5
    geronimo/daytrader/branches/2.1/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java

Modified: geronimo/daytrader/branches/2.1/README
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/README?rev=1038541&r1=1038540&r2=1038541&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.1/README (original)
+++ geronimo/daytrader/branches/2.1/README Wed Nov 24 09:42:20 2010
@@ -1,3 +1,18 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 (C) Copyright 2006-2010 The Apache Software Foundation.
 ----------------------------------------------------------------------
 
@@ -8,8 +23,9 @@ under the ASF license to further functio
 -----------
 |  BUILD  |
 -----------
-To build DayTrader, you need to have Java SE 5 and Maven 2.0.9 or later
-installed, which can be found at http://maven.apache.org.
+To build DayTrader, you need to have Java SE 5 and Maven 2.2.1 installed, 
+which can be found at http://maven.apache.org.
+
 Once installed you can build DayTrader by executing the following command
 from the dayTrader root directory (the directory containing this README):
 
@@ -25,22 +41,23 @@ and daytrader-tomcat plugins.
 You can install Daytrader either as a set of Geronimo Plugins or as an EAR.
 Both methods support using either the comand-line deployer or the Admin Console.
 
+In following steps, you need to replace <version> with the real version number of daytrader release.
 
 Plug-ins
 --------
 After building daytrader, you can go to admin console to install the
 daytrader-jetty or daytrader-tomcat plugin, which will automatically install and
 use the daytrader-derby-datasource. Alternatively, you can install them
-via the "deploy/list-plugins" command, for example:
+via the "deploy/install-plugin" command, for example:
 
-    gsh deploy/list-plugins -u system -w manager -r file:/<your-local-maven-repo> org.apache.geronimo.daytrader/daytrader-tomcat/2.1.3/car
+    deploy.sh|bat install-plugin -u system -w manager $DAYTRADER_HOME/daytrader-tomcat/target/daytrader-tomcat-<version>.car
 
 For app clients, you'll have to install them using deploy install-plugin
 commands for now, before we publish the app client plugins on a public repo,
 for example: 
 
-    gsh deploy/install-plugin -u system -w manager $DAYTRADER_HOME/daytrader-tomcat/target/daytrader-ws-client-2.1.3.car
-    gsh deploy/install-plugin -u system -w manager $DAYTRADER_HOME/daytrader-tomcat/target/daytrader-streamer-client-2.1.3.car 
+    deploy.sh|bat install-plugin -u system -w manager $DAYTRADER_HOME/daytrader-tomcat/target/daytrader-ws-client-<version>.car
+    deploy.sh|bat install-plugin -u system -w manager $DAYTRADER_HOME/daytrader-tomcat/target/daytrader-streamer-client-<version>.car 
 
 You will need to create the database and populate the initial data into the
 database.  Make sure Geronimo is started and the GERONIMO_HOME environment
@@ -64,27 +81,14 @@ plugin.
 
 Deployer
 --------
-1. Create the sample's database tables according to your database provider:
-   - If you use the embedded Apache Derby database provider, please perform the
-     following steps:
-      a. Ensure you have JAVA_HOME and GERONIMO_HOME environment variables set
-      b. Execute these commands from a command prompt:
-           cd $DAYTRADER_HOME/bin/dbscripts/derby
-           createDerbyDB.[bat|sh]
+1. Create the sample's database according to your database provider:
   - If you use another back-end database provider, please perform the following
     steps:
-    To create the database tables:
+    To create the database:
       a. Set up a database or reuse an existing database. For this sample, a
          database named "tradedb" is used.
       b. Create a user with a user name of "trade" and a password of "trade".
-         Grant appropriate permissions to this user.
-      c. Load the database schema for this user by running the following at a
-         DBM command window:
-         - For IBM DB2 Express-C and Universal Database (UDB):
-              db2 connect to tradedb
-              db2 -tvf bin\dbscripts\db2\Table.ddl
-         - For Oracle:
-              sqlplus trade/trade@tradedb @bin\dbscripts\oracle\Table.ddl
+         Grant appropriate permissions to this user.      
     To prep the datasource:
       a. Download your DBM's JDBC driver from an authorized source.
       b. Copy this driver to the Geronimo repository, and rename it to a
@@ -100,7 +104,7 @@ Deployer
 2. Use the deployer tool to install the application:
    - Execute these commands from a command prompt:
          cd $GERONIMO_HOME/bin
-         deploy.[bat|sh] deploy $DAYTRADER_HOME/modules/ear/target/daytrader-ear-2.1.3.ear $DAYTRADER_HOME/plans/<My plan>
+         deploy.[bat|sh] deploy $DAYTRADER_HOME/modules/ear/target/daytrader-ear-<version>.ear $DAYTRADER_HOME/plans/<My plan>
            where <My plan> is
                For Apache Derby:  dayTrader-derby-plan.xml
                For IBM DB2 v9.1:  dayTrader-db2-9.1-XA-plan.xml
@@ -108,7 +112,7 @@ Deployer
                For MS SQL Server: dayTrader-sqlserver-plan.xml
 
 3. Use the admin console to install the application:
-   - Under Applications -> Deploy new
+   - Under Applications -> Deploy New/Deployer
      a. Select the EAR file indicated above as your archive.
      b. Select the XML file indicated above as your plan.
      c. Ensure the checkbox is selected to "start app after install".
@@ -138,9 +142,9 @@ Deployer
 There are two optional application clients you can run, the streamer client and
 web services client.  To run these (from $GERONIMO_HOME/bin):
    TradeStreamerAppClient:
-      client.[bat|sh] org.apache.geronimo.daytrader/daytrader-streamer-client/2.1.3/car -waitForMain
+      client.[bat|sh] org.apache.geronimo.daytrader/daytrader-streamer-client/<version>/car -waitForMain
    WSAppClient:
-      client.[bat|sh] org.apache.geronimo.daytrader/daytrader-ws-client/2.1.3/car -waitForMain
+      client.[bat|sh] org.apache.geronimo.daytrader/daytrader-ws-client/<version>/car -waitForMain
 
 
 ---------------
@@ -149,15 +153,15 @@ web services client.  To run these (from
 To uninstall DayTrader, issue the following commands:
 1. If you installed DayTrader as a plugin:
   - If you installed the DayTrader :: Tomcat plugin:
-      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-tomcat/2.1.3/car
+      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-tomcat/<version>/car
   - If you installed the DayTrader :: Jetty plugin:
-      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-tomcat/2.1.3/car
+      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-tomcat/<version>/car
   - To remove the DayTrader :: JMS plugin (Tomcat or Jetty):
-      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-jms/2.1.3/car
+      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-jms/<version>/car
   - To remove the DayTrader :: Derby DataSource (Tomcat or Jetty):
-      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-derby-datasource/2.1.3/car
+      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader-derby-datasource/<version>/car
 
 2. If you installed DayTrader as an application (EAR) using the deployer:
-      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader/2.1.3/car
+      deploy.[bat|sh] undeploy org.apache.geronimo.daytrader/daytrader/<version>/car
 
 

Modified: geronimo/daytrader/branches/2.1/README.jboss
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/README.jboss?rev=1038541&r1=1038540&r2=1038541&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.1/README.jboss (original)
+++ geronimo/daytrader/branches/2.1/README.jboss Wed Nov 24 09:42:20 2010
@@ -1,6 +1,22 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 (C) Copyright 2006-2010 The Apache Software Foundation.
 ----------------------------------------------------------------------
 
+
 These are instructions for building and useing daytrader with JBoss:
 
 First create a $JBOSS_SERVER_HOME/deploy/jms/daytrader-destinations-service.xml

Modified: geronimo/daytrader/branches/2.1/README.jboss5
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/README.jboss5?rev=1038541&r1=1038540&r2=1038541&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.1/README.jboss5 (original)
+++ geronimo/daytrader/branches/2.1/README.jboss5 Wed Nov 24 09:42:20 2010
@@ -1,3 +1,18 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
 (C) Copyright 2009-2010 The Apache Software Foundation.
 ----------------------------------------------------------------------
 

Modified: geronimo/daytrader/branches/2.1/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java?rev=1038541&r1=1038540&r2=1038541&view=diff
==============================================================================
--- geronimo/daytrader/branches/2.1/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java (original)
+++ geronimo/daytrader/branches/2.1/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java Wed Nov 24 09:42:20 2010
@@ -89,23 +89,33 @@ public class TradeBuildDB {
 			try
 			{
 				out.println("<BR>TradeBuildDB: **** Database Product detected: "+dbProductName+" ****</BR>");
-				if (dbProductName.startsWith("DB2/")) // if db is DB2
-				{
-					ddlFile = new File(warPath+File.separatorChar+"dbscripts"+File.separatorChar+"db2"+File.separatorChar+"Table.ddl");
-				}
-				else if (dbProductName.startsWith("Apache Derby")) //if db is Derby
-				{
-					ddlFile = new File(warPath+File.separatorChar+"dbscripts"+File.separatorChar+"derby"+File.separatorChar+"Table.ddl");
-				}
-				else if (dbProductName.startsWith("Oracle")) // if the Db is Oracle
-				{
-					ddlFile = new File(warPath+File.separatorChar+"dbscripts"+File.separatorChar+"oracle"+File.separatorChar+"Table.ddl");
-				}
-				else // Unsupported "Other" Database
-				{
-					ddlFile = new File(warPath+File.separatorChar+"dbscripts"+File.separatorChar+"other"+File.separatorChar+"Table.ddl");
-					out.println("<BR>TradeBuildDB: **** This Database is unsupported/untested use at your own risk ****</BR>");
-				}
+				if (dbProductName.startsWith("DB2/")) { // if db is DB2
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts"
+                        + File.separatorChar + "db2" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("Apache Derby")) { // if db is Derby
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts"
+                        + File.separatorChar + "derby" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("Oracle")) { // if the Db is Oracle
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts"
+                        + File.separatorChar + "oracle" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("MySQL")) {// if the Db is MySQL
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts"
+                    	+ File.separatorChar + "mysql" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("Informix Dynamic Server")) { // if the Db is Informix dynamic server
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts" 
+                    	+ File.separatorChar + "informix" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("Microsoft SQL Server")) { // if the Db is Microsoft SQLServer
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts" 
+                    	+ File.separatorChar + "sqlserver" + File.separatorChar + "Table.ddl");
+                } else if (dbProductName.startsWith("PostgreSQL")) { // if the Db is PostgreSQL
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts" 
+                        	+ File.separatorChar + "postgre" + File.separatorChar + "Table.ddl");
+                } else { // Unsupported "Other" Database
+                    ddlFile = new File(warPath + File.separatorChar + "dbscripts"
+                        + File.separatorChar + "other" + File.separatorChar + "Table.ddl");
+                    out.println("<BR>TradeBuildDB: **** This Database is "
+                        + "unsupported/untested use at your own risk ****</BR>");
+                }
 				
 				if (!ddlFile.exists())
 				{

Added: geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/Table.ddl?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/Table.ddl (added)
+++ geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/informix/Table.ddl Wed Nov 24 09:42:20 2010
@@ -0,0 +1,88 @@
+##    Licensed to the Apache Software Foundation (ASF) under one or more
+##    contributor license agreements.  See the NOTICE file distributed with
+##    this work for additional information regarding copyright ownership.
+##    The ASF licenses this file to You under the Apache License, Version 2.0
+##    (the "License"); you may not use this file except in compliance with
+##    the License.  You may obtain a copy of the License at
+##
+##       http://www.apache.org/licenses/LICENSE-2.0
+##
+##    Unless required by applicable law or agreed to in writing, software
+##    distributed under the License is distributed on an "AS IS" BASIS,
+##    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##    See the License for the specific language governing permissions and
+##    limitations under the License.
+
+# Each SQL statement in this file should terminate with a semicolon (;)
+# Lines starting with the pound character (#) are considered as comments
+DROP TABLE HOLDINGEJB;
+DROP TABLE ACCOUNTPROFILEEJB;
+DROP TABLE QUOTEEJB;
+DROP TABLE KEYGENEJB;
+DROP TABLE ACCOUNTEJB;
+DROP TABLE ORDEREJB;
+
+CREATE TABLE HOLDINGEJB
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INTEGER NOT NULL PRIMARY KEY CONSTRAINT HOLDINGID,
+   QUANTITY FLOAT NOT NULL,
+   PURCHASEDATE DATETIME YEAR TO SECOND,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255));
+
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR(255),
+   PASSWD VARCHAR(255),
+   USERID VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT USERID,
+   EMAIL VARCHAR(255),
+   CREDITCARD VARCHAR(255),
+   FULLNAME VARCHAR(255));
+
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME FLOAT NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(255),
+   SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT SYMBOL,
+   CHANGE1 FLOAT NOT NULL);
+
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT KEYNAME);
+
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE DATETIME YEAR TO SECOND,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ACCOUNTID,
+   LASTLOGIN DATETIME YEAR TO SECOND,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR(255));
+
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE DATETIME YEAR TO SECOND,
+   ORDERTYPE VARCHAR(255),
+   ORDERSTATUS VARCHAR(255),
+   PRICE DECIMAL(14, 2),
+   QUANTITY FLOAT NOT NULL,
+   OPENDATE DATETIME YEAR TO SECOND,
+   ORDERID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ORDERID,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255),
+   HOLDING_HOLDINGID INTEGER);
+
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);

Added: geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl (added)
+++ geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl Wed Nov 24 09:42:20 2010
@@ -0,0 +1,107 @@
+##    Licensed to the Apache Software Foundation (ASF) under one or more
+##    contributor license agreements.  See the NOTICE file distributed with
+##    this work for additional information regarding copyright ownership.
+##    The ASF licenses this file to You under the Apache License, Version 2.0
+##    (the "License"); you may not use this file except in compliance with
+##    the License.  You may obtain a copy of the License at
+##
+##       http://www.apache.org/licenses/LICENSE-2.0
+##
+##    Unless required by applicable law or agreed to in writing, software
+##    distributed under the License is distributed on an "AS IS" BASIS,
+##    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##    See the License for the specific language governing permissions and
+##    limitations under the License.
+
+# Each SQL statement in this file should terminate with a semicolon (;)
+# Lines starting with the pound character (#) are considered as comments
+DROP TABLE holdingejb;
+DROP TABLE accountprofileejb;
+DROP TABLE quoteejb;
+DROP TABLE keygenejb;
+DROP TABLE accountejb;
+DROP TABLE orderejb;
+
+CREATE TABLE holdingejb
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INTEGER NOT NULL,
+   QUANTITY DOUBLE NOT NULL,
+   PURCHASEDATE DATETIME,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255));
+
+ALTER TABLE holdingejb 
+    ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
+
+CREATE TABLE accountprofileejb
+  (ADDRESS VARCHAR(255),
+   PASSWD VARCHAR(255),
+   USERID VARCHAR(255) NOT NULL,
+   EMAIL VARCHAR(255),
+   CREDITCARD VARCHAR(255),
+   FULLNAME VARCHAR(255));
+
+ALTER TABLE accountprofileejb 
+    ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
+
+CREATE TABLE quoteejb
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME DOUBLE NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(255),
+   SYMBOL VARCHAR(255) NOT NULL,
+   CHANGE1 DOUBLE NOT NULL);
+
+ALTER TABLE quoteejb 
+    ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
+
+CREATE TABLE keygenejb
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR(255) NOT NULL);
+
+ALTER TABLE keygenejb 
+    ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
+
+CREATE TABLE accountejb
+  (CREATIONDATE DATETIME,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INTEGER NOT NULL,
+   LASTLOGIN DATETIME,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR(255));
+
+ALTER TABLE accountejb 
+    ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
+
+CREATE TABLE orderejb
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE DATETIME,
+   ORDERTYPE VARCHAR(255),
+   ORDERSTATUS VARCHAR(255),
+   PRICE DECIMAL(14, 2),
+   QUANTITY DOUBLE NOT NULL,
+   OPENDATE DATETIME,
+   ORDERID INTEGER NOT NULL,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255),
+   HOLDING_HOLDINGID INTEGER);
+
+ALTER TABLE orderejb 
+    ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+## ALTER TABLE HOLDINGEJB VOLATILE;
+## ALTER TABLE ACCOUNTPROFILEEJB VOLATILE;
+## ALTER TABLE QUOTEEJB VOLATILE;
+## ALTER TABLE KEYGENEJB VOLATILE;
+## ALTER TABLE ACCOUNTEJB VOLATILE;
+## ALTER TABLE ORDEREJB VOLATILE;
+
+CREATE INDEX ACCOUNT_USERID ON accountejb(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON holdingejb(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON orderejb(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON orderejb(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON orderejb(ACCOUNT_ACCOUNTID,ORDERSTATUS);

Added: geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl (added)
+++ geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl Wed Nov 24 09:42:20 2010
@@ -0,0 +1,84 @@
+-- If you first time initialize postgre db, the drop statements should be commented out as following.
+-- DROP TABLE holdingejb;
+-- DROP TABLE accountprofileejb;
+-- DROP TABLE quoteejb;
+-- DROP TABLE keygenejb;
+-- DROP TABLE accountejb;
+-- DROP TABLE orderejb;
+
+CREATE TABLE holdingejb
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INTEGER NOT NULL,
+   QUANTITY DOUBLE PRECISION NOT NULL,
+   PURCHASEDATE TIMESTAMP,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255));
+
+ALTER TABLE holdingejb 
+    ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
+
+CREATE TABLE accountprofileejb
+  (ADDRESS VARCHAR(255),
+   PASSWD VARCHAR(255),
+   USERID VARCHAR(255) NOT NULL,
+   EMAIL VARCHAR(255),
+   CREDITCARD VARCHAR(255),
+   FULLNAME VARCHAR(255));
+
+ALTER TABLE accountprofileejb 
+    ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
+
+CREATE TABLE quoteejb
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME DOUBLE PRECISION NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(255),
+   SYMBOL VARCHAR(255) NOT NULL,
+   CHANGE1 DOUBLE PRECISION NOT NULL);
+
+ALTER TABLE quoteejb 
+    ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
+
+CREATE TABLE keygenejb
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR(255) NOT NULL);
+
+ALTER TABLE keygenejb 
+    ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
+
+CREATE TABLE accountejb
+  (CREATIONDATE TIMESTAMP,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INTEGER NOT NULL,
+   LASTLOGIN TIMESTAMP,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR(255));
+
+ALTER TABLE accountejb 
+    ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
+
+CREATE TABLE orderejb
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE TIMESTAMP,
+   ORDERTYPE VARCHAR(255),
+   ORDERSTATUS VARCHAR(255),
+   PRICE DECIMAL(14, 2),
+   QUANTITY DOUBLE PRECISION NOT NULL,
+   OPENDATE TIMESTAMP,
+   ORDERID INTEGER NOT NULL,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(255),
+   HOLDING_HOLDINGID INTEGER);
+
+ALTER TABLE orderejb 
+    ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+CREATE INDEX ACCOUNT_USERID ON accountejb(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON holdingejb(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON orderejb(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON orderejb(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON orderejb(ACCOUNT_ACCOUNTID,ORDERSTATUS);

Added: geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl (added)
+++ geronimo/daytrader/branches/2.1/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl Wed Nov 24 09:42:20 2010
@@ -0,0 +1,87 @@
+##    Licensed to the Apache Software Foundation (ASF) under one or more
+##    contributor license agreements.  See the NOTICE file distributed with
+##    this work for additional information regarding copyright ownership.
+##    The ASF licenses this file to You under the Apache License, Version 2.0
+##    (the "License"); you may not use this file except in compliance with
+##    the License.  You may obtain a copy of the License at
+##
+##       http://www.apache.org/licenses/LICENSE-2.0
+##
+##    Unless required by applicable law or agreed to in writing, software
+##    distributed under the License is distributed on an "AS IS" BASIS,
+##    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+##    See the License for the specific language governing permissions and
+##    limitations under the License.
+
+# Each SQL statement in this file should terminate with a semicolon (;)
+# Lines starting with the pound character (#) are considered as comments
+DROP TABLE HOLDINGEJB;
+DROP TABLE ACCOUNTPROFILEEJB;
+DROP TABLE QUOTEEJB;
+DROP TABLE KEYGENEJB;
+DROP TABLE ACCOUNTEJB;
+DROP TABLE ORDEREJB;
+
+CREATE TABLE HOLDINGEJB
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INT NOT NULL PRIMARY KEY,
+   QUANTITY FLOAT NOT NULL,
+   PURCHASEDATE DATETIME,
+   ACCOUNT_ACCOUNTID INT,
+   QUOTE_SYMBOL VARCHAR(255));
+
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR(255),
+   PASSWD VARCHAR(255),
+   USERID VARCHAR(255) NOT NULL PRIMARY KEY,
+   EMAIL VARCHAR(255),
+   CREDITCARD VARCHAR(255),
+   FULLNAME VARCHAR(255));
+
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME FLOAT NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(255),
+   SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY,
+   CHANGE1 FLOAT NOT NULL);
+
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL INT NOT NULL,
+   KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY);
+
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE DATETIME,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INT NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INT NOT NULL PRIMARY KEY,
+   LASTLOGIN DATETIME,
+   LOGINCOUNT INT NOT NULL,
+   PROFILE_USERID VARCHAR(255));
+
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE DATETIME,
+   ORDERTYPE VARCHAR(255),
+   ORDERSTATUS VARCHAR(255),
+   PRICE DECIMAL(14, 2),
+   QUANTITY FLOAT NOT NULL,
+   OPENDATE DATETIME,
+   ORDERID INT NOT NULL PRIMARY KEY,
+   ACCOUNT_ACCOUNTID INT,
+   QUOTE_SYMBOL VARCHAR(255),
+   HOLDING_HOLDINGID INT);
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);

Added: geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml (added)
+++ geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml Wed Nov 24 09:42:20 2010
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 555467 $ $Date: 2007-07-11 22:39:14 -0400 (Wed, 11 Jul 2007) $ -->
+
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
+    <environment>
+        <moduleId>
+            <groupId>org.apache.geronimo.daytrader</groupId>
+            <artifactId>daytrader</artifactId>
+            <version>2.1.3</version>
+            <type>car</type>
+        </moduleId>
+        <!--
+         **
+         ** The following section describes what other modules this application has dependencies on.  Since we will be 
+         ** accessing our tables using the internal Derby database we need the system-database dependency.  Also, JPA is 
+         ** used as a persistence mechanism so we have a dependency on the openjpa module as well.  
+         **
+         ** The dependency on Yoko is required but should be supplied by default.  This is just silly.
+        -->
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>openjpa</artifactId>
+                <type>car</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>j2ee-corba-yoko</artifactId>
+                <type>car</type>
+            </dependency>
+            <dependency>
+                <groupId>com.ibm.db2</groupId>
+                <artifactId>db2jcc</artifactId>
+                <version>9.1</version>
+                <type>jar</type>
+            </dependency>
+            <dependency>
+                <groupId>com.ibm.db2</groupId>
+                <artifactId>db2jcc_license_cu</artifactId>
+                <version>9.1</version>
+                <type>jar</type>
+            </dependency>
+        </dependencies>
+    </environment>
+
+    <!--
+     **
+     **  DayTrader Web War Module Definition  
+     **
+    -->
+    <module>
+        <web>web.war</web>
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+            <service-ref>
+                <service-ref-name>service/Trade</service-ref-name>
+                <port>
+                    <port-name>TradeWSServices</port-name>
+                    <protocol>http</protocol>
+                    <host>localhost</host>
+                    <port>8080</port>
+                    <uri>/daytrader/services/TradeWSServices</uri>
+                </port>
+            </service-ref>
+        </web-app>
+    </module>
+
+
+    <!--
+     **
+     **  DayTrader EJB Jar Module Definition  
+     **
+    -->
+    <module>
+        <ejb>dt-ejb.jar</ejb>
+        <openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
+
+            <enterprise-beans>
+                <message-driven>
+                    <ejb-name>DTBroker3MDB</ejb-name>
+                    <resource-adapter>
+                        <resource-link>TradeJMSResources</resource-link>
+                    </resource-adapter>
+                </message-driven>
+
+                <message-driven>
+                    <ejb-name>DTStreamer3MDB</ejb-name>
+                    <resource-adapter>
+                        <resource-link>TradeJMSResources</resource-link>
+                    </resource-adapter>
+                </message-driven>
+            </enterprise-beans>
+
+            <!--
+            **
+             ** The following section can be used to override the settings in the
+             ** persistence.xml file. For instance, if you choose to deploy DayTrader
+             ** against a DB2 database, the DBDictionary can be specified here.
+                **
+                -->
+
+            <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+                <persistence-unit name="daytrader">
+                    <properties>
+                        <property name="openjpa.jdbc.DBDictionary" value="db2" />
+                        <!--<property name="openjpa.jdbc.DBDictionary" value="derby" />-->
+                    </properties>
+                </persistence-unit>
+            </persistence>
+        </openejb-jar>
+    </module>
+
+
+    <module>
+        <java>streamer.jar</java>
+        <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-streamer-client</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-streamer-client-server</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </server-environment>
+            <resource>
+                <external-rar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                    <dep:groupId>org.apache.geronimo.modules</dep:groupId>
+                    <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+                    <dep:type>rar</dep:type>
+                </external-rar>
+                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+                    <resourceadapter>
+                        <resourceadapter-instance>
+                            <resourceadapter-name>ActiveMQ RA</resourceadapter-name>
+                            <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
+                            <config-property-setting name="UserName">geronimo</config-property-setting>
+                            <config-property-setting name="Password">geronimo</config-property-setting>
+                            <workmanager>
+                                <gbean-link>DefaultWorkManager</gbean-link>
+                            </workmanager>
+                        </resourceadapter-instance>
+                        <outbound-resourceadapter>
+                            <connection-definition>
+                                <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                                <connectiondefinition-instance>
+                                    <name>jms/TopicConnectionFactory</name>
+                                    <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
+                                    <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
+                                    <connectionmanager>
+                                        <xa-transaction>
+                                            <transaction-caching/>
+                                        </xa-transaction>
+                                        <single-pool>
+                                            <max-size>10</max-size>
+                                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                            <match-one/>
+                                        </single-pool>
+                                    </connectionmanager>
+                                </connectiondefinition-instance>
+                            </connection-definition>
+                        </outbound-resourceadapter>
+                    </resourceadapter>
+
+
+                    <adminobject>
+                        <adminobject-interface>javax.jms.Topic</adminobject-interface>
+                        <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
+                        <adminobject-instance>
+                            <message-destination-name>jms/TradeStreamerTopic</message-destination-name>
+                            <config-property-setting name="PhysicalName">TradeStreamerTopic</config-property-setting>
+                        </adminobject-instance>
+                    </adminobject>
+
+                </connector>
+            </resource>
+        </application-client>
+    </module>
+
+    <module>
+        <java>wsappclient.jar</java>
+        <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-ws-client</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-ws-client-server</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </server-environment>
+        </application-client>
+    </module>
+
+    <ext-module>
+        <connector>TradeDataSource</connector>
+        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+            <dep:groupId>org.tranql</dep:groupId>
+            <dep:artifactId>tranql-connector-db2-xa</dep:artifactId>
+            <dep:type>rar</dep:type>
+        </external-path>
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+
+
+            <resourceadapter>
+                <outbound-resourceadapter>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jdbc/TradeDataSource</name>
+                            <config-property-setting name="UserName">trade</config-property-setting>
+                            <config-property-setting name="Password">trade</config-property-setting>
+                            <config-property-setting name="PortNumber">50001</config-property-setting>
+                            <config-property-setting name="ServerName">localhost</config-property-setting>
+                            <config-property-setting name="DatabaseName">tradedb</config-property-setting>
+                            <config-property-setting name="DriverType">4</config-property-setting>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>100</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>30</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                        <connectiondefinition-instance>
+                            <name>jdbc/NoTxTradeDataSource</name>
+                            <config-property-setting name="UserName">trade</config-property-setting>
+                            <config-property-setting name="Password">trade</config-property-setting>
+                            <config-property-setting name="PortNumber">50001</config-property-setting>
+                            <config-property-setting name="ServerName">localhost</config-property-setting>
+                            <config-property-setting name="DatabaseName">tradedb</config-property-setting>
+                            <config-property-setting name="DriverType">4</config-property-setting>
+                            <connectionmanager>
+                                <no-transaction/>
+                                <single-pool>
+                                    <max-size>10</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>30</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+        </connector>
+    </ext-module>
+
+
+    <ext-module>
+        <connector>TradeJMS</connector>
+        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+            <dep:groupId>org.apache.geronimo.modules</dep:groupId>
+            <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+            <dep:type>rar</dep:type>
+        </external-path>
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+
+            <resourceadapter>
+                <!-- how to connect to the JMS Server -->
+                <resourceadapter-instance>
+                    <resourceadapter-name>TradeJMSResources</resourceadapter-name>
+                    <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
+                    <config-property-setting name="UserName">not needed</config-property-setting>
+                    <config-property-setting name="Password">not needed</config-property-setting>
+                    <workmanager>
+                        <gbean-link>DefaultWorkManager</gbean-link>
+                    </workmanager>
+                </resourceadapter-instance>
+                <!-- defines a ConnectionFactory -->
+                <outbound-resourceadapter>
+	                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jms/QueueConnectionFactory</name>
+                            <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>50</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>0</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jms/TopicConnectionFactory</name>
+                            <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>50</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>0</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+
+            <adminobject>
+                <adminobject-interface>javax.jms.Topic</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>jms/TradeStreamerTopic</message-destination-name>
+                    <config-property-setting name="PhysicalName">TradeStreamerTopic</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+
+            <adminobject>
+                <adminobject-interface>javax.jms.Queue</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>jms/TradeBrokerQueue</message-destination-name>
+                    <config-property-setting name="PhysicalName">TradeBrokerQueue</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+
+        </connector>
+    </ext-module>
+</application>

Propchange: geronimo/daytrader/branches/2.1/plans/daytrader-db2-xa-plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml?rev=1038541&view=auto
==============================================================================
--- geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml (added)
+++ geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml Wed Nov 24 09:42:20 2010
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 1038159 $ $Date: 2010-11-23 23:17:14 +0800 (周二, 23 十一月 2010) $ -->
+
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
+    <environment>
+        <moduleId>
+            <groupId>org.apache.geronimo.daytrader</groupId>
+            <artifactId>daytrader</artifactId>
+            <version>2.1.7</version>
+            <type>car</type>
+        </moduleId>
+        <!--
+         **
+         ** The following section describes what other modules this application has dependencies on.  Since we will be 
+         ** accessing our tables using the internal Derby database we need the system-database dependency.  Also, JPA is 
+         ** used as a persistence mechanism so we have a dependency on the openjpa module as well.  
+         **
+         ** The dependency on Yoko is required but should be supplied by default.  This is just silly.
+        -->
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>system-database</artifactId>
+                <type>car</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>openjpa</artifactId>
+                <type>car</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.configs</groupId>
+                <artifactId>j2ee-corba-yoko</artifactId>
+                <type>car</type>
+            </dependency>
+        </dependencies>
+    </environment>
+
+    <!--
+     **
+     **  DayTrader Web War Module Definition  
+     **
+    -->
+    <module>
+        <web>web.war</web>
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+            <service-ref>
+                <service-ref-name>service/Trade</service-ref-name>
+                <port>
+                    <port-name>TradeWSServices</port-name>
+                    <protocol>http</protocol>
+                    <host>localhost</host>
+                    <port>8080</port>
+                    <uri>/daytrader/services/TradeWSServices</uri>
+                </port>
+            </service-ref>
+        </web-app>
+    </module>
+
+
+    <!--
+     **
+     **  DayTrader EJB Jar Module Definition  
+     **
+    -->
+    <module>
+        <ejb>dt-ejb.jar</ejb>
+        <openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
+
+            <enterprise-beans>
+                <message-driven>
+                    <ejb-name>DTBroker3MDB</ejb-name>
+                    <resource-adapter>
+                        <resource-link>TradeJMSResources</resource-link>
+                    </resource-adapter>
+                </message-driven>                
+                <message-driven>
+                    <ejb-name>DTStreamer3MDB</ejb-name>
+                    <resource-adapter>
+                        <resource-link>TradeJMSResources</resource-link>
+                    </resource-adapter>
+                </message-driven>
+            </enterprise-beans>
+            
+            <!-- 
+             **
+             ** The following section can be used to override the settings in the
+             ** persistence.xml file. For instance, if you choose to deploy DayTrader
+             ** against a DB2 database, the DBDictionary can be specified here.
+             **
+            -->
+            
+            <!--<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+                <persistence-unit name="daytrader">
+                    <properties>
+                        <property name="openjpa.jdbc.DBDictionary" value="db2" />
+                        <property name="openjpa.jdbc.DBDictionary" value="derby" />
+                    </properties>
+                </persistence-unit>
+            </persistence>-->
+        </openejb-jar>
+    </module>
+
+
+    <module>
+        <java>streamer.jar</java>
+        <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-streamer-client</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-streamer-client-server</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </server-environment>
+            <resource>
+                <external-rar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                    <dep:groupId>org.apache.geronimo.modules</dep:groupId>
+                    <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+                    <dep:type>rar</dep:type>
+                </external-rar>
+                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+                    <resourceadapter>
+                        <resourceadapter-instance>
+                            <resourceadapter-name>ActiveMQ RA</resourceadapter-name>
+                            <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
+                            <config-property-setting name="UserName">geronimo</config-property-setting>
+                            <config-property-setting name="Password">geronimo</config-property-setting>
+                            <workmanager>
+                                <gbean-link>DefaultWorkManager</gbean-link>
+                            </workmanager>
+                        </resourceadapter-instance>
+                        <outbound-resourceadapter>
+                            <connection-definition>
+                                <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                                <connectiondefinition-instance>
+                                    <name>jms/TopicConnectionFactory</name>
+                                    <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
+                                    <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
+                                    <connectionmanager>
+                                        <xa-transaction>
+                                            <transaction-caching/>
+                                        </xa-transaction>
+                                        <single-pool>
+                                            <max-size>10</max-size>
+                                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                            <match-one/>
+                                        </single-pool>
+                                    </connectionmanager>
+                                </connectiondefinition-instance>
+                            </connection-definition>
+                        </outbound-resourceadapter>
+                    </resourceadapter>
+
+                    <adminobject>
+                        <adminobject-interface>javax.jms.Topic</adminobject-interface>
+                        <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
+                        <adminobject-instance>
+                            <message-destination-name>jms/TradeStreamerTopic</message-destination-name>
+                            <config-property-setting name="PhysicalName">TradeStreamerTopic</config-property-setting>
+                        </adminobject-instance>
+                    </adminobject>
+                </connector>
+            </resource>
+        </application-client>
+    </module>
+
+    <module>
+        <java>wsappclient.jar</java>
+        <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-ws-client</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+                <moduleId>
+                    <groupId>org.apache.geronimo.daytrader</groupId>
+                    <artifactId>daytrader-ws-client-server</artifactId>
+                    <version>2.1.3</version>
+                    <type>car</type>
+                </moduleId>
+            </server-environment>
+        </application-client>
+    </module>
+
+    <ext-module>
+        <connector>TradeDataSource</connector>
+        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+            <dep:groupId>org.tranql</dep:groupId>
+            <dep:artifactId>tranql-connector-derby-embed-xa</dep:artifactId>
+            <dep:type>rar</dep:type>
+        </external-path>
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+            <resourceadapter>
+                <outbound-resourceadapter>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jdbc/TradeDataSource</name>
+                            <config-property-setting name="UserName">app</config-property-setting>
+                            <config-property-setting name="Password">app</config-property-setting>
+                            <config-property-setting name="DatabaseName">DaytraderDatabase</config-property-setting>
+                            <config-property-setting name="CreateDatabase">true</config-property-setting>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>100</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>30</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                        <connectiondefinition-instance>
+                            <name>jdbc/NoTxTradeDataSource</name>
+                            <config-property-setting name="UserName">app</config-property-setting>
+                            <config-property-setting name="Password">app</config-property-setting>
+                            <config-property-setting name="DatabaseName">DaytraderDatabase</config-property-setting>
+                            <config-property-setting name="CreateDatabase">true</config-property-setting>
+                            <connectionmanager>
+                                <no-transaction/>
+                                <single-pool>
+                                    <max-size>10</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>30</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+        </connector>
+    </ext-module>
+
+
+    <ext-module>
+        <connector>TradeJMS</connector>
+        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+            <dep:groupId>org.apache.geronimo.modules</dep:groupId>
+            <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+            <dep:type>rar</dep:type>
+        </external-path>
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+            <resourceadapter>
+                <!-- how to connect to the JMS Server -->
+                <resourceadapter-instance>
+                    <resourceadapter-name>TradeJMSResources</resourceadapter-name>
+                    <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
+                    <config-property-setting name="UserName">not needed</config-property-setting>
+                    <config-property-setting name="Password">not needed</config-property-setting>
+                    <workmanager>
+                        <gbean-link>DefaultWorkManager</gbean-link>
+                    </workmanager>
+                </resourceadapter-instance>
+                <!-- defines a ConnectionFactory -->
+                <outbound-resourceadapter>
+	                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jms/QueueConnectionFactory</name>
+                            <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>50</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>0</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>jms/TopicConnectionFactory</name>
+                            <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>50</max-size>
+                                    <min-size>0</min-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <idle-timeout-minutes>0</idle-timeout-minutes>
+                                    <match-one/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+           
+            <adminobject>
+                <adminobject-interface>javax.jms.Topic</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>jms/TradeStreamerTopic</message-destination-name>
+                    <config-property-setting name="PhysicalName">TradeStreamerTopic</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+            
+            <adminobject>
+                <adminobject-interface>javax.jms.Queue</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>jms/TradeBrokerQueue</message-destination-name>
+                    <config-property-setting name="PhysicalName">TradeBrokerQueue</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+        </connector>
+    </ext-module>
+</application>

Propchange: geronimo/daytrader/branches/2.1/plans/daytrader-derby-xa-plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native