You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by de...@apache.org on 2010/02/10 02:52:39 UTC

svn commit: r908308 [2/3] - in /geronimo/samples/branches/2.1: ./ samples/ samples/DataCDInfo/ samples/DataCDInfo/DataCDInfo-JTA-ear/ samples/DataCDInfo/DataCDInfo-JTA-ear/src/ samples/DataCDInfo/DataCDInfo-JTA-ear/src/main/ samples/DataCDInfo/DataCDIn...

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/pom.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/pom.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/pom.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,136 @@
+<?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$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo</artifactId>
+        <version>2.1.3-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.samples</groupId>
+    <artifactId>DataCDInfo-JTA-jetty</artifactId>
+    <name>Geronimo Samples :: DataCDInfo JTA + Struts1 Plugin for Jetty</name>
+    <packaging>car</packaging>
+
+    <description>Geronimo Samples DataCDInfo JTA+Struts1 Plugin for Jetty</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>DataCDInfo-JTA-ear</artifactId>
+            <version>${version}</version>
+            <type>ear</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty6-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>openejb-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>persistence-jpa10-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${pom.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        
+        <plugins>
+	<!--Because JIRA https://issues.apache.org/jira/browse/GERONIMO-5020, the plugin build is actually failed
+		So skip its deployment -->
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
+                        <deploymentConfig>${jetty6Deployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
+                        <deploymentConfig>${openejbDeployer}</deploymentConfig>
+                        <deploymentConfig>${jpaDeployer}</deploymentConfig>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.samples</groupId>
+                        <artifactId>DataCDInfo-JTA-ear</artifactId>
+                        <version>${version}</version>
+                        <type>ear</type>
+                    </module>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                    <category>Sample</category>
+                </configuration>
+            </plugin>
+	  <!--<plugin>            
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-deploy-plugin</artifactId>
+            <configuration>
+              <skip>true</skip>
+            </configuration>
+          </plugin>-->
+        </plugins>
+    </build>
+
+</project>
+

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.added.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.added.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.added.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.added.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
+    <module-id>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-jetty</artifactId>
+        <version>2.2</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-ear</artifactId>
+        <type>ear</type>
+    </dependency>
+</plugin-artifact>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.removed.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.removed.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.removed.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.removed.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
+    <module-id>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-jetty</artifactId>
+        <version>2.2</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-war</artifactId>
+        <type>war</type>
+    </dependency>
+</plugin-artifact>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/dependencies.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
+    <module-id>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-jetty</artifactId>
+        <version>2.2</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-ear</artifactId>
+        <type>ear</type>
+    </dependency>
+</plugin-artifact>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/treeListing.txt
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/treeListing.txt?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/treeListing.txt (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/history/treeListing.txt Wed Feb 10 01:52:33 2010
@@ -0,0 +1,7 @@
+local:active project artifact:
+	artifact = active project artifact:
+	artifact = active project artifact:
+	artifact = org.apache.geronimo.samples:DataCDInfo-JTA-ear:ear:2.2:compile;
+	project: MavenProject: org.apache.geronimo.samples:DataCDInfo-JTA-ear:2.2 @ /home/forrestxm/localbuild/rsaws/gsamplestrunk/samples/DataCDInfo/DataCDInfo-JTA-ear/pom.xml;
+	project: MavenProject: org.apache.geronimo.samples:DataCDInfo-JTA-ear:2.2 @ /home/forrestxm/localbuild/rsaws/gsamplestrunk/samples/DataCDInfo/DataCDInfo-JTA-ear/pom.xml;
+	project: MavenProject: org.apache.geronimo.samples:DataCDInfo-JTA-ear:2.2 @ /home/forrestxm/localbuild/rsaws/gsamplestrunk/samples/DataCDInfo/DataCDInfo-JTA-ear/pom.xml

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/plan/plan.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/plan/plan.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-jetty/src/main/plan/plan.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,131 @@
+<?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.
+-->
+<application application-name="DataCDInfo-JTA"
+	xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
+	<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">		
+		<dep:dependencies>
+			<dep:dependency>
+				<dep:groupId>org.apache.geronimo.configs</dep:groupId>
+                		<dep:artifactId>system-database</dep:artifactId>
+                		<dep:type>car</dep:type>
+			</dep:dependency>
+		</dep:dependencies>	
+	</dep:environment>
+
+	<module>
+		<ejb>DataCDInfo-JTA-ejb.jar</ejb>
+		<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
+			<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+				version="1.0">
+				<persistence-unit name="DataCDInfoUnit">
+					<properties>
+						<property name="openjpa.jdbc.DBDictionary" value="derby" />
+					</properties>
+				</persistence-unit>
+			</persistence>
+		</openejb-jar>
+	</module>
+	<module>
+	        <web>DataCDInfo-JTA-war.war</web>
+	        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+	            <security-realm-name>geronimo-admin</security-realm-name>
+	        </web-app>
+	</module>
+
+	<ext-module>
+		<connector>DataCDInfoDataSource</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/DataCDInfoDS</name>
+							<config-property-setting name="UserName"></config-property-setting>
+                            <config-property-setting name="Password"></config-property-setting>
+                            <config-property-setting name="DatabaseName">cdinfodb</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>
+						<!-- This non-transaction data source is for sequence generation use. Without it,
+						the geronimo will throw exception when persisting entities which require sequence
+						generation. -->
+						<connectiondefinition-instance>
+                            <name>jdbc/NoTxDataCDInfoDS</name>
+                            <config-property-setting name="UserName"></config-property-setting>
+                            <config-property-setting name="Password"></config-property-setting>
+                            <config-property-setting name="DatabaseName">cdinfodb</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>
+	
+	
+
+  <security xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0">
+    <sec:default-principal>
+      <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="anonymous"/>
+    </sec:default-principal>
+    <sec:role-mappings>
+      <sec:role role-name="admin">
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="admin"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="system"/>        
+      </sec:role>
+      <sec:role role-name="superadmin">
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="superadmin"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="superman"/>        
+      </sec:role>
+    </sec:role-mappings>
+  </security>
+	
+	<gbean name="DBInitialization" class="org.apache.geronimo.connector.DatabaseInitializationGBean">
+        	<attribute name="path">DataCDInfo_tables_derby.sql</attribute>
+        	<reference name="DataSource">
+            		<name>jdbc/NoTxDataCDInfoDS</name>
+        	</reference>
+    	</gbean>
+</application>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/pom.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/pom.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/pom.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,136 @@
+<?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$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo</artifactId>
+        <version>2.1.3-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.samples</groupId>
+    <artifactId>DataCDInfo-JTA-tomcat</artifactId>
+    <name>Geronimo Samples :: DataCDInfo JTA + Struts1 Plugin for Tomcat</name>
+    <packaging>car</packaging>
+
+    <description>Geronimo Samples DataCDInfo JTA+Struts1 Plugin for Tomcat</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>DataCDInfo-JTA-ear</artifactId>
+            <version>${version}</version>
+            <type>ear</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>tomcat6-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jasper</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>openejb-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>persistence-jpa10-deployer</artifactId>
+            <version>${geronimoVersion}</version>
+            <type>car</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${pom.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        
+        <plugins>
+	    <!--Because JIRA https://issues.apache.org/jira/browse/GERONIMO-5020, the plugin build is actually failed
+		So skip its deployment -->
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
+                        <deploymentConfig>${tomcatDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
+                        <deploymentConfig>${openejbDeployer}</deploymentConfig>
+                        <deploymentConfig>${jpaDeployer}</deploymentConfig>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.samples</groupId>
+                        <artifactId>DataCDInfo-JTA-ear</artifactId>
+                        <version>${version}</version>
+                        <type>ear</type>
+                    </module>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                    <category>Sample</category>
+                </configuration>
+            </plugin>
+	  <!--<plugin>            
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-deploy-plugin</artifactId>
+            <configuration>
+              <skip>true</skip>
+            </configuration>
+          </plugin>-->
+        </plugins>
+    </build>
+    
+</project>
+

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/history/dependencies.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/history/dependencies.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/history/dependencies.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3" xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2">
+    <module-id>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-tomcat</artifactId>
+        <version>2.2</version>
+        <type>car</type>
+    </module-id>
+    <dependency>
+        <groupId>org.apache.geronimo.samples</groupId>
+        <artifactId>DataCDInfo-JTA-ear</artifactId>
+        <type>ear</type>
+    </dependency>
+</plugin-artifact>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/plan/plan.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/plan/plan.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-tomcat/src/main/plan/plan.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,131 @@
+<?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.
+-->
+<application application-name="DataCDInfo-JTA"
+	xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0">
+	<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">		
+		<dep:dependencies>
+			<dep:dependency>
+				<dep:groupId>org.apache.geronimo.configs</dep:groupId>
+                		<dep:artifactId>system-database</dep:artifactId>
+                		<dep:type>car</dep:type>
+			</dep:dependency>
+		</dep:dependencies>
+	</dep:environment>
+
+	<module>
+		<ejb>DataCDInfo-JTA-ejb.jar</ejb>
+		<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
+			<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+				version="1.0">
+				<persistence-unit name="DataCDInfoUnit">
+					<properties>
+						<property name="openjpa.jdbc.DBDictionary" value="derby" />
+					</properties>
+				</persistence-unit>
+			</persistence>
+		</openejb-jar>
+	</module>
+	<module>
+	        <web>DataCDInfo-JTA-war.war</web>
+	        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+	            <security-realm-name>geronimo-admin</security-realm-name>
+	        </web-app>
+	</module>
+
+	<ext-module>
+		<connector>DataCDInfoDataSource</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/DataCDInfoDS</name>
+							<config-property-setting name="UserName"></config-property-setting>
+                            <config-property-setting name="Password"></config-property-setting>
+                            <config-property-setting name="DatabaseName">cdinfodb</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>
+						<!-- This non-transaction data source is for sequence generation use. Without it,
+						the geronimo will throw exception when persisting entities which require sequence
+						generation. -->
+						<connectiondefinition-instance>
+                            <name>jdbc/NoTxDataCDInfoDS</name>
+                            <config-property-setting name="UserName"></config-property-setting>
+                            <config-property-setting name="Password"></config-property-setting>
+                            <config-property-setting name="DatabaseName">cdinfodb</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>
+	
+	
+
+  <security xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0">
+    <sec:default-principal>
+      <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="anonymous"/>
+    </sec:default-principal>
+    <sec:role-mappings>
+      <sec:role role-name="admin">
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="admin"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="system"/>        
+      </sec:role>
+      <sec:role role-name="superadmin">
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="superadmin"/>
+        <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="superman"/>        
+      </sec:role>
+    </sec:role-mappings>
+  </security>
+	
+	<gbean name="DBInitialization" class="org.apache.geronimo.connector.DatabaseInitializationGBean">
+        <attribute name="path">DataCDInfo_tables_derby.sql</attribute>
+        <reference name="DataSource">
+            <name>jdbc/NoTxDataCDInfoDS</name>
+        </reference>
+    </gbean>
+</application>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/pom.xml?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/pom.xml (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/pom.xml Wed Feb 10 01:52:33 2010
@@ -0,0 +1,381 @@
+<?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.
+	-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.geronimo.samples</groupId>
+		<artifactId>DataCDInfo</artifactId>
+		<version>2.1.3-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>DataCDInfo-JTA-war</artifactId>
+	<name>Geronimo Samples :: DataCDInfo JTA + Struts1 :: WAR</name>
+	<packaging>war</packaging>
+
+	<description>Geronimo Samples - DataCD Information Management Tool</description>
+
+	<dependencies>
+		
+		<dependency> 
+			<groupId>org.apache.geronimo.samples</groupId>
+			<artifactId>DataCDInfo-JTA-ejb</artifactId> 
+			<version>${version}</version>
+			<scope>provided</scope> 
+		</dependency>
+		
+		<dependency>
+			<groupId>antlr</groupId>
+			<artifactId>antlr</artifactId>
+			<version>2.7.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.6</version> 
+		</dependency>
+		<dependency>
+			<groupId>commons-chain</groupId>
+			<artifactId>commons-chain</artifactId>
+			<version>1.1</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.8</version> 
+		</dependency>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.2.1</version>			
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>			
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.0.4</version>			
+		</dependency>
+		<dependency>
+			<groupId>commons-validator</groupId>
+			<artifactId>commons-validator</artifactId>
+			<version>1.3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>jstl</groupId>
+			<artifactId>jstl</artifactId>
+			<scope>provided</scope>	
+		</dependency>		
+		<dependency>
+			<groupId>oro</groupId>
+			<artifactId>oro</artifactId>
+			<version>2.0.8</version>
+		</dependency>		
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-core</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-el</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-extras</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-faces</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-mailreader-dao</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<!--		<dependency>-->
+		<!--			<groupId>org.apache.struts</groupId>-->
+		<!--			<artifactId>struts-scripting</artifactId>-->
+		<!--			<version>1.3.10</version>-->
+		<!--		</dependency>-->
+		<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-taglib</artifactId>
+			<version>1.3.8</version>
+			<exclusions>
+                    	    <exclusion>
+                        	<groupId>myfaces</groupId>
+				<artifactId>myfaces-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>portlet-api</groupId>
+				<artifactId>portlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>servlet-api</artifactId>
+                    	    </exclusion>
+                    	    <exclusion>
+                        	<groupId>taglibs</groupId>
+				<artifactId>standard</artifactId>
+                    	    </exclusion>
+			    <exclusion>
+                        	<groupId>javax.servlet</groupId>
+				<artifactId>jstl</artifactId>
+                    	    </exclusion>
+                	</exclusions>
+		</dependency>
+		<!--<dependency>
+			<groupId>org.apache.struts</groupId>
+			<artifactId>struts-tiles</artifactId>
+			<version>1.3.8</version>
+		</dependency>-->
+		<!--<dependency>
+			<groupId>org.apache.velocity</groupId>
+			<artifactId>velocity-tools</artifactId>
+			<version>1.3</version>
+		</dependency>-->
+		<dependency>
+	                <groupId>org.apache.myfaces.core</groupId>
+        	        <artifactId>myfaces-api</artifactId>
+			<scope>provided</scope>		
+		</dependency>
+		<dependency>
+            		<groupId>javax.portlet</groupId>
+            		<artifactId>portlet-api</artifactId>
+            		<scope>provided</scope>
+        	</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-servlet_2.5_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jsp_2.1_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-annotation_1.0_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-ejb_3.0_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jpa_1.0_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jta_1.1_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>process-resources</phase>
+						<id>copy-parent-site</id>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<tasks>
+								<echo>Copying site directory from parent</echo>
+								<copy todir="${project.build.directory}/${pom.artifactId}-2.1" failonerror="false" overwrite="true">
+									<fileset dir="${pom.basedir}/../docs" />
+								</copy>
+							</tasks>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<configuration>
+					<archiveClasses>false</archiveClasses>
+					<webResources>
+						<resource>
+							<directory>${pom.basedir}/src/main/resources</directory>
+							<!-- override the destination directory for this resource -->
+							<targetPath>WEB-INF/classes</targetPath>
+							<!-- enable filtering -->
+							<filtering>true</filtering>
+							<excludes> 
+							    <exclude>*.template</exclude>
+							</excludes>
+						</resource>
+						<resource>
+							<directory>${project.build.outputDirectory}</directory>
+							<includes>
+								<include>META-INF/LICENSE*</include>
+								<include>META-INF/NOTICE*</include>
+								<include>META-INF/DISCLAIMER*</include>
+							</includes>
+						</resource>
+						<resource>
+							<directory>${pom.basedir}/src/main/webapp/WEB-INF</directory>
+							<targetPath>WEB-INF</targetPath>
+							<filtering>true</filtering>
+							<includes>
+								<include>*.xml</include>								
+							</includes>
+						</resource>
+					</webResources>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/DataCDInfoAdminServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/DataCDInfoAdminServlet.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/DataCDInfoAdminServlet.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/DataCDInfoAdminServlet.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,116 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web;
+
+import java.io.IOException;
+
+import javax.ejb.EJB;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.datacdinfo.core.DataCDInfoAdminLocal;
+
+/**
+ * Servlet implementation class DataCDInfoAdminServlet
+ * 
+ * This servlet is used to demo security annotation usage on EJB.
+ */
+public class DataCDInfoAdminServlet extends HttpServlet {
+	private static final long serialVersionUID = 1L;
+
+	@EJB
+	private DataCDInfoAdminLocal admin = null;
+
+	/**
+	 * @see HttpServlet#HttpServlet()
+	 */
+	public DataCDInfoAdminServlet() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @see Servlet#init(ServletConfig)
+	 */
+	public void init(ServletConfig config) throws ServletException {
+		super.init(config);
+	}
+
+	/**
+	 * @see Servlet#destroy()
+	 */
+	public void destroy() {
+		// TODO Auto-generated method stub
+	}
+
+	/**
+	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse
+	 *      response)
+	 */
+	protected void service(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException {
+		String action = request.getParameter("action");
+
+		if (action.equals("listOwners")) {
+			String[] owners = admin.listOwners();
+			request.setAttribute("owners", owners);
+
+			this.getServletConfig().getServletContext().getRequestDispatcher("/admin/showOwners.jsp").include(request, response);
+		}
+
+		if (action.equals("listCDs")) {
+			String[] cds = admin.listAllDataCDs();
+			request.setAttribute("cds", cds);
+
+			this.getServletConfig().getServletContext().getRequestDispatcher("/admin/showCDs.jsp").include(request, response);
+
+		}
+
+		if (action.equals("findpasswd")) {
+			String ownername = request.getParameter("ownername");
+			String passwd = admin.findpasswd(ownername);
+			request.setAttribute("passwd", passwd);
+			request.setAttribute("ownername", ownername);
+
+			this.getServletConfig().getServletContext().getRequestDispatcher("/admin/showPasswd.jsp").include(request, response);
+		}
+	}
+
+	/**
+	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
+	 *      response)
+	 */
+	protected void doGet(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException {
+		service(request, response);
+	}
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
+	 *      response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException {
+		service(request, response);
+	}
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/ListOwnerServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/ListOwnerServlet.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/ListOwnerServlet.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/ListOwnerServlet.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,108 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.PersistenceUnit;
+import javax.persistence.Query;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.UserTransaction;
+
+/**
+ * Servlet implementation class ListOwnerServlet
+ * 
+ * This servlet demo how to use application-managed persistence context
+ * to access database. Note that there must inject an UserTransaction resource
+ * to manually manage transaction before using EntityManager to query database.
+ */
+public class ListOwnerServlet extends HttpServlet {
+	private static final long serialVersionUID = 1L;
+    
+	@PersistenceUnit(unitName="DataCDInfoUnit") 
+	private EntityManagerFactory emf;
+	@Resource 
+	private UserTransaction utx;
+
+    /**
+     * @see HttpServlet#HttpServlet()
+     */
+    public ListOwnerServlet() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+	/**
+	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+		// TODO Auto-generated method stub
+		service(request,response);
+	}
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+		// TODO Auto-generated method stub
+		service(request,response);
+	}
+	
+	protected void service(HttpServletRequest req, HttpServletResponse res)
+	  throws ServletException, IOException {		
+		
+		List<Object[]> owners = new ArrayList<Object[]>();
+		
+		EntityManager em = emf.createEntityManager();
+		try {
+			utx.begin();
+			Query query = em.createNativeQuery("select * from OWNER_TABLE");
+			owners = query.getResultList();
+			utx.commit();			
+		} catch (Exception e){
+			e.printStackTrace();
+		}
+
+		res.setContentType("text/html");
+		PrintWriter out = res.getWriter();
+	    
+	    out.print("<html>");
+	    out.print("<head><title>Registered Owners</title></head>");
+	    out.print("<body>");	    
+
+	    for (Object[] owner : owners)
+	    {
+	      out.print(owner[0].toString() + "/" + owner[1].toString() + "<br>");
+	    }
+	    
+	    //out.print(System.getProperties());
+	    out.print("</body>");
+	    out.print("</html>");
+	  }
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDActions.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDActions.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDActions.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDActions.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,116 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web.struts1;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.geronimo.samples.datacdinfo.beans.DataCDBean;
+import org.apache.geronimo.samples.datacdinfo.beans.OwnerBean;
+import org.apache.geronimo.samples.datacdinfo.core.DataCDInfoRemote;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.actions.MappingDispatchAction;
+
+public class DataCDActions extends MappingDispatchAction {
+
+	public static final String DATACD = "datacd";
+	public static final String OWNER = "owner";
+
+	public DataCDActions() {
+		// TODO Auto-generated constructor stub
+	}
+
+	public ActionForward update(ActionMapping mapping, ActionForm form,
+			HttpServletRequest request, HttpServletResponse response)
+			throws Exception {
+		HttpSession session = request.getSession();
+		ServletContext ctx = session.getServletContext();
+		DataCDInfoRemote logic = (DataCDInfoRemote) ctx.getAttribute("logic");
+
+		DataCDForm form1 = (DataCDForm) form;
+		logic.updateCD(form1.getCdID(), form1
+				.getCdSize(), form1.getCdDescription(), form1
+				.getCdArchiveDate());		
+
+		refreshOwnerForm(session, logic);
+
+		return mapping.findForward("success");
+
+	}
+
+	public ActionForward add(ActionMapping mapping, ActionForm form,
+			HttpServletRequest request, HttpServletResponse response)
+			throws Exception {
+		HttpSession session = request.getSession();
+		ServletContext ctx = session.getServletContext();
+		DataCDInfoRemote logic = (DataCDInfoRemote) ctx.getAttribute("logic");
+
+		DataCDForm form1 = (DataCDForm) form;		
+		// add a new CD
+		DataCDBean newcd = logic.addCD(form1.getOwner().getUsername(), form1.getCdLabel(), form1
+				.getCdSize(), form1.getCdDescription(), form1
+				.getCdArchiveDate());
+		if (newcd == null){
+			ActionMessages errors = new ActionMessages();
+			errors.add(ActionMessages.GLOBAL_MESSAGE,
+					new ActionMessage("errors.duplicated.cdlabel"));
+			this.saveErrors(request, errors);
+			return mapping.getInputForward();
+		}
+
+		refreshOwnerForm(session, logic);
+
+		return mapping.findForward("success");
+
+	}
+
+	public ActionForward remove(ActionMapping mapping, ActionForm form,
+			HttpServletRequest request, HttpServletResponse response)
+			throws Exception {
+		HttpSession session = request.getSession();
+		ServletContext ctx = session.getServletContext();
+		DataCDInfoRemote logic = (DataCDInfoRemote) ctx.getAttribute("logic");
+
+		DataCDForm form1 = (DataCDForm) form;
+		if (logic.removeCD(form1.getCdID())) {
+			refreshOwnerForm(session, logic);
+		}
+
+		return mapping.findForward("success");
+
+	}
+
+	private void refreshOwnerForm(HttpSession session, DataCDInfoRemote logic)
+			throws Exception {
+		// refresh owner object
+		OwnerForm ownerform = (OwnerForm) session.getAttribute(OWNER);
+		String ownername = ownerform.getUsername();
+		OwnerBean ownerbean = logic.refreshCDInfo(ownername);
+		PropertyUtils.copyProperties(ownerform, ownerbean);
+		session.setAttribute(OWNER, ownerform);
+	}
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDForm.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDForm.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDForm.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDForm.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,86 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web.struts1;
+
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.validator.ValidatorActionForm;
+import java.sql.Date;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class DataCDForm extends ValidatorActionForm {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -2878208025571945031L;
+	
+	private Integer cdID = null;	
+	private String cdLabel = null;
+	private String cdDescription = null;
+	private Integer cdSize = null;
+	private Date cdArchiveDate = null;
+	private OwnerForm owner = new OwnerForm();
+	
+	public Integer getCdID() {
+		return cdID;
+	}
+	public void setCdID(Integer cdID) {
+		this.cdID = cdID;
+	}
+	public String getCdLabel() {
+		return cdLabel;
+	}
+	public void setCdLabel(String cdLabel) {
+		this.cdLabel = cdLabel;
+	}
+	public String getCdDescription() {
+		return cdDescription;
+	}
+	public void setCdDescription(String cdDescription) {
+		this.cdDescription = cdDescription;
+	}
+	public Integer getCdSize() {
+		return cdSize;
+	}
+	public void setCdSize(Integer cdSize) {
+		this.cdSize = cdSize;
+	}
+	public Date getCdArchiveDate() {
+		return cdArchiveDate;
+	}
+	public void setCdArchiveDate(Date cdArchiveDate) {
+		this.cdArchiveDate = cdArchiveDate;
+	}
+	public OwnerForm getOwner() {
+		return owner;
+	}
+	public void setOwner(OwnerForm owner) {
+		this.owner = owner;
+	}
+	
+	public void reset(ActionMapping mapping, HttpServletRequest request) {
+	       cdID = null;
+	       cdLabel = null;
+	       cdDescription = null;
+	       cdSize = null;
+	       cdArchiveDate = null;
+	       owner = new OwnerForm();	       
+	    }
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDInfoContextListener.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDInfoContextListener.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDInfoContextListener.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/DataCDInfoContextListener.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web.struts1;
+
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import javax.ejb.EJB;
+
+import org.apache.geronimo.samples.datacdinfo.core.DataCDInfoRemote;
+
+public class DataCDInfoContextListener implements ServletContextListener {
+	private ServletContext ctx = null;
+	@EJB
+	private DataCDInfoRemote logic = null;	
+
+	
+	public void contextDestroyed(ServletContextEvent event) {
+		ctx = event.getServletContext();		
+		ctx.removeAttribute("logic");		
+	}
+
+	
+	public void contextInitialized(ServletContextEvent event) {
+		ctx = event.getServletContext();
+		
+		if (logic instanceof DataCDInfoRemote) {
+			ctx.setAttribute("logic", logic);
+			System.out.println(">>>>>>>>>>>>>>>>>>>>> Injected ejb DataCDInfoJTAImpl!");
+		} else {
+			System.out.println(">>>>>>>>>>>>>>>>>>>>> Cannot inject ejb DataCDInfoJTAImpl!");
+		}
+	}
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerActions.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerActions.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerActions.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerActions.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,114 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web.struts1;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.geronimo.samples.datacdinfo.beans.OwnerBean;
+import org.apache.geronimo.samples.datacdinfo.core.DataCDInfoRemote;
+import org.apache.geronimo.samples.datacdinfo.exceptions.IncorrectPasswordException;
+import org.apache.geronimo.samples.datacdinfo.exceptions.InvalidOwnerException;
+import org.apache.geronimo.samples.datacdinfo.exceptions.InvalidPasswordException;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.actions.MappingDispatchAction;
+
+public class OwnerActions extends MappingDispatchAction {
+	public static final String OWNER = "owner";
+
+	public ActionForward logon(ActionMapping mapping, ActionForm form,
+			HttpServletRequest request, HttpServletResponse response)
+			throws Exception {
+		HttpSession session = request.getSession();
+		OwnerForm ownerform = (OwnerForm) session.getAttribute(OWNER);
+		if (ownerform == null) {
+			ServletContext ctx = session.getServletContext();
+			DataCDInfoRemote logic = (DataCDInfoRemote) ctx
+					.getAttribute("logic");
+			OwnerBean owner = new OwnerBean();
+			PropertyUtils.copyProperties(owner, form);
+
+			try {
+				OwnerBean loginuser = logic.login(owner.getUsername(), owner
+						.getPassword());
+				PropertyUtils.copyProperties(form, loginuser);
+			} catch (Exception e) {
+				e.printStackTrace();
+				ActionMessages errors = new ActionMessages();
+				if (e instanceof InvalidOwnerException) {
+					errors.add(ActionMessages.GLOBAL_MESSAGE,
+							new ActionMessage("errors.invalid.owner"));
+
+				}
+				if (e instanceof IncorrectPasswordException) {
+					errors.add(ActionMessages.GLOBAL_MESSAGE,
+							new ActionMessage("errors.incorrect.password"));
+				}
+				this.saveErrors(request, errors);
+				return mapping.getInputForward();
+			}
+			session.setAttribute(OWNER, form);
+
+		}
+
+		return mapping.findForward("success");
+	}
+
+	public ActionForward register(ActionMapping mapping, ActionForm form,
+			HttpServletRequest request, HttpServletResponse response)
+			throws Exception {
+		HttpSession session = request.getSession();
+
+		ServletContext ctx = session.getServletContext();
+		DataCDInfoRemote logic = (DataCDInfoRemote) ctx.getAttribute("logic");
+		OwnerBean owner = new OwnerBean();
+		PropertyUtils.copyProperties(owner, form);
+
+		try {
+			OwnerBean loginuser = logic.register(owner.getUsername(), owner
+					.getPassword());
+			PropertyUtils.copyProperties(form, loginuser);
+		} catch (Exception e) {
+			System.out.println(e.getMessage());
+			ActionMessages errors = new ActionMessages();
+			if (e instanceof InvalidOwnerException) {
+				errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+						"errors.existing.owner"));
+
+			}
+			if (e instanceof InvalidPasswordException) {
+				errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+						"errors.invalid.password"));
+			}
+			this.saveErrors(request, errors);
+			return mapping.getInputForward();
+		}
+		session.setAttribute(OWNER, form);
+
+		return mapping.findForward("success");
+	}
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerForm.java
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerForm.java?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerForm.java (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/java/org/apache/geronimo/samples/datacdinfo/web/struts1/OwnerForm.java Wed Feb 10 01:52:33 2010
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+package org.apache.geronimo.samples.datacdinfo.web.struts1;
+
+import java.util.Collection;
+
+import org.apache.struts.validator.ValidatorForm;
+
+public class OwnerForm extends ValidatorForm {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 8367551067568662573L;
+	private String username;
+	private String password;
+	private String password2;
+	
+
+	private Collection<DataCDForm> DataCDs;
+	
+	public Collection<DataCDForm> getDataCDs() {
+		return DataCDs;
+	}
+
+	public void setDataCDs(Collection<DataCDForm> dataCDs) {
+		DataCDs = dataCDs;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+	
+	public String getPassword2() {
+		return password2;
+	}
+
+	public void setPassword2(String password2) {
+		this.password2 = password2;
+	}
+
+}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources.properties?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources.properties (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources.properties Wed Feb 10 01:52:33 2010
@@ -0,0 +1,60 @@
+#   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.
+
+logon.title=DataCDInfo Logon
+register.title=Register A New User
+prompt.username=Username
+prompt.password=Password
+prompt.password2=Retype Password
+errors.invalid.owner=Invalid owner!
+errors.incorrect.password=Incorrect password!
+errors.existing.owner=Owner existed!
+errors.invalid.password=Invalid password!
+datacd.cdlabel=CD Label
+datacd.cddescription=Content Description
+datacd.cdsize=Size(Mbytes)
+datacd.cdarchivedate=Archive Date
+datacd.operations=Operations
+datacd.operation.add=Add
+datacd.operation.edit=Update
+datacd.operation.remove=Remove
+datacd.operation.logout=Log Out
+datacd.operation.back=Return to list
+general.welcome=Welcome
+general.register=Register?
+general.administration=Administration
+button.submit=Submit
+button.reset=Reset
+button.update=Update
+button.remove=Confirm to remove
+button.add=Add
+errors.duplicated.cdlabel=Duplicated CD Label!
+
+# Standard error messages for validator framework checks
+errors.required={0} is required.
+errors.minlength={0} cannot be less than {1} characters.
+errors.maxlength={0} cannot be greater than {1} characters.
+errors.invalid={0} is invalid.
+errors.byte={0} must be an byte.
+errors.short={0} must be an short.
+errors.integer={0} must be an integer.
+errors.long={0} must be an long.
+errors.float={0} must be an float.
+errors.double={0} must be an double.
+errors.date={0} is not a date.
+errors.range={0} is not in the range {1} through {2}.
+errors.creditcard={0} is not a valid credit card number.
+errors.email={0} is an invalid e-mail address.
+errors.literal={0}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_en_US.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_en_US.properties?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_en_US.properties (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_en_US.properties Wed Feb 10 01:52:33 2010
@@ -0,0 +1,60 @@
+#   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.
+
+logon.title=DataCDInfo Logon
+register.title=Register A New User
+prompt.username=Username
+prompt.password=Password
+prompt.password2=Retype Password
+errors.invalid.owner=Invalid owner!
+errors.incorrect.password=Incorrect password!
+errors.existing.owner=Owner existed!
+errors.invalid.password=Invalid password!
+datacd.cdlabel=CD Label
+datacd.cddescription=Content Description
+datacd.cdsize=Size(Mbytes)
+datacd.cdarchivedate=Archive Date
+datacd.operations=Operations
+datacd.operation.add=Add
+datacd.operation.edit=Update
+datacd.operation.remove=Remove
+datacd.operation.logout=Log Out
+datacd.operation.back=Return to list
+general.welcome=Welcome
+general.register=Register?
+general.administration=Administration
+button.submit=Submit
+button.reset=Reset
+button.update=Update
+button.remove=Confirm to remove
+button.add=Add
+errors.duplicated.cdlabel=Duplicated CD Label!
+
+# Standard error messages for validator framework checks
+errors.required={0} is required.
+errors.minlength={0} cannot be less than {1} characters.
+errors.maxlength={0} cannot be greater than {1} characters.
+errors.invalid={0} is invalid.
+errors.byte={0} must be an byte.
+errors.short={0} must be an short.
+errors.integer={0} must be an integer.
+errors.long={0} must be an long.
+errors.float={0} must be an float.
+errors.double={0} must be an double.
+errors.date={0} is not a date.
+errors.range={0} is not in the range {1} through {2}.
+errors.creditcard={0} is not a valid credit card number.
+errors.email={0} is an invalid e-mail address.
+errors.literal={0}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh.properties.template
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh.properties.template?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh.properties.template (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh.properties.template Wed Feb 10 01:52:33 2010
@@ -0,0 +1,60 @@
+#   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.
+
+logon.title=Êý¾ÝÅÌÐÅÏ¢µÇ¼ÇϵͳµÇ¼
+register.title=×¢²áÒ»¸öеÄÓû§
+prompt.username=̞
+prompt.password=ÃÜÂë
+prompt.password2=ÔÙ´ÎÊäÈëÃÜÂë
+errors.invalid.owner=ÎÞЧÓû§£¡
+errors.incorrect.password=ÃÜÂë´íÎó£¡
+errors.existing.owner=Óû§ÒÑ´æÔÚ£¡
+errors.invalid.password=ÎÞЧÃÜÂ룡
+datacd.cdlabel=Êý¾ÝÅ̱êÇ©
+datacd.cddescription=ÄÚÈÝÃèÊö
+datacd.cdsize=´óС(Õ××Ö½Ú)
+datacd.cdarchivedate=´æµµÈÕÆÚ
+datacd.operations=²Ù×÷
+datacd.operation.add=Ìí¼Ó
+datacd.operation.edit=¸üÐÂ
+datacd.operation.remove=ɾ³ý
+datacd.operation.logout=µÇ³ö
+datacd.operation.back=·µ»ØÁбí
+general.welcome=»¶Ó­
+general.register=×¢²á£¿
+general.administration=¹ÜÀí
+button.submit=Ìá½»
+button.reset=ÖØÖÃ
+button.update=¸üÐÂ
+button.remove=È·ÈÏɾ³ý
+button.add=Ìí¼Ó
+errors.duplicated.cdlabel=Öظ´µÄÊý¾ÝÅ̱êÇ©!
+
+# Standard error messages for validator framework checks
+errors.required={0} ÊDZØÐëµÄ¡£
+errors.minlength={0} ²»ÄÜÉÙÓÚ {1} ¸öÓ¢ÎÄ×Ö·û¡£
+errors.maxlength={0} ²»ÄÜ´óÓÚ {1} ¸öÓ¢ÎÄ×Ö·û¡£
+errors.invalid={0} ÊÇÎÞЧµÄ¡£
+errors.byte={0} ±ØÐëÊÇÒ»¸ö×Ö½Ú¡£
+errors.short={0} ±ØÐëÊǶÌÕûÊý¡£
+errors.integer={0} ±ØÐëÊÇÕûÊý¡£
+errors.long={0} ±ØÐëÊdz¤ÕûÊý¡£
+errors.float={0} ±ØÐëÊǸ¡µãÊý¡£
+errors.double={0} ±ØÐëÊÇË«¾«¶È¸¡µãÊý¡£
+errors.date={0} ²»ÊÇÒ»¸öÓÐЧµÄÈÕÆÚ¡£
+errors.range={0} ²»ÔÚ {1} ºÍ {2} Ö®¼ä¡£
+errors.creditcard={0} ²»ÊÇÒ»¸öÓÐЧµÄÐÅÓÿ¨Õʺš£
+errors.email={0} ²»ÊÇÒ»¸öÓÐЧµÄµç×ÓÓʼþµØÖ·¡£
+errors.literal={0}

Added: geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh_CN.properties
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh_CN.properties?rev=908308&view=auto
==============================================================================
--- geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh_CN.properties (added)
+++ geronimo/samples/branches/2.1/samples/DataCDInfo/DataCDInfo-JTA-war/src/main/resources/DataCDInfoResources_zh_CN.properties Wed Feb 10 01:52:33 2010
@@ -0,0 +1,60 @@
+#   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.
+
+logon.title=\u6570\u636e\u76d8\u4fe1\u606f\u767b\u8bb0\u7cfb\u7edf\u767b\u5f55
+register.title=\u6ce8\u518c\u4e00\u4e2a\u65b0\u7684\u7528\u6237
+prompt.username=\u7528\u6237\u540d
+prompt.password=\u5bc6\u7801
+prompt.password2=\u518d\u6b21\u8f93\u5165\u5bc6\u7801
+errors.invalid.owner=\u65e0\u6548\u7528\u6237\uff01
+errors.incorrect.password=\u5bc6\u7801\u9519\u8bef\uff01
+errors.existing.owner=\u7528\u6237\u5df2\u5b58\u5728\uff01
+errors.invalid.password=\u65e0\u6548\u5bc6\u7801\uff01
+datacd.cdlabel=\u6570\u636e\u76d8\u6807\u7b7e
+datacd.cddescription=\u5185\u5bb9\u63cf\u8ff0
+datacd.cdsize=\u5927\u5c0f(\u5146\u5b57\u8282)
+datacd.cdarchivedate=\u5b58\u6863\u65e5\u671f
+datacd.operations=\u64cd\u4f5c
+datacd.operation.add=\u6dfb\u52a0
+datacd.operation.edit=\u66f4\u65b0
+datacd.operation.remove=\u5220\u9664
+datacd.operation.logout=\u767b\u51fa
+datacd.operation.back=\u8fd4\u56de\u5217\u8868
+general.welcome=\u6b22\u8fce
+general.register=\u6ce8\u518c\uff1f
+general.administration=\u7ba1\u7406
+button.submit=\u63d0\u4ea4
+button.reset=\u91cd\u7f6e
+button.update=\u66f4\u65b0
+button.remove=\u786e\u8ba4\u5220\u9664
+button.add=\u6dfb\u52a0
+errors.duplicated.cdlabel=\u91cd\u590d\u7684\u6570\u636e\u76d8\u6807\u7b7e!
+
+# Standard error messages for validator framework checks
+errors.required={0} \u662f\u5fc5\u987b\u7684\u3002
+errors.minlength={0} \u4e0d\u80fd\u5c11\u4e8e {1} \u4e2a\u82f1\u6587\u5b57\u7b26\u3002
+errors.maxlength={0} \u4e0d\u80fd\u5927\u4e8e {1} \u4e2a\u82f1\u6587\u5b57\u7b26\u3002
+errors.invalid={0} \u662f\u65e0\u6548\u7684\u3002
+errors.byte={0} \u5fc5\u987b\u662f\u4e00\u4e2a\u5b57\u8282\u3002
+errors.short={0} \u5fc5\u987b\u662f\u77ed\u6574\u6570\u3002
+errors.integer={0} \u5fc5\u987b\u662f\u6574\u6570\u3002
+errors.long={0} \u5fc5\u987b\u662f\u957f\u6574\u6570\u3002
+errors.float={0} \u5fc5\u987b\u662f\u6d6e\u70b9\u6570\u3002
+errors.double={0} \u5fc5\u987b\u662f\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570\u3002
+errors.date={0} \u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u7684\u65e5\u671f\u3002
+errors.range={0} \u4e0d\u5728 {1} \u548c {2} \u4e4b\u95f4\u3002
+errors.creditcard={0} \u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u7684\u4fe1\u7528\u5361\u5e10\u53f7\u3002
+errors.email={0} \u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u3002
+errors.literal={0}