geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r942644 [1/2] - in /geronimo/samples/trunk/samples/javaee6: ./ restfulorder-javaee6/ restfulorder-javaee6/restfulorder-javaee6-jetty/ restfulorder-javaee6/restfulorder-javaee6-jetty/src/ restfulorder-javaee6/restfulorder-javaee6-jetty/src/m...
Date Mon, 10 May 2010 02:10:10 GMT
Author: xiaming
Date: Mon May 10 02:10:08 2010
New Revision: 942644

URL: http://svn.apache.org/viewvc?rev=942644&view=rev
Log:
GERONIMO-5275 A sample to demo restful service provided by LiWenQin

Added:
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_openjpa.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/WEB-INF/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/WEB-INF/web.xml   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/header.html   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/index.html   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/Support.js   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/addOrder.html   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/editOrder.jsp   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/restfulorder/
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/restfulorder/RestfulOrderControl.js   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/restfulorder/Restfulorder.js   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/restfulorder/Restfulorders.js   (with props)
    geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/webapp/rest/showAll.html   (with props)
Modified:
    geronimo/samples/trunk/samples/javaee6/pom.xml

Modified: geronimo/samples/trunk/samples/javaee6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/pom.xml?rev=942644&r1=942643&r2=942644&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/pom.xml (original)
+++ geronimo/samples/trunk/samples/javaee6/pom.xml Mon May 10 02:10:08 2010
@@ -47,6 +47,17 @@
         <jpaDeployer>org.apache.geronimo.configs/persistence-jpa20-deployer/${geronimoVersion}/car</jpaDeployer>
     </properties>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>myfaces</artifactId>
