[jboss-cvs] JBossAS SVN: r77754 - in trunk/testsuite: imports and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 1 10:25:24 EDT 2008


Author: adrian at jboss.org
Date: 2008-09-01 10:25:24 -0400 (Mon, 01 Sep 2008)
New Revision: 77754

Added:
   trunk/testsuite/imports/sections/jpa.xml
   trunk/testsuite/src/main/org/jboss/test/jpa/
   trunk/testsuite/src/main/org/jboss/test/jpa/servlet/
   trunk/testsuite/src/main/org/jboss/test/jpa/servlet/TestServlet.java
   trunk/testsuite/src/main/org/jboss/test/jpa/support/
   trunk/testsuite/src/main/org/jboss/test/jpa/support/TestEntity.java
   trunk/testsuite/src/main/org/jboss/test/jpa/test/
   trunk/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java
   trunk/testsuite/src/main/org/jboss/test/jpa/test/WebClassesJPAUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jpa/test/WebLibsJPAUnitTestCase.java
   trunk/testsuite/src/resources/jpa/
   trunk/testsuite/src/resources/jpa/webclasses/
   trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/
   trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/
   trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/META-INF/
   trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/META-INF/persistence.xml
   trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/jpa/webclasses/web.xml
   trunk/testsuite/src/resources/jpa/weblibs/
   trunk/testsuite/src/resources/jpa/weblibs/META-INF/
   trunk/testsuite/src/resources/jpa/weblibs/META-INF/persistence.xml
   trunk/testsuite/src/resources/jpa/weblibs/WEB-INF/
   trunk/testsuite/src/resources/jpa/weblibs/WEB-INF/jboss-web.xml
   trunk/testsuite/src/resources/jpa/weblibs/web.xml
Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/test-jars.xml
Log:
[JBAS-5912] - Tests for persistence.xml in classes/META-INF and lib/*.jar

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2008-09-01 13:48:37 UTC (rev 77753)
+++ trunk/testsuite/build.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -205,6 +205,7 @@
       <path refid="jboss.j2se.classpath"/>
       <path refid="jboss.jboss.jaspi.api.classpath"/>
       <path refid="jboss.jboss.javaee.classpath"/>
+      <path refid="org.jboss.javaee.classpath"/>
       <path refid="jboss.jboss.vfs.classpath"/>
       <path refid="jboss.jca.classpath"/>
       <path refid="jboss.jmx.classpath"/>

Added: trunk/testsuite/imports/sections/jpa.xml
===================================================================
--- trunk/testsuite/imports/sections/jpa.xml	                        (rev 0)
+++ trunk/testsuite/imports/sections/jpa.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,41 @@
+<project name="tests-jpa-jars">
+
+   <target name="_jars-jpa">
+      <mkdir dir="${build.lib}"/>
+
+      <war warfile="${build.lib}/test-jpa-webclasses.war"
+         webxml="${build.resources}/jpa/webclasses/web.xml">
+         <webinf dir="${build.resources}/jpa/webclasses/WEB-INF">
+            <include name="**"/>
+         </webinf>
+         <classes dir="${build.classes}">
+            <include name="org/jboss/test/jpa/servlet/TestServlet.class"/>
+            <include name="org/jboss/test/jpa/support/TestEntity.class"/>
+         </classes>
+      </war>
+
+      <jar destfile="${build.lib}/test-jpa-weblibs.jar">
+         <fileset dir="${build.resources}/jpa/weblibs">
+            <include name="META-INF/**"/>
+         </fileset>
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/jpa/support/TestEntity.class"/>
+         </fileset>
+      </jar>
+
+      <war warfile="${build.lib}/test-jpa-weblibs.war"
+         webxml="${build.resources}/jpa/weblibs/web.xml">
+         <webinf dir="${build.resources}/jpa/weblibs/WEB-INF">
+            <include name="**"/>
+         </webinf>
+         <classes dir="${build.classes}">
+            <include name="org/jboss/test/jpa/servlet/TestServlet.class"/>
+         </classes>
+         <lib dir="${build.lib}">
+            <include name="test-jpa-weblibs.jar"/>
+         </lib>
+      </war>
+
+   </target>
+
+</project>

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2008-09-01 13:48:37 UTC (rev 77753)
+++ trunk/testsuite/imports/test-jars.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -42,6 +42,7 @@
    <import file="sections/jms.xml"/>
    <import file="sections/jmsra.xml"/>
    <import file="sections/jmx.xml"/>
+   <import file="sections/jpa.xml"/>
    <import file="sections/jrmp.xml"/>
    <import file="sections/jsf.xml"/>
    <import file="sections/jsr77.xml"/>
@@ -133,6 +134,7 @@
         _jars-jms,
         _jars-jmsra,
         _jars-jmx,
+        _jars-jpa,
         _jars-jrmp,
         _jars-jsf,
         _jars-jsr77,

Added: trunk/testsuite/src/main/org/jboss/test/jpa/servlet/TestServlet.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jpa/servlet/TestServlet.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jpa/servlet/TestServlet.java	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.jpa.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.annotation.Resource;
+import javax.naming.InitialContext;
+import javax.persistence.EntityManager;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.transaction.UserTransaction;
+
+import org.jboss.test.jpa.support.TestEntity;
+
+/**
+ * TestServlet.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestServlet extends HttpServlet
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5539196377086639503L;
+
+   @Resource
+   private UserTransaction ut;
+   
+   protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+   {
+      try
+      {
+         ut.begin();
+         try
+         {
+            InitialContext ctx = new InitialContext();
+            EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/em");
+            
+            String mode = req.getParameter("mode");
+            if ("Write".equals(mode))
+            {
+               TestEntity test = new TestEntity("Hello", "World");
+               em.persist(test);
+            }
+            else
+            {
+               TestEntity test = em.find(TestEntity.class, "Hello");
+               resp.setContentType("text/plain");
+               PrintWriter out = resp.getWriter();
+               out.print(test.getDescription());
+               out.close();
+            }
+         }
+         catch (Exception e)
+         {
+            ut.setRollbackOnly();
+            throw e;
+         }
+         finally
+         {
+            ut.commit();
+         }
+      }
+      catch (Exception e)
+      {
+         throw new ServletException("Error", e);
+      }
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/jpa/support/TestEntity.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jpa/support/TestEntity.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jpa/support/TestEntity.java	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.jpa.support;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * TestEntity.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Entity
+public class TestEntity
+{
+   @Id private String name;
+   
+   private String description;
+
+   public TestEntity()
+   {
+   }
+   
+   public TestEntity(String name, String description)
+   {
+      setName(name);
+      setDescription(description);
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(String description)
+   {
+      this.description = description;
+   }
+   
+   
+}

Added: trunk/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.jpa.test;
+
+import java.net.HttpURLConnection;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * AbstractWebJPATest.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractWebJPATest extends JBossTestCase
+{
+   private String baseURL = "http://" + System.getProperty("jbosstest.server.host", "localhost") + ":" + Integer.getInteger("web.port", 8080) + "/jpa-test/Test?mode=";
+
+   public AbstractWebJPATest(String name)
+   {
+      super(name);
+   }
+   
+   public void testWebJPA() throws Exception
+   {
+      accessURL("Write");
+      assertEquals("World", accessURL("Read"));
+   }
+
+   public String accessURL(String url) throws Exception
+   {
+      HttpClient httpConn = new HttpClient();
+      HttpMethodBase request = new GetMethod(baseURL + url);
+      log.debug("RequestURI: " + request.getURI());
+      int responseCode = httpConn.executeMethod(request);
+      String response = request.getStatusText();
+      log.debug("responseCode="+responseCode+", response="+response);
+      String content = request.getResponseBodyAsString();
+      log.debug(content);
+      assertEquals(HttpURLConnection.HTTP_OK, responseCode);
+      return content;
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/jpa/test/WebClassesJPAUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jpa/test/WebClassesJPAUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jpa/test/WebClassesJPAUnitTestCase.java	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.jpa.test;
+
+import junit.framework.Test;
+
+/**
+ * WebClassesJPAUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebClassesJPAUnitTestCase extends AbstractWebJPATest
+{
+   public WebClassesJPAUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(WebClassesJPAUnitTestCase.class, "test-jpa-webclasses.war");
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/jpa/test/WebLibsJPAUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jpa/test/WebLibsJPAUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/jpa/test/WebLibsJPAUnitTestCase.java	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.jpa.test;
+
+import junit.framework.Test;
+
+/**
+ * WebLibsJPAUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebLibsJPAUnitTestCase extends AbstractWebJPATest
+{
+   public WebLibsJPAUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(WebLibsJPAUnitTestCase.class, "test-jpa-weblibs.war");
+   }
+}

Added: trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/META-INF/persistence.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/META-INF/persistence.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/classes/META-INF/persistence.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,15 @@
+<persistence 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_1_0.xsd"
+             version="1.0">
+
+   <persistence-unit name="test">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <class>org.jboss.test.jpa.support.TestEntity</class>
+      <properties>
+         <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+
+</persistence>

Added: trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/jboss-web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/webclasses/WEB-INF/jboss-web.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,7 @@
+<!DOCTYPE jboss-web
+    PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+    <context-root>jpa-test</context-root>
+</jboss-web>

Added: trunk/testsuite/src/resources/jpa/webclasses/web.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/webclasses/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/webclasses/web.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" 
+         xmlns="http://java.sun.com/xml/ns/javaee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+> 
+  <display-name>jpa test</display-name>
+  
+  
+   <servlet>
+      <servlet-name>TestServlet</servlet-name>
+      <servlet-class>org.jboss.test.jpa.servlet.TestServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>TestServlet</servlet-name>
+      <url-pattern>/Test</url-pattern>
+   </servlet-mapping>
+
+   <persistence-context-ref> 
+      <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
+      <persistence-unit-name>test</persistence-unit-name>
+    </persistence-context-ref>
+
+</web-app>

Added: trunk/testsuite/src/resources/jpa/weblibs/META-INF/persistence.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/weblibs/META-INF/persistence.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/weblibs/META-INF/persistence.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,15 @@
+<persistence 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_1_0.xsd"
+             version="1.0">
+
+   <persistence-unit name="test">
+      <jta-data-source>java:/DefaultDS</jta-data-source>
+      <class>org.jboss.test.jpa.support.TestEntity</class>
+      <properties>
+         <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      </properties>
+   </persistence-unit>
+
+</persistence>

Added: trunk/testsuite/src/resources/jpa/weblibs/WEB-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/weblibs/WEB-INF/jboss-web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/weblibs/WEB-INF/jboss-web.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,7 @@
+<!DOCTYPE jboss-web
+    PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+    <context-root>jpa-test</context-root>
+</jboss-web>

Added: trunk/testsuite/src/resources/jpa/weblibs/web.xml
===================================================================
--- trunk/testsuite/src/resources/jpa/weblibs/web.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/jpa/weblibs/web.xml	2008-09-01 14:25:24 UTC (rev 77754)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" 
+         xmlns="http://java.sun.com/xml/ns/javaee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+> 
+  <display-name>jpa test</display-name>
+  
+  
+   <servlet>
+      <servlet-name>TestServlet</servlet-name>
+      <servlet-class>org.jboss.test.jpa.servlet.TestServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>TestServlet</servlet-name>
+      <url-pattern>/Test</url-pattern>
+   </servlet-mapping>
+
+   <persistence-context-ref> 
+      <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
+      <persistence-unit-name>test</persistence-unit-name>
+    </persistence-context-ref>
+
+</web-app>




More information about the jboss-cvs-commits mailing list