[jboss-cvs] JBossAS SVN: r91359 - in projects/embedded/trunk/testsuite-full-dep/src/test: java/org/jboss/embedded/testsuite/fulldep/ejb3 and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 16 18:07:02 EDT 2009


Author: ALRubinger
Date: 2009-07-16 18:07:01 -0400 (Thu, 16 Jul 2009)
New Revision: 91359

Added:
   projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/
   projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/Jbossian.java
   projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarBean.java
   projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarLocalBusiness.java
   projects/embedded/trunk/testsuite-full-dep/src/test/resources/datasources/
   projects/embedded/trunk/testsuite-full-dep/src/test/resources/datasources/embedded-ds.xml
   projects/embedded/trunk/testsuite-full-dep/src/test/resources/persistence/
   projects/embedded/trunk/testsuite-full-dep/src/test/resources/persistence/persistenceEmbedded.xml
Modified:
   projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java
Log:
[EMB-32] Start looking into failures in @Entity.  Datasource stuff seems OK

Modified: projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java	2009-07-16 22:03:36 UTC (rev 91358)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/ServerTestCase.java	2009-07-16 22:07:01 UTC (rev 91359)
@@ -27,6 +27,7 @@
 import java.net.URI;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -57,6 +58,9 @@
 import org.jboss.embedded.core.incubation.virtual.spi.vfs.VirtualVfsArchive;
 import org.jboss.embedded.core.server.JBossASEmbeddedServer;
 import org.jboss.embedded.core.server.JBossASEmbeddedServerImpl;
+import org.jboss.embedded.testsuite.fulldep.ejb3.entity.Jbossian;
+import org.jboss.embedded.testsuite.fulldep.ejb3.entity.JbossianRegistrarBean;
+import org.jboss.embedded.testsuite.fulldep.ejb3.entity.JbossianRegistrarLocalBusiness;
 import org.jboss.embedded.testsuite.fulldep.ejb3.mdb.MessageStoringMdb;
 import org.jboss.embedded.testsuite.fulldep.ejb3.slsb.OutputBean;
 import org.jboss.embedded.testsuite.fulldep.ejb3.slsb.OutputLocalBusiness;
@@ -141,6 +145,31 @@
    private static final String PATH_JSP = "jsp/requestParamEcho.jsp";
 
    /**
+    * Path, relative to the resources base, of a persistence.xml file for Embedded DataSource
+    */
+   private static final String PATH_RESOURCE_PERSISTENCE_XML_EMBEDDED = "persistence/persistenceEmbedded.xml";
+
+   /**
+    * Path, relative to the deployment root, of a persistence.xml file
+    */
+   private static final String PATH_DESTINATION_PERSISTENCE_XML = "META-INF/persistence.xml";
+
+   /**
+    * Path, relative to the resources base, of the directory containing DataSource resources
+    */
+   private static final String PATH_RESOURCE_DS_XMLs = "datasources/";
+
+   /**
+    * Filename of the Embedded DataSource deployment XML
+    */
+   private static final String FILENAME_EMBEDDED_DS = "embedded-ds.xml";
+
+   /**
+    * Path, relative to the resources base, of the directory containing DataSource resources
+    */
+   private static final String PATH_RESOURCE_DS_XML_EMBEDDED = PATH_RESOURCE_DS_XMLs + FILENAME_EMBEDDED_DS;
+
+   /**
     * Separator character within archives
     */
    private static final char SEPARATOR = '/';
@@ -155,6 +184,11 @@
     */
    private static final String JNDI_NAME_CONNECTION_FACTORY = "ConnectionFactory";
 
+   /**
+    * JNDI name suffix appended to local business EJB3 views
+    */
+   private static final String JNDI_SUFFIX_LOCAL_BUSINESS = "/local";
+
    //-------------------------------------------------------------------------------||
    // Lifecycle --------------------------------------------------------------------||
    //-------------------------------------------------------------------------------||
@@ -201,18 +235,17 @@
    //-------------------------------------------------------------------------------||
 
    /**
-    * Tests virtual deployment by constructing an in-memory unit 
-    * and deploying into the server.  Invokes the EJB3 through a 
-    * local business interface.
+    * Tests EJB3 Stateless Session Beans via a virtual archive
+    * deployment
     */
    @Test