+                <version>${geronimoVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     
     <dependencies>
         <!-- Java EE 6 specs common for all samples -->
@@ -163,6 +174,7 @@
                 <module>jarresource-javaee6</module>
                 <module>webfragment-javaee6</module>
                 <module>singletonejb-javaee6</module>
+                <module>restfulorder-javaee6</module>
             </modules>
         </profile>
         <profile>
@@ -183,6 +195,7 @@
                 <module>jarresource-javaee6</module>
                 <module>webfragment-javaee6</module>
                 <module>singletonejb-javaee6</module>
+                <module>restfulorder-javaee6</module>
             </modules>
         </profile>
     </profiles>  

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,84 @@
+<?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>javaee6</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>restfulorder-javaee6</artifactId>
+    <name>Geronimo Samples :: restfulorder-javaee6</name>
+    <packaging>pom</packaging>
+    <version>3.0-SNAPSHOT</version>
+    
+    <description>
+        Geronimo restfulorder-javaee6 sample created from an archetype.
+    </description>
+    
+   <modules>
+
+    </modules>
+
+   <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                  <outputDirectory>${project.basedir}/docs</outputDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+	
+	<profiles>
+        <profile>
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>restfulorder-javaee6-war</module>
+                <module>restfulorder-javaee6-jetty</module>
+                <module>restfulorder-javaee6-tomcat</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>no-plugin</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>        
+                <property>
+                    <name>buildPlugin</name>
+                    <value>false</value>
+                </property>        
+            </activation>
+            <modules>
+                <module>restfulorder-javaee6-war</module>
+            </modules>
+        </profile>
+    </profiles>   
+</project>

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

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,116 @@
+<?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>restfulorder-javaee6</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>restfulorder-javaee6-jetty</artifactId>
+    <name>Geronimo Samples :: restfulorder-javaee6 Plugin for Jetty</name>
+    <packaging>car</packaging>
+
+    <description>Geronimo Samples. restfulorder-javaee6 Plugin for Jetty</description>
+
+    <dependencies>
+
+		<dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>cviewer-javaee6-war</artifactId>
+            <version>${version}</version>
+            <type>war</type>
+        </dependency>	
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>${jetty}-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>persistence-jpa20-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>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
+                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
+                        <deploymentConfig>${jettyDeployer}</deploymentConfig>
+                        <deploymentConfig>${jasperDeployer}</deploymentConfig>
+                        <deploymentConfig>${jpaDeployer}</deploymentConfig>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.samples</groupId>
+                        <artifactId>restfulorder-javaee6-war</artifactId>
+                        <version>3.0-SNAPSHOT</version>
+                        <type>war</type>
+                    </module>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,34 @@
+<?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$ -->
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
+
+   <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+      <dep:moduleId>
+         <dep:groupId>${pom.groupId}</dep:groupId>
+         <dep:artifactId>${pom.artifactId}</dep:artifactId>
+         <dep:version>${version}</dep:version>
+         <dep:type>car</dep:type>
+      </dep:moduleId>
+
+   </dep:environment>
+   
+</application>
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-jetty/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,108 @@
+<?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>restfulorder-javaee6</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>restfulorder-javaee6-tomcat</artifactId>
+    <name>Geronimo Samples :: restfulorder-javaee6 Plugin for Tomcat</name>
+    <packaging>car</packaging>
+
+    <description>Geronimo Samples. restfulorder-javaee6 Plugin for Tomcat</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.samples</groupId>
+            <artifactId>cviewer-javaee6-war</artifactId>
+            <version>${version}</version>
+            <type>war</type>
+        </dependency>
+		
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>tomcat-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>
+
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${pom.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        
+        <plugins>
+            <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>
+                    </deploymentConfigs>
+                    <module>
+                        <groupId>org.apache.geronimo.samples</groupId>
+                        <artifactId>restfulorder-javaee6-war</artifactId>
+                        <version>3.0-SNAPSHOT</version>
+                        <type>war</type>
+                    </module>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+</project>
+

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,34 @@
+<?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$ -->
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
+
+   <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+      <dep:moduleId>
+         <dep:groupId>${pom.groupId}</dep:groupId>
+         <dep:artifactId>${pom.artifactId}</dep:artifactId>
+         <dep:version>${version}</dep:version>
+         <dep:type>car</dep:type>
+      </dep:moduleId>
+
+   </dep:environment>
+   
+</application>

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-tomcat/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,198 @@
+<?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>restfulorder-javaee6</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>restfulorder-javaee6-war</artifactId>
+    <name>Geronimo Samples :: restfulorder-javaee6 :: WAR</name>
+    <packaging>war</packaging>
+
+    <description>Geronimo Samples. WEB Module</description>
+
+    <dependencies>
+        <dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-jpa_2.0_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+        <dependency>
+			<groupId>org.apache.servicemix.specs</groupId>
+			<artifactId>org.apache.servicemix.specs.jsr311-api-1.1</artifactId>
+			<version>1.4-SNAPSHOT</version>
+			<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}-3.0-SNAPSHOT" 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>                    
+				</configuration>
+			</plugin>
+        </plugins>
+    </build>
+
+	<profiles>
+			<profile>
+			<id>openjpa</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-antrun-plugin</artifactId>
+						<executions>
+							<execution>
+								<phase>process-resources</phase>
+								<id>rename-persistence-file</id>
+								<goals>
+									<goal>run</goal>
+								</goals>
+								<configuration>
+									<tasks>
+										<echo>Rename persistence-openjpa.xml to persistence.xml</echo>
+										<copy
+											file="${basedir}/src/main/resources/META-INF/persistence_openjpa.xml"
+											tofile="${project.build.directory}/${pom.artifactId}-${version}/WEB-INF/classes/META-INF/persistence.xml"
+											overwrite="true" />
+									</tasks>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+	</profile>
+	<profile>
+			<id>hibernate</id>
+			<activation>
+				<activeByDefault>false</activeByDefault>
+				<property>
+					<name>JPAProvider</name>
+					<value>hibernate</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-antrun-plugin</artifactId>
+						<executions>
+							<execution>
+								<phase>process-resources</phase>
+								<id>rename-persistence-file</id>
+								<goals>
+									<goal>run</goal>
+								</goals>
+								<configuration>
+									<tasks>
+										<echo>Rename persistence-hibernate.xml to persistence.xml</echo>
+										<copy
+											file="${basedir}/src/main/resources/META-INF/persistence_hibernate.xml"
+											tofile="${project.build.directory}/${pom.artifactId}-${version}/WEB-INF/classes/META-INF/persistence.xml"
+											overwrite="true" />
+									</tasks>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+	</profile>
+	<profile>
+			<id>eclipselink</id>
+			<activation>
+				<activeByDefault>false</activeByDefault>
+				<property>
+					<name>JPAProvider</name>
+					<value>eclipselink</value>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-antrun-plugin</artifactId>
+						<executions>
+							<execution>
+								<phase>process-resources</phase>
+								<id>rename-persistence-file</id>
+								<goals>
+									<goal>run</goal>
+								</goals>
+								<configuration>
+									<tasks>
+										<echo>Rename persistence-eclipselink.xml to persistence.xml</echo>
+										<copy
+											file="${basedir}/src/main/resources/META-INF/persistence_eclipselink.xml"
+											tofile="${project.build.directory}/${pom.artifactId}-${version}/WEB-INF/classes/META-INF/persistence.xml"
+											overwrite="true" />
+									</tasks>
+								</configuration>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+	</profile>
+	</profiles>
+
+</project>

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

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java Mon May 10 02:10:08 2010
@@ -0,0 +1,58 @@
+/**
+ * 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.javaee6.restfulorder.JPASessionBeans;
+
+import java.util.List;
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Root;
+import org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder;
+
+@Stateless
+public class RestfulorderFacade {
+
+    @PersistenceContext(unitName = "RestfulProduct2PU")
+    private EntityManager em;
+
+    public void create(Restfulorder restfulorder) {
+        em.persist(restfulorder);
+    }
+
+    public void edit(Restfulorder restfulorder) {
+        em.merge(restfulorder);
+    }
+
+    public void remove(Restfulorder restfulorder) {
+        em.remove(em.merge(restfulorder));
+    }
+
+    public Restfulorder find(Object id) {
+        return em.find(Restfulorder.class, id);
+    }
+
+    public List<Restfulorder> findAll() {
+        CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
+        cq.select(cq.from(Restfulorder.class));
+        return em.createQuery(cq).getResultList();
+    }
+
+
+
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/JPASessionBeans/RestfulorderFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java Mon May 10 02:10:08 2010
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.samples.javaee6.restfulorder.config;
+
+@javax.ws.rs.ApplicationPath("resources")
+public class ApplicationConfig extends javax.ws.rs.core.Application {
+}
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/config/ApplicationConfig.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java Mon May 10 02:10:08 2010
@@ -0,0 +1,222 @@
+/**
+ * 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.javaee6.restfulorder.converter;
+
+import java.net.URI;
+import org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.ws.rs.core.UriBuilder;
+import javax.persistence.EntityManager;
+
+
+
+@XmlRootElement(name = "restfulorder")
+public class RestfulorderConverter {
+    private Restfulorder entity;
+    private URI uri;
+    private int expandLevel;
+  
+    /** Creates a new instance of RestfulorderConverter */
+    public RestfulorderConverter() {
+        entity = new Restfulorder();
+    }
+
+    /**
+     * Creates a new instance of RestfulorderConverter.
+     *
+     * @param entity associated entity
+     * @param uri associated uri
+     * @param expandLevel indicates the number of levels the entity graph should be expanded@param isUriExtendable indicates whether the uri can be extended
+     */
+    public RestfulorderConverter(Restfulorder entity, URI uri, int expandLevel, boolean isUriExtendable) {
+        this.entity = entity;
+        this.uri = (isUriExtendable) ? UriBuilder.fromUri(uri).path(entity.getId() + "/").build() : uri;
+        this.expandLevel = expandLevel;
+    }
+
+    /**
+     * Creates a new instance of RestfulorderConverter.
+     *
+     * @param entity associated entity
+     * @param uri associated uri
+     * @param expandLevel indicates the number of levels the entity graph should be expanded
+     */
+    public RestfulorderConverter(Restfulorder entity, URI uri, int expandLevel) {
+        this(entity, uri, expandLevel, false);
+    }
+
+    /**
+     * Getter for id.
+     *
+     * @return value for id
+     */
+    @XmlElement
+    public Integer getId() {
+        return (expandLevel > 0) ? entity.getId() : null;
+    }
+
+    /**
+     * Setter for id.
+     *
+     * @param value the value to set
+     */
+    public void setId(Integer value) {
+        entity.setId(value);
+    }
+
+    /**
+     * Getter for customer.
+     *
+     * @return value for customer
+     */
+    @XmlElement
+    public String getCustomer() {
+        return (expandLevel > 0) ? entity.getCustomer() : null;
+    }
+
+    /**
+     * Setter for customer.
+     *
+     * @param value the value to set
+     */
+    public void setCustomer(String value) {
+        entity.setCustomer(value);
+    }
+
+    /**
+     * Getter for seller.
+     *
+     * @return value for seller
+     */
+    @XmlElement
+    public String getSeller() {
+        return (expandLevel > 0) ? entity.getSeller() : null;
+    }
+
+    /**
+     * Setter for seller.
+     *
+     * @param value the value to set
+     */
+    public void setSeller(String value) {
+        entity.setSeller(value);
+    }
+
+    /**
+     * Getter for productname.
+     *
+     * @return value for productname
+     */
+    @XmlElement
+    public String getProductname() {
+        return (expandLevel > 0) ? entity.getProductname() : null;
+    }
+
+    /**
+     * Setter for productname.
+     *
+     * @param value the value to set
+     */
+    public void setProductname(String value) {
+        entity.setProductname(value);
+    }
+
+    /**
+     * Getter for price.
+     *
+     * @return value for price
+     */
+    @XmlElement
+    public Double getPrice() {
+        return (expandLevel > 0) ? entity.getPrice() : null;
+    }
+
+    /**
+     * Setter for price.
+     *
+     * @param value the value to set
+     */
+    public void setPrice(Double value) {
+        entity.setPrice(value);
+    }
+
+    /**
+     * Getter for quantity.
+     *
+     * @return value for quantity
+     */
+    @XmlElement
+    public Integer getQuantity() {
+        return (expandLevel > 0) ? entity.getQuantity() : null;
+    }
+
+    /**
+     * Setter for quantity.
+     *
+     * @param value the value to set
+     */
+    public void setQuantity(Integer value) {
+        entity.setQuantity(value);
+    }
+
+    /**
+     * Returns the URI associated with this converter.
+     *
+     * @return the uri
+     */
+    @XmlAttribute
+    public URI getUri() {
+        return uri;
+    }
+
+    /**
+     * Sets the URI for this reference converter.
+     *
+     */
+    public void setUri(URI uri) {
+        this.uri = uri;
+    }
+
+    /**
+     * Returns the Restfulorder entity.
+     *
+     * @return an entity
+     */
+    @XmlTransient
+    public Restfulorder getEntity() {
+        if (entity.getId() == null) {
+            RestfulorderConverter converter = UriResolver.getInstance().resolve(RestfulorderConverter.class, uri);
+            if (converter != null) {
+                entity = converter.getEntity();
+            }
+        }
+        return entity;
+    }
+
+    /**
+     * Returns the resolved Restfulorder entity.
+     *
+     * @return an resolved entity
+     */
+    public Restfulorder resolveEntity(EntityManager em) {
+        return entity;
+    }
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulorderConverter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java Mon May 10 02:10:08 2010
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.samples.javaee6.restfulorder.converter;
+
+import java.net.URI;
+import java.util.Collection;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlAttribute;
+import java.util.ArrayList;
+import org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder;
+
+@XmlRootElement(name = "restfulorders")
+public class RestfulordersConverter {
+    private Collection<Restfulorder> entities;
+    private Collection<RestfulorderConverter> items;
+    private URI uri;
+    private int expandLevel;
+  
+    /** Creates a new instance of RestfulordersConverter */
+    public RestfulordersConverter() {
+    }
+
+    /**
+     * Creates a new instance of RestfulordersConverter.
+     *
+     * @param entities associated entities
+     * @param uri associated uri
+     * @param expandLevel indicates the number of levels the entity graph should be expanded
+     */
+    public RestfulordersConverter(Collection<Restfulorder> entities, URI uri, int expandLevel) {
+        this.entities = entities;
+        this.uri = uri;
+        this.expandLevel = expandLevel;
+        getRestfulorder();
+    }
+
+    /**
+     * Returns a collection of RestfulorderConverter.
+     *
+     * @return a collection of RestfulorderConverter
+     */
+    @XmlElement
+    public Collection<RestfulorderConverter> getRestfulorder() {
+        if (items == null) {
+            items = new ArrayList<RestfulorderConverter>();
+        }
+        if (entities != null) {
+            items.clear();
+            for (Restfulorder entity : entities) {
+                items.add(new RestfulorderConverter(entity, uri, expandLevel, true));
+            }
+        }
+        return items;
+    }
+
+    /**
+     * Sets a collection of RestfulorderConverter.
+     *
+     * @param a collection of RestfulorderConverter to set
+     */
+    public void setRestfulorder(Collection<RestfulorderConverter> items) {
+        this.items = items;
+    }
+
+    /**
+     * Returns the URI associated with this converter.
+     *
+     * @return the uri
+     */
+    @XmlAttribute
+    public URI getUri() {
+        return uri;
+    }
+
+    /**
+     * Returns a collection Restfulorder entities.
+     *
+     * @return a collection of Restfulorder entities
+     */
+    @XmlTransient
+    public Collection<Restfulorder> getEntities() {
+        entities = new ArrayList<Restfulorder>();
+        if (items != null) {
+            for (RestfulorderConverter item : items) {
+                entities.add(item.getEntity());
+            }
+        }
+        return entities;
+    }
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/RestfulordersConverter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java Mon May 10 02:10:08 2010
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.samples.javaee6.restfulorder.converter;
+
+import javax.ws.rs.WebApplicationException;
+import java.net.HttpURLConnection;
+import java.net.URI;
+import java.net.URL;
+import javax.xml.bind.JAXBContext;
+
+public class UriResolver {
+    
+    private static ThreadLocal<UriResolver> instance = new ThreadLocal<UriResolver>() {
+        protected UriResolver initialValue() {
+            return new UriResolver();
+        }
+    };
+    
+    private boolean inProgress = false;
+    
+    private UriResolver() {
+    }
+    
+    /**
+     * Returns an instance of UriResolver.
+     *
+     * @return an instance of UriResolver.
+     */
+    public static UriResolver getInstance() {
+        return instance.get();
+    }
+    
+    private static void removeInstance() {
+        instance.remove();
+    }
+    
+    /**
+     * Returns the entity associated with the given uri.
+     *
+     * @param type the converter class used to unmarshal the entity from XML
+     * @param uri the uri identifying the entity
+     * @return the entity associated with the given uri
+     */
+    public <T> T resolve(Class<T> type, URI uri) {
+        if (inProgress) return null;
+        
+        inProgress = true;
+        
+        try {
+            if (uri == null) {
+                throw new RuntimeException("No uri specified in a reference.");
+            }
+            
+            URL url = uri.toURL();
+            HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+            conn.setRequestMethod("GET");
+            
+            if (conn.getResponseCode() == 200) {
+                JAXBContext context = JAXBContext.newInstance(type);
+
+                return (T) context.createUnmarshaller().unmarshal(conn.getInputStream());
+            } else {
+                throw new WebApplicationException(new Throwable("Resource for " + uri + " does not exist."), 404);
+            }
+        } catch (WebApplicationException ex) {
+            throw ex;
+        } catch (Exception ex) {
+            throw new WebApplicationException(ex);
+        } finally {
+            removeInstance();
+        }
+    }
+}
\ No newline at end of file

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/converter/UriResolver.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java Mon May 10 02:10:08 2010
@@ -0,0 +1,136 @@
+/**
+ * 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.javaee6.restfulorder.entities;
+
+import java.io.Serializable;
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+
+@Entity
+@Table(name = "RESTFULORDER")
+@NamedQueries({
+    @NamedQuery(name = "Restfulorder.findAll", query = "SELECT r FROM Restfulorder r"),
+    @NamedQuery(name = "Restfulorder.findById", query = "SELECT r FROM Restfulorder r WHERE r.id = :id"),
+    @NamedQuery(name = "Restfulorder.findByCustomer", query = "SELECT r FROM Restfulorder r WHERE r.customer = :customer"),
+    @NamedQuery(name = "Restfulorder.findBySeller", query = "SELECT r FROM Restfulorder r WHERE r.seller = :seller"),
+    @NamedQuery(name = "Restfulorder.findByProductname", query = "SELECT r FROM Restfulorder r WHERE r.productname = :productname"),
+    @NamedQuery(name = "Restfulorder.findByPrice", query = "SELECT r FROM Restfulorder r WHERE r.price = :price"),
+    @NamedQuery(name = "Restfulorder.findByQuantity", query = "SELECT r FROM Restfulorder r WHERE r.quantity = :quantity")})
+public class Restfulorder implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @Id
+    @Basic(optional = false)
+    @Column(name = "ID")
+    private Integer id;
+    @Column(name = "CUSTOMER")
+    private String customer;
+    @Column(name = "SELLER")
+    private String seller;
+    @Column(name = "PRODUCTNAME")
+    private String productname;
+    @Column(name = "PRICE")
+    private Double price;
+    @Column(name = "QUANTITY")
+    private Integer quantity;
+
+    public Restfulorder() {
+    }
+
+    public Restfulorder(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(String customer) {
+        this.customer = customer;
+    }
+
+    public String getSeller() {
+        return seller;
+    }
+
+    public void setSeller(String seller) {
+        this.seller = seller;
+    }
+
+    public String getProductname() {
+        return productname;
+    }
+
+    public void setProductname(String productname) {
+        this.productname = productname;
+    }
+
+    public Double getPrice() {
+        return price;
+    }
+
+    public void setPrice(Double price) {
+        this.price = price;
+    }
+
+    public Integer getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(Integer quantity) {
+        this.quantity = quantity;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (id != null ? id.hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof Restfulorder)) {
+            return false;
+        }
+        Restfulorder other = (Restfulorder) object;
+        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "org.apache.geronimo.samples.entities.Restfulorder[id=" + id + "]";
+    }
+
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/entities/Restfulorder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java Mon May 10 02:10:08 2010
@@ -0,0 +1,126 @@
+/**
+ * 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.javaee6.restfulorder.service;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.Produces;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.WebApplicationException;
+import javax.persistence.NoResultException;
+import javax.persistence.EntityManager;
+import org.apache.geronimo.samples.javaee6.restfulorder.converter.RestfulorderConverter;
+import javax.ejb.Stateless;
+import org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder;
+
+
+@Stateless
+public class RestfulorderResource {
+    @Context
+    protected UriInfo uriInfo;
+    protected EntityManager em;
+    protected Integer id;
+  
+    /** Creates a new instance of RestfulorderResource */
+    public RestfulorderResource() {
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public void setEm(EntityManager em) {
+        this.em = em;
+    }
+
+    /**
+     * Get method for retrieving an instance of Restfulorder identified by id in XML format.
+     *
+     * @param id identifier for the entity
+     * @return an instance of RestfulorderConverter
+     */
+    @GET
+    @Produces({"application/xml", "application/json"})
+    public RestfulorderConverter get(@QueryParam("expandLevel")
+                                     @DefaultValue("1")
+    int expandLevel) {
+        return new RestfulorderConverter(getEntity(), uriInfo.getAbsolutePath(), expandLevel);
+    }
+
+    /**
+     * Put method for updating an instance of Restfulorder identified by id using XML as the input format.
+     *
+     * @param id identifier for the entity
+     * @param data an RestfulorderConverter entity that is deserialized from a XML stream
+     */
+    @PUT
+    @Consumes({"application/xml", "application/json"})
+    public void put(RestfulorderConverter data) {
+        updateEntity(getEntity(), data.resolveEntity(em));
+    }
+
+    /**
+     * Delete method for deleting an instance of Restfulorder identified by id.
+     *
+     * @param id identifier for the entity
+     */
+    @DELETE
+    public void delete() {
+        deleteEntity(getEntity());
+    }
+
+    /**
+     * Returns an instance of Restfulorder identified by id.
+     *
+     * @param id identifier for the entity
+     * @return an instance of Restfulorder
+     */
+    protected Restfulorder getEntity() {
+        try {
+            return (Restfulorder) em.createQuery("SELECT e FROM Restfulorder e where e.id = :id").setParameter("id", id).getSingleResult();
+        } catch (NoResultException ex) {
+            throw new WebApplicationException(new Throwable("Resource for " + uriInfo.getAbsolutePath() + " does not exist."), 404);
+        }
+    }
+
+    /**
+     * Updates entity using data from newEntity.
+     *
+     * @param entity the entity to update
+     * @param newEntity the entity containing the new data
+     * @return the updated entity
+     */
+    private Restfulorder updateEntity(Restfulorder entity, Restfulorder newEntity) {
+        entity = em.merge(newEntity);
+        return entity;
+    }
+
+    /**
+     * Deletes the entity.
+     *
+     * @param entity the entity to deletle
+     */
+    private void deleteEntity(Restfulorder entity) {
+        em.remove(entity);
+    }
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulorderResource.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java Mon May 10 02:10:08 2010
@@ -0,0 +1,118 @@
+/**
+ * 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.javaee6.restfulorder.service;
+
+import java.util.Collection;
+import javax.ws.rs.Path;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Produces;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+import javax.persistence.EntityManager;
+import org.apache.geronimo.samples.javaee6.restfulorder.converter.RestfulordersConverter;
+import org.apache.geronimo.samples.javaee6.restfulorder.converter.RestfulorderConverter;
+import javax.persistence.PersistenceContext;
+import javax.ejb.Stateless;
+import org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder;
+
+
+@Path("/restfulorders/")
+@Stateless
+public class RestfulordersResource {
+    @javax.ejb.EJB
+    private RestfulorderResource restfulorderResource;
+    @Context
+    protected UriInfo uriInfo;
+    @PersistenceContext(unitName = "RestfulProduct2PU")
+    protected EntityManager em;
+  
+    /** Creates a new instance of RestfulordersResource */
+    public RestfulordersResource() {
+    }
+
+    /**
+     * Get method for retrieving a collection of Restfulorder instance in XML format.
+     *
+     * @return an instance of RestfulordersConverter
+     */
+    @GET
+    @Produces({"application/xml", "application/json"})
+    public RestfulordersConverter get(@QueryParam("start")
+                                      @DefaultValue("0")
+    int start, @QueryParam("max")
+               @DefaultValue("10")
+    int max, @QueryParam("expandLevel")
+             @DefaultValue("1")
+    int expandLevel, @QueryParam("query")
+                     @DefaultValue("SELECT e FROM Restfulorder e")
+    String query) {
+        return new RestfulordersConverter(getEntities(start, max, query), uriInfo.getAbsolutePath(), expandLevel);
+    }
+
+    /**
+     * Post method for creating an instance of Restfulorder using XML as the input format.
+     *
+     * @param data an RestfulorderConverter entity that is deserialized from an XML stream
+     * @return an instance of RestfulorderConverter
+     */
+    @POST
+    @Consumes({"application/xml", "application/json"})
+    public Response post(RestfulorderConverter data) {
+        System.out.println("before resolve,in post");
+        Restfulorder entity = data.resolveEntity(em);
+        createEntity(data.resolveEntity(em));
+        return Response.created(uriInfo.getAbsolutePath().resolve(entity.getId() + "/")).build();
+    }
+
+    /**
+     * Returns a dynamic instance of RestfulorderResource used for entity navigation.
+     *
+     * @return an instance of RestfulorderResource
+     */
+    @Path("{id}/")
+    public RestfulorderResource getRestfulorderResource(@PathParam("id")
+    Integer id) {
+        restfulorderResource.setId(id);
+        restfulorderResource.setEm(em);
+        return restfulorderResource;
+    }
+
+    /**
+     * Returns all the entities associated with this resource.
+     *
+     * @return a collection of Restfulorder instances
+     */
+    protected Collection<Restfulorder> getEntities(int start, int max, String query) {
+        return em.createQuery(query).setFirstResult(start).setMaxResults(max).getResultList();
+    }
+
+    /**
+     * Persist the given entity.
+     *
+     * @param entity the entity to persist
+     */
+    protected void createEntity(Restfulorder entity) {
+        em.persist(entity);
+    }
+}

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/restfulorder/service/RestfulordersResource.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,36 @@
+<?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.
+-->
+
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+  <persistence-unit name="RestfulProduct2PU" transaction-type="JTA">
+    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+    <class>org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder</class>
+    <exclude-unlisted-classes>true</exclude-unlisted-classes>
+    <properties>
+      <property name="eclipselink.jdbc.platform" value="org.eclipse.persistence.platform.database.DerbyPlatform"/>
+      <property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
+      <property name="eclipselink.target-database" value="Derby"/>            
+      <property name="eclipselink.jdbc.url" value="jdbc:derby://localhost:1527/restfuldemodb;create=true"/>
+      <property name="eclipselink.jdbc.user" value="APP"/>
+      <property name="eclipselink.jdbc.password" value="APP"/>
+      <property name="eclipselink.logging.level" value="FINEST"/>            
+      <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
+      <property name="eclipselink.ddl-generation.output-mode" value="database"/>      
+    </properties>
+  </persistence-unit>
+</persistence>

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_eclipselink.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml?rev=942644&view=auto
==============================================================================
--- geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml (added)
+++ geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml Mon May 10 02:10:08 2010
@@ -0,0 +1,34 @@
+<?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.
+-->
+
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+  <persistence-unit name="RestfulProduct2PU" transaction-type="JTA">
+    <provider>org.hibernate.ejb.HibernatePersistence</provider>
+    <class>org.apache.geronimo.samples.javaee6.restfulorder.entities.Restfulorder</class>
+    <exclude-unlisted-classes>true</exclude-unlisted-classes>
+    <properties>
+      <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.ClientDriver"/>
+      <property name="hibernate.connection.url" value="jdbc:derby://localhost:1527/restfuldemodb"/>
+      <property name="hibernate.connection.username" value="APP"/>
+      <property name="hibernate.connection.password" value="APP"/>
+      <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
+      <property name="hibernate.show_sql" value="true"/>
+      <property name="hibernate.hbm2ddl.auto" value="create"/>
+    </properties>
+  </persistence-unit>
+</persistence>

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/samples/trunk/samples/javaee6/restfulorder-javaee6/restfulorder-javaee6-war/src/main/resources/META-INF/persistence_hibernate.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message