geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r586130 - in /geronimo/samples/trunk/samples/inventory: ./ inventory-ear/ inventory-ear/src/ inventory-ear/src/main/ inventory-ear/src/main/resources/ inventory-ear/src/main/resources/META-INF/ inventory-war/ inventory-war/src/ inventory-wa...
Date Thu, 18 Oct 2007 20:55:45 GMT
Author: gawor
Date: Thu Oct 18 13:55:42 2007
New Revision: 586130

URL: http://svn.apache.org/viewvc?rev=586130&view=rev
Log:
import inventory sample code into svn

Added:
    geronimo/samples/trunk/samples/inventory/
    geronimo/samples/trunk/samples/inventory/inventory-ear/
    geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/
    geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/
    geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp   (with props)
    geronimo/samples/trunk/samples/inventory/pom.xml   (with props)

Added: geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,97 @@
+<?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: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>inventory</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>inventory-ear</artifactId>
+    <name>Geronimo Samples :: inventory :: EAR</name>
+    <packaging>ear</packaging>
+
+    <description>Geronimo Samples. EAR Module</description>
+
+    <dependencies>
+		<dependency>
+			<groupId>org.tranql</groupId>
+			<artifactId>tranql-connector-ra</artifactId>
+			<version>1.3</version>
+			<type>rar</type>
+		</dependency>
+		<dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>inventory-war</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <type>war</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-ear-plugin</artifactId>
+                <configuration>
+                    <displayName>Geronimo Sample EAR for inventory</displayName>
+                    <description>Geronimo Sample EAR for inventory</description>
+                    <version>5</version>
+                    <modules>
+                        <webModule>
+                            <groupId>org.apache.geronimo.samples</groupId>
+                            <artifactId>inventory-war</artifactId>
+                            <contextRoot>/inventory</contextRoot>
+                            <bundleFileName>inventory-war-2.0-SNAPSHOT.war</bundleFileName>
+                        </webModule>
+                    </modules>
+                </configuration>
+            </plugin>
+
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>install</phase>
+                        <id>copy-parent-target</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <echo>Copying ${pom.build.finalName}.ear file to parent</echo>
+                                <copy file ="${project.build.directory}/${pom.artifactId}-${pom.version}.ear" todir="${pom.basedir}/.." failonerror="false" overwrite="true" />
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Propchange: geronimo/samples/trunk/samples/inventory/inventory-ear/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql Thu Oct 18 13:55:42 2007
@@ -0,0 +1,21 @@
+CREATE TABLE item(
+	item_id VARCHAR(10) PRIMARY KEY,
+	item_name VARCHAR(25),
+	description VARCHAR(100)	
+);
+
+CREATE TABLE item_master(
+	item_id VARCHAR(10) PRIMARY KEY,
+	quantity INTEGER
+);
+
+INSERT INTO item VALUES('001', 'Item 1', 'Test Item 1');
+INSERT INTO item VALUES('002', 'Item 2', 'Test Item 2');
+INSERT INTO item VALUES('003', 'Item 3', 'Test Item 3');
+INSERT INTO item VALUES('004', 'Item 4', 'Test Item 4');
+
+
+INSERT INTO item_master VALUES('001', 12);
+INSERT INTO item_master VALUES('002', 8);
+INSERT INTO item_master VALUES('003', 49);
+INSERT INTO item_master VALUES('004', 34);
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryDB.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
+	<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+		<dep:moduleId>
+			<dep:groupId>console.dbpool</dep:groupId>
+			<dep:artifactId>InventoryPool</dep:artifactId>
+			<dep:version>1.0</dep:version>
+			<dep:type>rar</dep:type>
+		</dep:moduleId>
+		<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>
+	<resourceadapter>
+		<outbound-resourceadapter>
+			<connection-definition>
+				<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+				<connectiondefinition-instance>
+					<name>InventoryPool</name>
+					<config-property-setting name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
+					<config-property-setting name="UserName">app</config-property-setting>
+					<config-property-setting name="ConnectionURL">jdbc:derby:InventoryDB</config-property-setting>
+					<connectionmanager>
+						<local-transaction/>
+						<single-pool>
+							<max-size>10</max-size>
+							<min-size>0</min-size>
+							<match-one/>
+						</single-pool>
+					</connectionmanager>
+				</connectiondefinition-instance>
+			</connection-definition>
+		</outbound-resourceadapter>
+	</resourceadapter>
+</connector>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,37 @@
+<?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: 497879 $ $Date: 2007-01-19 12:11:01 -0500 (Fri, 19 Jan 2007) $ -->
+
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+
+    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+        <dep:moduleId>
+            <dep:groupId>${pom.groupId}</dep:groupId>
+            <dep:artifactId>${pom.artifactId}</dep:artifactId>
+            <dep:version>2.0-SNAPSHOT</dep:version>
+            <dep:type>ear</dep:type>
+        </dep:moduleId>
+    </dep:environment>
+	<module>
+		<connector>tranql-connector-ra-1.3.rar</connector>
+		<alt-dd>InventoryPool.xml</alt-dd>
+	</module>
+</application>