-   public void testVirtualEjb3Deployment() throws Exception
+   public void testSlsb() throws Exception
    {
       // Log
-      log.info("testVirtualEjb3Deployment");
+      log.info("testSlsb");
 
       // Make a deployment
-      final String name = "testDeployment.jar";
+      final String name = "slsb.jar";
       final VirtualVfsArchive deployment = new VirtualVfsArchiveImpl(name).addClasses(OutputBean.class,
             OutputLocalBusiness.class);
       log.info(deployment.toString(true));
@@ -222,7 +255,7 @@
 
       // Test
       final OutputLocalBusiness bean = (OutputLocalBusiness) NAMING_CONTEXT.lookup(OutputBean.class.getSimpleName()
-            + "/local");;
+            + JNDI_SUFFIX_LOCAL_BUSINESS);;
       final String output = bean.getOutput();
       log.info("Got output: " + output);
       Assert.assertEquals(OutputLocalBusiness.OUTPUT, output);
@@ -230,7 +263,7 @@
    }
 
    /**
-    * Tests virtual deployment of a WAR containing a servlet 
+    * Tests deployment of a virtual WAR containing a servlet 
     * and JSP.
     * 
     * The Servlet will forward to the JSP path denoted by request param
@@ -239,10 +272,10 @@
     * @throws Exception
     */
    @Test
-   public void testVirtualWarServletJsp() throws Exception
+   public void testWarServletJsp() throws Exception
    {
       // Log
-      log.info("testVirtualWarServletJsp");
+      log.info("testWarServletJsp");
 
       // Get the base
       final URL base = this.getBase();
@@ -294,7 +327,7 @@
    }
 
    /**
-    * Tests virtual deployment of a JMS Queue with EJB3 MDB Listener
+    * Tests deployment of a JMS Queue with EJB3 MDB Listener
     * 
     * The MDB will simply store the text of the message in a publicly-accessible
     * static field
@@ -302,14 +335,15 @@
     * @throws Exception
     */
    @Test
-   public void testVirtualJmsAndMdb() throws Exception
+   public void testJmsAndMdb() throws Exception
    {
       // Log
-      log.info("testVirtualJmsAndMdb");
+      log.info("testJmsAndMdb");
 
       // Create a virtual archive for the MDB deployment
-      final VirtualVfsArchive deployment = new VirtualVfsArchiveImpl("mdb.jar").addClass(MessageStoringMdb.class)
-            .addResource(new URL(this.getBase(), PATH_QUEUE_SERVICE_XML), FILENAME_QUEUE_SERVICE_XML);
+      final VirtualVfsArchive deployment = new VirtualVfsArchiveImpl("jms-mdb-test.jar").addClass(
+            MessageStoringMdb.class).addResource(new URL(this.getBase(), PATH_QUEUE_SERVICE_XML),
+            FILENAME_QUEUE_SERVICE_XML);
 
       // Deploy
       log.info(deployment.toString(true));
@@ -346,6 +380,66 @@
 
    }
 
+   /*
+    * This one isn't ready yet:
+    * 
+    * 1) Hibernate isn't scanning the virtual archive's classes for @Entity
+    *  (so we explicitly put it there in persistence.xml)
+    * 2) Permgen / OOM problems, even on huge heap.  Why? 
+    */
+//   /**
+//    * Tests deployment of a JCA DataSource and EJB3 Entity Bean (JPA)
+//    * 
+//    * A test SLSB will also be used to create a few rows in the DB, 
+//    * then obtain all.
+//    * 
+//    * @throws Exception
+//    */
+//   @Test
+//   public void testDataSourceAndEntity() throws Exception
+//   {
+//      // Log
+//      log.info("testDataSourceAndEntity");
+//
+//      // Create a virtual archive for DS, persistence.xml, Entity, and SLSB
+//      final URL base = this.getBase();
+//      final VirtualVfsArchive deployment = new VirtualVfsArchiveImpl("datasource-entity-test.jar").addClasses(
+//            Jbossian.class, JbossianRegistrarLocalBusiness.class, JbossianRegistrarBean.class).addResource(
+//            new URL(base, PATH_RESOURCE_DS_XML_EMBEDDED), FILENAME_EMBEDDED_DS).addResource(
+//            new URL(base, PATH_RESOURCE_PERSISTENCE_XML_EMBEDDED), PATH_DESTINATION_PERSISTENCE_XML);
+//
+//      // Deploy
+//      log.info(deployment.toString(true));
+//      server.deploy(deployment);
+//
+//      // Make some JBossians
+//      final Jbossian jgreene = new Jbossian("Jason T. Greene", "AS Hole", 12);
+//      final Jbossian jpederse = new Jbossian("Jesper Pedersen", "Professional Tattletale", 21);
+//      final Jbossian dmlloyd = new Jbossian("David M. Lloyd", "???????", 15);
+//      final Jbossian wolfc = new Jbossian("Carlo de Wolf", "Head of Deep Voice", 13);
+//      final Jbossian alr = new Jbossian("Andew Lee Rubinger", "The New Fluery", 58);
+//      final Jbossian asaldhan = new Jbossian("Anil Saldhana", "Karma Police", 23);
+//      
+//      // Get an SLSB to interact w/ the DB
+//      final JbossianRegistrarLocalBusiness slsb = (JbossianRegistrarLocalBusiness) NAMING_CONTEXT
+//            .lookup(JbossianRegistrarBean.class.getSimpleName() + JNDI_SUFFIX_LOCAL_BUSINESS);
+//
+//      // Add the JBossians
+//      slsb.add(jgreene);
+//      slsb.add(jpederse);
+//      slsb.add(dmlloyd);
+//      slsb.add(wolfc);
+//      slsb.add(alr);
+//      slsb.add(asaldhan);
+//
+//      // Get all
+//      final Collection<Jbossian> jbossians = slsb.getAllJbossians();
+//      log.info("Got all JBossians: " + jbossians);
+//
+//      // Test
+//      Assert.assertEquals(6, jbossians.size());
+//   }
+
    //-------------------------------------------------------------------------------------||
    // Internal Helper Methods ------------------------------------------------------------||
    //-------------------------------------------------------------------------------------||