Propchange: geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/META-INF/geronimo-application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,65 @@
+<?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: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>inventory</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>inventory-war</artifactId>
+    <name>Geronimo Samples :: inventory :: WAR</name>
+    <packaging>war</packaging>
+
+    <description>Geronimo Samples. WEB Module</description>
+    
+    <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.0-SNAPSHOT" failonerror="false" overwrite="true">
+                                    <fileset dir="${pom.basedir}/../docs"/>
+                                </copy>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,43 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory;
+
+
+
+public class Item {
+	
+	
+	private String itemNo;
+	private String itemName;
+	private String description;
+	private int quantity;
+	
+	public String getDescription() {
+		return description;
+	}
+	public void setDescription(String description) {
+		this.description = description;
+	}
+	public String getItemName() {
+		return itemName;
+	}
+	public void setItemName(String itemName) {
+		this.itemName = itemName;
+	}
+	public String getItemNo() {
+		return itemNo;
+	}
+	public void setItemNo(String itemNo) {
+		this.itemNo = itemNo;
+	}
+	public int getQuantity() {
+		return quantity;
+	}
+	public void setQuantity(int quantity) {
+		this.quantity = quantity;
+	}
+	
+	
+	
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/Item.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,166 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.dao;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.geronimo.samples.inventory.Item;
+import org.apache.geronimo.samples.inventory.util.DBManager;
+
+
+public class ItemDAO {
+	
+	public List getItems(){
+		ArrayList items = new ArrayList();
+		
+		Connection con = DBManager.getConnection();
+		try {
+			
+			PreparedStatement pStmt = con.prepareStatement("SELECT i.item_id as item_id, i.item_name as item_name, i.description as description, im.quantity as quantity FROM item i, item_master im WHERE im.item_id = i.item_id");
+			ResultSet rs = pStmt.executeQuery();
+			int j = 0;
+			while(rs.next()){
+				ArrayList item = new ArrayList();
+				
+				String itemId = rs.getString("item_id");
+				String itemName = rs.getString("item_name");
+				String description = rs.getString("description");
+				int quantity = rs.getInt("quantity");
+				
+				item.add(0, itemId);
+				item.add(1, itemName);
+				item.add(2, description);
+				item.add(3, quantity+"");
+				
+				items.add(j,item);				
+				j++;
+				
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}finally{
+			if(con != null){
+				try {
+					con.close();
+				} catch (SQLException e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+		
+		return items;
+	}
+	
+	public int getQOH(String itemNo){
+		
+		int qoh = 0;
+		Connection con = DBManager.getConnection();
+		try {
+			
+			PreparedStatement pStmt = con.prepareStatement("SELECT quantity FROM item_master WHERE item_id =? ");
+			pStmt.setString(1, itemNo);
+			
+			ResultSet rs = pStmt.executeQuery();
+			while(rs.next()){
+				qoh = rs.getInt("quantity");
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}finally{
+			if(con != null){
+				try {
+					con.close();
+				} catch (SQLException e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+		return qoh;
+	}
+	
+	public boolean isItemIdExists(String itemNo){
+		boolean isExists = false;
+		Connection con = DBManager.getConnection();
+		try {
+			
+			PreparedStatement pStmt = con.prepareStatement("SELECT item_id FROM item WHERE item_id =? ");
+			pStmt.setString(1, itemNo);
+			
+			ResultSet rs = pStmt.executeQuery();
+			if(rs.next()){
+				isExists = true;
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}finally{
+			if(con != null){
+				try {
+					con.close();
+				} catch (SQLException e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+		return isExists;
+	}
+	
+	public void updateQOH(String itemNo, int qoh){
+		Connection con = DBManager.getConnection();
+		try {
+			
+			PreparedStatement pStmt = con.prepareStatement("UPDATE item_master SET quantity=? WHERE item_id=?");
+			pStmt.setInt(1, qoh);
+			pStmt.setString(2, itemNo);
+			
+			pStmt.executeUpdate();
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}finally{
+			if(con != null){
+				try {
+					con.close();
+				} catch (SQLException e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+		
+	}
+	
+	public void addItem(Item item) {
+		Connection con = DBManager.getConnection();
+		try {
+			
+			PreparedStatement pStmt = con.prepareStatement("INSERT INTO item VALUES(?, ?, ?)");
+			pStmt.setString(1, item.getItemNo());
+			pStmt.setString(2, item.getItemName());
+			pStmt.setString(3, item.getDescription());
+			
+			pStmt.executeUpdate();
+			
+			pStmt = con.prepareStatement("INSERT INTO item_master VALUES(?, ?)");
+			pStmt.setString(1, item.getItemNo());
+			pStmt.setInt(2, 0);
+			
+			pStmt.executeUpdate();
+			
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}finally{
+			if(con != null){
+				try {
+					con.close();
+				} catch (SQLException e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+	}
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/dao/ItemDAO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,13 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.exception;
+
+
+public class DuplicateItemIdException extends Exception {
+	
+	public DuplicateItemIdException(){
+		super();
+	}
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/DuplicateItemIdException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,11 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.exception;
+
+
+public class NotSufficientQuantityException extends Exception{
+	public NotSufficientQuantityException(){
+		super();
+	}
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/exception/NotSufficientQuantityException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,53 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.services;
+
+import java.util.List;
+
+import org.apache.geronimo.samples.inventory.Item;
+import org.apache.geronimo.samples.inventory.dao.ItemDAO;
+import org.apache.geronimo.samples.inventory.exception.DuplicateItemIdException;
+import org.apache.geronimo.samples.inventory.exception.NotSufficientQuantityException;
+
+
+public class InventoryManager {
+	
+	public List getItems(){
+		ItemDAO dao = new ItemDAO();
+		return dao.getItems();
+	}
+	
+	public void issueItem(String itemNo, int quantity) throws NotSufficientQuantityException{
+		ItemDAO dao = new ItemDAO();
+		
+		int qoh = dao.getQOH(itemNo);
+		
+		if(qoh < quantity)throw new NotSufficientQuantityException();
+		
+		dao.updateQOH(itemNo,(qoh - quantity));
+	}
+	
+	public void recvItem(String itemNo, int quantity){
+		ItemDAO dao = new ItemDAO();
+		
+		int qoh = dao.getQOH(itemNo);
+		
+		dao.updateQOH(itemNo,(qoh + quantity));		
+	}
+	
+	public void addItem(String itemNo, String itemName, String desc) throws DuplicateItemIdException{
+		ItemDAO dao = new ItemDAO();
+		
+		if(dao.isItemIdExists(itemNo))throw new DuplicateItemIdException();
+		Item item = new Item();
+		
+		item.setItemNo(itemNo);
+		item.setItemName(itemName);
+		item.setDescription(desc);
+		
+		dao.addItem(item);
+		
+	}
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/services/InventoryManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,32 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.util;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+
+public class DBManager {
+	
+	public static Connection getConnection(){
+		Connection con = null;
+
+		try {
+			Context context = new InitialContext();
+			DataSource ds = (DataSource)context.lookup("java:comp/env/jdbc/InventoryDS");
+			con = ds.getConnection();
+		} catch (NamingException e) {
+			e.printStackTrace();
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+		return con;
+	}
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/util/DBManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,57 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.web;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.inventory.exception.DuplicateItemIdException;
+import org.apache.geronimo.samples.inventory.services.InventoryManager;
+
+
+public class AddItemServlet extends HttpServlet {
+
+	
+	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		process(req,res);
+	}
+
+	protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		doGet(req,res);
+	}
+	
+	private void process(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{
+		String itemNo = req.getParameter("item_no");
+		String itemName = req.getParameter("item_name");
+		String description = req.getParameter("item_desc");
+		
+		if(!itemNo.equals("") && !itemName.equals("")){
+			InventoryManager itemManager = new InventoryManager();
+			try {
+				itemManager.addItem(itemNo, itemName, description);
+				getServletContext().getRequestDispatcher("/welcome.jsp").forward(req,res);
+			} catch (DuplicateItemIdException e) {
+				req.setAttribute("error","Duplicate Item Id");
+				getServletContext().getRequestDispatcher("/jsp/error.jsp").forward(req,res);
+			}
+		}else{
+			String error = "";
+			if(itemNo.equals("")){
+				error = "Invalid Item Number";
+			}else if(itemName.equals("")){
+				error = "Invalid Item Name";
+			}
+			req.setAttribute("error",error);
+			getServletContext().getRequestDispatcher("/jsp/error.jsp").forward(req,res);
+		}
+		
+	}
+	
+	
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/AddItemServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,49 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.web;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.inventory.exception.NotSufficientQuantityException;
+import org.apache.geronimo.samples.inventory.services.InventoryManager;
+
+
+public class IssueingServlet extends HttpServlet {
+
+	
+	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		process(req,res);
+	}
+
+	protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		doGet(req,res);
+	}
+	
+	private void process(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{
+		String itemNo = req.getParameter("item_no");
+		
+		int quantity = 0;
+		try {
+			quantity = Integer.parseInt(req.getParameter("quantity"));
+			InventoryManager itemManager = new InventoryManager();
+			itemManager.issueItem(itemNo,quantity);
+
+			getServletContext().getRequestDispatcher("/welcome.jsp").forward(req,res);
+		} catch (NumberFormatException e) {
+			e.printStackTrace();
+			req.setAttribute("error","Invalid Number Format for Quantity");
+			getServletContext().getRequestDispatcher("/jsp/error.jsp").forward(req,res);			
+		} catch (NotSufficientQuantityException e) {
+			req.setAttribute("error","Not Sufficient Qunatity to Issue Items");
+			getServletContext().getRequestDispatcher("/jsp/error.jsp").forward(req,res);	
+		}
+	}
+	
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/IssueingServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java Thu Oct 18 13:55:42 2007
@@ -0,0 +1,48 @@
+/**
+ * 
+ */
+package org.apache.geronimo.samples.inventory.web;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.samples.inventory.services.InventoryManager;
+
+
+public class RecievingServlet extends HttpServlet {
+
+	
+	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		process(req,res);
+	}
+
+	protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+		doGet(req,res);
+	}
+	
+	private void process(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{
+		String itemNo = req.getParameter("item_no");
+		
+		int quantity = 0;
+		try {
+			quantity = Integer.parseInt(req.getParameter("quantity"));
+			InventoryManager itemManager = new InventoryManager();
+			itemManager.recvItem(itemNo,quantity);
+			
+			getServletContext().getRequestDispatcher("/welcome.jsp").forward(req,res);
+		} catch (NumberFormatException e) {	
+			e.printStackTrace();
+			req.setAttribute("error","Invalid Number Format for Quantity");
+			getServletContext().getRequestDispatcher("/jsp/error.jsp").forward(req,res);	
+		}
+			
+	}
+	
+	
+	
+
+}

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/java/org/apache/geronimo/samples/inventory/web/RecievingServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
+	xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
+	
+	<environment>
+		<moduleId>
+			<groupId>org.apache.geronimo.samples</groupId>
+			<artifactId>InventoryApp</artifactId>
+			<version>2.0</version>
+		</moduleId>
+		<dependencies></dependencies>		
+	</environment>
+		
+	<context-root>/inventory</context-root>
+	
+	<!-- define a reference name to the db pool-->
+	<resource-ref>
+        <ref-name>jdbc/InventoryDS</ref-name>
+        <resource-link>InventoryPool</resource-link>
+    </resource-ref>    
+</web-app>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+	 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	 version="2.4">	
+	 
+	<welcome-file-list>
+		<welcome-file>index.html</welcome-file>
+  	</welcome-file-list>  
+  	
+  	<servlet>
+	    <display-name>AddItemServlet</display-name>
+	    <servlet-name>AddItemServlet</servlet-name>
+	    <servlet-class>org.apache.geronimo.samples.inventory.web.AddItemServlet</servlet-class>
+  	</servlet>
+  	<servlet>
+	    <display-name>IssueingServlet</display-name>
+	    <servlet-name>IssueingServlet</servlet-name>
+	    <servlet-class>org.apache.geronimo.samples.inventory.web.IssueingServlet</servlet-class>
+	</servlet>
+	<servlet>
+	    <display-name>RecievingServlet</display-name>
+	    <servlet-name>RecievingServlet</servlet-name>
+	    <servlet-class>org.apache.geronimo.samples.inventory.web.RecievingServlet</servlet-class>
+	</servlet>
+  	
+  	<servlet-mapping>
+	    <servlet-name>AddItemServlet</servlet-name>
+	    <url-pattern>/add_item</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+	    <servlet-name>IssueingServlet</servlet-name>
+	    <url-pattern>/issue</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+	    <servlet-name>RecievingServlet</servlet-name>
+	    <url-pattern>/recv</url-pattern>
+    </servlet-mapping>
+    
+    <!-- reference name exposed as a datasource -->
+    <resource-ref>
+    	<res-ref-name>jdbc/InventoryDS</res-ref-name>
+    	<res-type>javax.sql.DataSource</res-type>
+    	<res-auth>Container</res-auth>
+    	<res-sharing-scope>Shareable</res-sharing-scope>
+  	</resource-ref>
+    
+</web-app>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html Thu Oct 18 13:55:42 2007
@@ -0,0 +1,55 @@
+<!--
+   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.
+-->
+
+<html>
+    <head>
+        <link type="text/css" rel="stylesheet" href="http://geronimo.apache.org/style/default.css">
+        <link rel="SHORTCUT ICON" href="http://geronimo.apache.org/images/favicon.ico">   
+        <script src="http://geronimo.apache.org/functions.js" type="text/javascript"></script><title>Apache Geronimo Sample Applications</title>
+        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    </head>
+    
+    <body onload="init()">
+        
+        <table valign="top" background="http://geronimo.apache.org/images/header_bg_1x86.gif" border="0" cellpadding="0" cellspacing="0" width="100%">
+            <tbody>
+                <tr>
+                    <td valing="top" align="left">
+                        <a href="http://geronimo.apache.org/"><img src="http://geronimo.apache.org/images/topleft_logo_437x64.gif" border="0"></a>
+                    </td>
+                    <td width="100%">
+                        &nbsp;
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+        
+        <table border="0" cellpadding="2" cellspacing="0" width="100%">
+            <tbody>
+                <tr class="topBar">
+                    <td class="topBarDiv" align="left" nowrap="true" valign="middle" width="100%">
+                        &nbsp;<a href="http://geronimo.apache.org/" title="Apache Geronimo Home" target="_blank">Apache Geronimo Home</a> | <a href="http://cwiki.apache.org/geronimo/" title="Geronimo Documentation"target="_blank">Documentation</a> | <a href="http://cwiki.apache.org/GMOxSAMPLES/" title="Sample Applications"target="_blank">Sample Applications</a>
+                    </td>
+                    <td class="topBarDiv" align="left" nowrap="true" valign="middle">
+                        <a href="xref/index.html" target="source_window">Source Code</a> | <a href="apidocs/index.html" target="source_window">Java Docs</a>&nbsp;&nbsp;
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+
+    </body>
+</html>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/header.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html Thu Oct 18 13:55:42 2007
@@ -0,0 +1,29 @@
+<!--
+   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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd class="cell"">
+<html>
+<head>
+  <title>Apache Geronimo Sample Application</title>
+  <meta content="text/html; CHARSET=iso-8859-1" http-equiv="Content-Type">
+</head>
+
+<FRAMESET rows="86px,*" frameborder="0">
+    <FRAME src="./header.html" name="headerFrame" title="Header" frameborder="0" marginheight="0" marginwidth="0" noresize scrolling="no">
+    <FRAME src="./welcome.jsp" name="Inventory" title="Inventory" frameborder="0" marginheight="0" marginwidth="0" noresize scrolling="no">
+</FRAMESET>
+  
+</html>

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,28 @@
+<HTML>
+<HEAD><TITLE>Add Items</TITLE></HEAD>
+<BODY>
+<div align="center">
+<H2>Add Items</H2>
+<FORM method="POST" action="../add_item">
+  <TABLE bgcolor="cyan">
+    <TR>
+	<TD>Item No:</TD>
+	<TD><INPUT type="text" name="item_no"></TD>	
+    </TR>
+    <TR>
+	<TD>Name: </TD>
+	<TD><INPUT type="text" name="item_name"></TD>	
+    </TR>
+    <TR>
+	<TD>Description: </TD>
+	<TD><textarea name="item_desc" rows="5"></textarea></TD>	
+    </TR>	
+  </TABLE>
+  <BR>
+	<INPUT type="submit" value="Add">  <INPUT type="reset" value="Cancel">
+  <BR><BR>
+  <a href="../welcome.jsp">Home</a>
+</FORM>
+</div>
+</BODY>
+</HTML
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/add.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,18 @@
+<HTML>
+<HEAD><TITLE>Error</TITLE></HEAD>
+<BODY>
+<div>
+<CENTER>
+<H2>Error Occured</H2>
+<br><br>
+<%
+	String error = (String)request.getAttribute("error");
+%>
+<br>
+<%=error%>
+<br><br>
+<a href="welcome.jsp">Home</a>
+</CENTER>
+</div>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/error.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,43 @@
+<%@ page import="org.apache.geronimo.samples.inventory.services.InventoryManager" %>
+<%@ page import="java.util.List" %>
+
+<HTML>
+<jsp:useBean id="inventoryManager" scope="session" class="org.apache.geronimo.samples.inventory.services.InventoryManager"/>
+<HEAD><TITLE>Issueing</TITLE></HEAD>
+<BODY>
+<div align="center">
+<H2>Issueing of Goods</H2><br>
+<FORM method="POST" action="../issue">
+<TABLE bgcolor="cyan">
+  <TR>
+  <TD>Item: </TD>
+  <TD>
+   <SELECT name="item_no">
+   <%
+      List itemList = inventoryManager.getItems();
+      for(int i=0; i<itemList.size();i++){
+      	List item = (List)itemList.get(i);
+      	
+      	String itemNo = (String)item.get(0);
+      	String itemName = (String)item.get(1);
+   %>
+   <OPTION value="<%=itemNo%>"><%=itemName%></OPTION>
+   <%	}%>
+   </SELECT>	
+
+  </TD>
+  </TR>
+  <TR>
+  <TD>Quantity: </TD>
+  <TD><INPUT type="text" name="quantity"></TD>
+  </TR>
+</TABLE>
+<br>
+<INPUT type="submit" value="Issue">
+<INPUT type="reset" value="Cancel">
+</FORM>
+<br><br>
+<a href="../welcome.jsp">Home</a>
+</div>
+</BODY>
+</HTML>

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/issue.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,43 @@
+<%@ page import="org.apache.geronimo.samples.inventory.services.InventoryManager" %>
+<%@ page import="java.util.List" %>
+
+<HTML>
+<jsp:useBean id="inventoryManager" scope="session" class="org.apache.geronimo.samples.inventory.services.InventoryManager"/>
+<HEAD><TITLE>Receiving</TITLE></HEAD>
+<BODY>
+<div align="center">
+<H2>Recieving of Goods</H2>
+<FORM method="POST" action="../recv">
+<TABLE bgcolor="cyan">
+ <TR>
+  <TD>Item:</TD>
+  <TD>
+   <SELECT name="item_no">
+   <%
+      List itemList = inventoryManager.getItems();
+      for(int i=0; i<itemList.size();i++){
+      	List item = (List)itemList.get(i);
+      	
+      	String itemNo = (String)item.get(0);
+      	String itemName = (String)item.get(1);
+   %>
+   <OPTION value="<%=itemNo%>"><%=itemName%></OPTION>
+   <%	}%>
+   </SELECT>	
+  </TD>
+ </TR>
+ <TR>
+ <TD>Quantity:</TD>
+ <TD>
+  <INPUT type="text" name="quantity">
+ </TD>
+ </TR>
+</TABLE>
+<BR>
+<INPUT type="submit" value="Add">  <INPUT type="reset" value="Cancel">
+</FORM>
+<br><br>
+<a href="../welcome.jsp">Home</a>
+</div>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/jsp/recv.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,32 @@
+<!--
+   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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd class="cell"">
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<html>
+<head>
+  <title>Sample for inventory</title>
+  <meta content="text/html; CHARSET=iso-8859-1" http-equiv="Content-Type">
+</head>
+
+<BODY>
+  <font face="Verdana, Helvetica, Arial">
+
+     Your sample documentation goes here.
+
+  </FONT>
+</body>
+</html>

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/sample-docu.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp (added)
+++ geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp Thu Oct 18 13:55:42 2007
@@ -0,0 +1,54 @@
+<%@ page import="org.apache.geronimo.samples.inventory.services.InventoryManager" %>
+<%@ page import="java.util.List" %>
+
+
+<HTML>
+<jsp:useBean id="inventoryManager" scope="session" class="org.apache.geronimo.samples.inventory.services.InventoryManager"/>
+<HEAD><TITLE>Welcome</TITLE></HEAD>
+<BODY>
+    <div div=true align="center">
+      <strong><H2>Welcome to the Inventory Contorl System</H2><br><br><br></strong>
+    
+    <%
+    	List itemList = inventoryManager.getItems();
+    	if(itemList.size() > 0){
+    	
+    %>    
+	<TABLE width="90%" border="0" bgcolor="cyan">
+	<TR>
+	<TD><strong>Item Number</strong></TD>
+	<TD><strong>Item Name</strong></TD>
+	<TD><strong>Description</strong></TD>
+	<TD><strong>Quantity</strong></TD>   
+	</TR>
+	<% 
+		for(int i=0; i<itemList.size(); i++){
+			List item = (List)itemList.get(i);
+			
+			String itemNo = (String)item.get(0);
+			String itemName = (String)item.get(1);
+			String description = (String)item.get(2);
+			String quantity = (String)item.get(3);
+	%>	
+	<TR>
+	<TD><%=itemNo%></TD>
+	<TD><%=itemName%></TD>
+	<TD><%=description%></TD>
+	<TD><%=quantity%></TD>
+	</TR>
+	<%	}%>
+	</TABLE>
+	<%}%>
+	  <br>
+      <br>
+    <TABLE>
+      <TR>
+       <TD><A href="jsp/add.jsp">Add Items </A></TD>
+       <TD><A href="jsp/recv.jsp">Recieving</A></TD>
+       <TD><A href="jsp/issue.jsp">Issueing</A></TD>       
+      </TR>
+    </TABLE>      
+    </div>
+    <strong><br><br><br></strong>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/inventory/inventory-war/src/main/webapp/welcome.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/samples/trunk/samples/inventory/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/pom.xml?rev=586130&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/inventory/pom.xml (added)
+++ geronimo/samples/trunk/samples/inventory/pom.xml Thu Oct 18 13:55:42 2007
@@ -0,0 +1,76 @@
+<?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: 550875 $ $Date: 2007-06-26 13:40:09 -0400 (Tue, 26 Jun 2007) $ -->
+
+<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>samples</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    
+    <artifactId>inventory</artifactId>
+    <name>Geronimo Samples :: inventory</name>
+    <packaging>pom</packaging>
+    
+    <description>
+        Geronimo inventory sample created from an archetype.
+    </description>
+    
+   <modules>
+        <module>inventory-war</module>
+        <module>inventory-ear</module>
+    </modules>
+
+   <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                  <outputDirectory>${project.basedir}/docs</outputDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>apache-snapshots</id>
+            <name>Apache Snapshots Repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories> 
+
+</project>

Propchange: geronimo/samples/trunk/samples/inventory/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message