Added: projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/Jbossian.java
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/Jbossian.java	                        (rev 0)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/Jbossian.java	2009-07-16 22:07:01 UTC (rev 91359)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.embedded.testsuite.fulldep.ejb3.entity;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+/**
+ * JBossian
+ *
+ * Test entity bean to represent a hacker
+ * of JBoss projects
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Entity
+public class Jbossian implements Serializable
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * serialVersionUID
+    */
+   private static final long serialVersionUID = 1L;
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Primary key
+    */
+   @Id
+   @GeneratedValue(strategy = GenerationType.AUTO)
+   private long id;
+
+   /**
+    * Name 
+    */
+   private String name;
+
+   /**
+    * Position / title
+    */
+   private String role;
+
+   /**
+    * Age
+    */
+   private int age;
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Constructor to set all properties
+    */
+   public Jbossian(final String name, final String role, final int age)
+   {
+      // Set properties
+      this.setName(name);
+      this.setRole(role);
+      this.setAge(age);
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Accessors / Mutators ---------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * @return the name
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * @param name the name to set
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   /**
+    * @return the role
+    */
+   public String getRole()
+   {
+      return role;
+   }
+
+   /**
+    * @param role the role to set
+    */
+   public void setRole(String role)
+   {
+      this.role = role;
+   }
+
+   /**
+    * @return the age
+    */
+   public int getAge()
+   {
+      return age;
+   }
+
+   /**
+    * @param age the age to set
+    */
+   public void setAge(int age)
+   {
+      this.age = age;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Overridden Implementations ---------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * @return the id
+    */
+   public long getId()
+   {
+      return id;
+   }
+
+   /**
+    * @param id the id to set
+    */
+   public void setId(long id)
+   {
+      this.id = id;
+   }
+
+   /* (non-Javadoc)
+    * @see java.lang.Object#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return this.getClass().getSimpleName() + " [name=" + name + ", role=" + role + ", age=" + age + "]";
+   }
+}

Added: projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarBean.java
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarBean.java	                        (rev 0)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarBean.java	2009-07-16 22:07:01 UTC (rev 91359)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.embedded.testsuite.fulldep.ejb3.entity;
+
+import java.util.Collection;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * JbossianRegistrarBean
+ * 
+ * EJB3 SLSB to register/manage JBossians
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(JbossianRegistrarLocalBusiness.class)
+public class JbossianRegistrarBean implements JbossianRegistrarLocalBusiness
+{
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(JbossianRegistrarBean.class);
+
+   private static final String EJBQL_ALL_JBOSSIANS = "SELECT o FROM " + Jbossian.class.getSimpleName() + "o";
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * JPA integration
+    */
+   @PersistenceContext
+   private EntityManager em;
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /* (non-Javadoc)
+    * @see org.jboss.embedded.testsuite.fulldep.ejb3.entity.JbossianRegistrarLocalBusiness#add(org.jboss.embedded.testsuite.fulldep.ejb3.entity.Jbossian)
+    */
+   @Override
+   public void add(final Jbossian jbossian) throws IllegalArgumentException
+   {
+      // Precondition check
+      if (jbossian == null)
+      {
+         throw new IllegalArgumentException("jbossian mus tbe specified");
+      }
+
+      // Persist
+      log.info("Persisting: " + jbossian);
+      em.persist(jbossian);
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.embedded.testsuite.fulldep.ejb3.entity.JbossianRegistrarLocalBusiness#getAllJbossians()
+    */
+   @Override
+   @SuppressWarnings("unchecked")
+   public Collection<Jbossian> getAllJbossians()
+   {
+      // Get all
+      final Collection<Jbossian> list;
+      try
+      {
+         list = em.createQuery(EJBQL_ALL_JBOSSIANS).getResultList();
+      }
+      catch (final ClassCastException cce)
+      {
+         throw new RuntimeException(
+               "Error in setup, only objects of type " + Jbossian.class.getName() + " are allowed", cce);
+      }
+      log.info("Returning " + list.size() + " " + Jbossian.class.getSimpleName() + "(s)");
+      return list;
+   }
+}

Added: projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarLocalBusiness.java
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarLocalBusiness.java	                        (rev 0)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/java/org/jboss/embedded/testsuite/fulldep/ejb3/entity/JbossianRegistrarLocalBusiness.java	2009-07-16 22:07:01 UTC (rev 91359)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.embedded.testsuite.fulldep.ejb3.entity;
+
+import java.util.Collection;
+
+/**
+ * JBossianRegistrar
+ * 
+ * Interface of a business object to add and list JBossians
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JbossianRegistrarLocalBusiness
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Returns all JBossians registered in the system
+    * @return
+    */
+   Collection<Jbossian> getAllJbossians();
+
+   /**
+    * Adds the specified JBossian to the system
+    * 
+    * @param jbossian
+    * @throws IllegalArgumentException If no JBossian was specified
+    */
+   void add(Jbossian jbossian) throws IllegalArgumentException;
+}

Added: projects/embedded/trunk/testsuite-full-dep/src/test/resources/datasources/embedded-ds.xml
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/resources/datasources/embedded-ds.xml	                        (rev 0)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/resources/datasources/embedded-ds.xml	2009-07-16 22:07:01 UTC (rev 91359)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Embedded H2 DataSource Configuration -->
+
+<datasources>
+   <local-tx-datasource>
+
+      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
+      <!-- Datasources are not available outside the virtual machine -->
+      <jndi-name>EmbeddedDS</jndi-name>
+      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+
+      <!-- The driver class -->
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+
+      <!-- The login and password -->
+      <user-name>sa</user-name>
+      <password></password>
+      
+      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
+      <min-pool-size>5</min-pool-size>
+
+      <!-- The maximum connections in a pool/sub-pool -->
+      <max-pool-size>20</max-pool-size>
+
+      <!-- Whether to check all statements are closed when the connection is returned to the pool,
+           this is a debugging feature that should be turned off in production -->
+      <track-statements/>
+
+      <!-- Depend upon the DB Service -->
+      <depends>jboss:service=Hypersonic,database=localDB</depends>
+
+   </local-tx-datasource>
+
+
+</datasources>

Added: projects/embedded/trunk/testsuite-full-dep/src/test/resources/persistence/persistenceEmbedded.xml
===================================================================
--- projects/embedded/trunk/testsuite-full-dep/src/test/resources/persistence/persistenceEmbedded.xml	                        (rev 0)
+++ projects/embedded/trunk/testsuite-full-dep/src/test/resources/persistence/persistenceEmbedded.xml	2009-07-16 22:07:01 UTC (rev 91359)
@@ -0,0 +1,23 @@
+<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="embeddedPU">
+    <jta-data-source>java:/EmbeddedDS</jta-data-source>
+    <!-- TODO: Necessary because Hibernate is not scanning virtual deployments -->
+    <!-- 
+    
+    Probably need a new scanning implementation:
+    
+    @see JarVisitorFactory.getVisitor, NativeScanner
+    http://anonsvn.jboss.org/repos/hibernate/core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/Scanner.java
+    http://anonsvn.jboss.org/repos/hibernate/core/trunk/entitymanager/src/main/java/org/hibernate/ejb/packaging/NativeScanner.java
+    
+     -->
+    <class>org.jboss.embedded.testsuite.fulldep.ejb3.entity.Jbossian</class>
+    <properties>
+      <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+      <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+    </properties>
+  </persistence-unit>
+</persistence>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list