geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r822560 - in /geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src: main/java/org/apache/geronimo/persistence/ test/java/org/apache/geronimo/persistence/
Date Wed, 07 Oct 2009 02:40:33 GMT
Author: dwoods
Date: Wed Oct  7 02:40:32 2009
New Revision: 822560

URL: http://svn.apache.org/viewvc?rev=822560&view=rev
Log:
finished adding unimplemented JPA2 methods

Modified:
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java?rev=822560&r1=822559&r2=822560&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerExtended.java
Wed Oct  7 02:40:32 2009
@@ -180,104 +180,82 @@
 
     @Override
     public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().createNamedQuery(name, resultClass);
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().createQuery(criteriaQuery);
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().createQuery(qlString, resultClass);
     }
 
     @Override
     public void detach(Object entity) {
-        // TODO Auto-generated method stub
-        
+        getEntityManager().detach(entity);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,
Object> properties) {
+        return getEntityManager().find(entityClass, primaryKey, properties);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode)
{
+        return getEntityManager().find(entityClass, primaryKey, lockMode);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode,
Map<String, Object> properties) {
+        return getEntityManager().find(entityClass, primaryKey, lockMode, properties);
     }
 
     @Override
     public LockModeType getLockMode(Object entity) {
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().getLockMode(entity);
     }
 
     @Override
     public Map<String, Object> getProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().getProperties();
     }
 
     @Override
     public Set<String> getSupportedProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().getSupportedProperties();
     }
 
     @Override
-    public void lock(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void lock(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        getEntityManager().lock(entity, lockMode, properties);
     }
 
     @Override
     public void refresh(Object entity, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+        getEntityManager().refresh(entity, properties);
     }
 
     @Override
     public void refresh(Object entity, LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        
+        getEntityManager().refresh(entity, lockMode);
     }
 
     @Override
-    public void refresh(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        getEntityManager().refresh(entity, lockMode, properties);
     }
 
     @Override
     public void setProperty(String propertyName, Object value) {
-        // TODO Auto-generated method stub
-        
+        getEntityManager().setProperty(propertyName, value);
     }
 
     @Override
     public <T> T unwrap(Class<T> cls) {
-        // TODO Auto-generated method stub
-        return null;
+        return getEntityManager().unwrap(cls);
     }
 
 }
-

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java?rev=822560&r1=822559&r2=822560&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/CMPEntityManagerTxScoped.java
Wed Oct  7 02:40:32 2009
@@ -416,102 +416,241 @@
 
     @Override
     public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.createNamedQuery(name, resultClass);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.createNamedQuery(name, resultClass);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.createQuery(criteriaQuery);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.createQuery(criteriaQuery);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.createQuery(qlString, resultClass);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.createQuery(qlString, resultClass);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public void detach(Object entity) {
-        // TODO Auto-generated method stub
-        
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.detach(entity);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.detach(entity);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,
Object> properties) {
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.find(entityClass, primaryKey, properties);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.find(entityClass, primaryKey, properties);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode)
{
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.find(entityClass, primaryKey, lockMode);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.find(entityClass, primaryKey, lockMode);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode,
Map<String, Object> properties) {
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.find(entityClass, primaryKey, lockMode, properties);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.find(entityClass, primaryKey, lockMode, properties);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public LockModeType getLockMode(Object entity) {
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.getLockMode(entity);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.getLockMode(entity);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public Map<String, Object> getProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.getProperties();
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.getProperties();
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public Set<String> getSupportedProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.getSupportedProperties();
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.getSupportedProperties();
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
-    public void lock(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void lock(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.lock(entity, lockMode, properties);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.lock(entity, lockMode, properties);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public void refresh(Object entity, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.refresh(entity, properties);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.refresh(entity, properties);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public void refresh(Object entity, LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.refresh(entity, lockMode);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.refresh(entity, lockMode);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
-    public void refresh(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.refresh(entity, lockMode, properties);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.refresh(entity, lockMode, properties);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public void setProperty(String propertyName, Object value) {
-        // TODO Auto-generated method stub
-        
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            entityManager.setProperty(propertyName, value);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                entityManager.setProperty(propertyName, value);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 
     @Override
     public <T> T unwrap(Class<T> cls) {
-        // TODO Auto-generated method stub
-        return null;
+        EntityManager entityManager = getEntityManager(false);
+        if (entityManager != null) {
+            return entityManager.unwrap(cls);
+        } else {
+            entityManager = createEntityManager();
+            try {
+                return entityManager.unwrap(cls);
+            } finally {
+                entityManager.close();
+            }
+        }
     }
 }

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java?rev=822560&r1=822559&r2=822560&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/InternalCMPEntityManagerExtended.java
Wed Oct  7 02:40:32 2009
@@ -211,103 +211,82 @@
 
     @Override
     public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.createNamedQuery(name, resultClass);
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.createQuery(criteriaQuery);
     }
 
     @Override
     public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass)
{
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.createQuery(qlString, resultClass);
     }
 
     @Override
     public void detach(Object entity) {
-        // TODO Auto-generated method stub
-        
+        entityManager.detach(entity);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, Map<String,
Object> properties) {
+        return entityManager.find(entityClass, primaryKey, properties);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode)
{
+        return entityManager.find(entityClass, primaryKey, lockMode);
     }
 
     @Override
-    public <T> T find(Class<T> entityClass, Object primaryKey,
-        LockModeType lockMode, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        return null;
+    public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode,
Map<String, Object> properties) {
+        return entityManager.find(entityClass, primaryKey, lockMode, properties);
     }
 
     @Override
     public LockModeType getLockMode(Object entity) {
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.getLockMode(entity);
     }
 
     @Override
     public Map<String, Object> getProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.getProperties();
     }
 
     @Override
     public Set<String> getSupportedProperties() {
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.getSupportedProperties();
     }
 
     @Override
-    public void lock(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void lock(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        entityManager.lock(entity, lockMode, properties);
     }
 
     @Override
     public void refresh(Object entity, Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+        entityManager.refresh(entity, properties);
     }
 
     @Override
     public void refresh(Object entity, LockModeType lockMode) {
-        // TODO Auto-generated method stub
-        
+        entityManager.refresh(entity, lockMode);
     }
 
     @Override
-    public void refresh(Object entity, LockModeType lockMode,
-        Map<String, Object> properties) {
-        // TODO Auto-generated method stub
-        
+    public void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties)
{
+        entityManager.refresh(entity, lockMode, properties);
     }
 
     @Override
     public void setProperty(String propertyName, Object value) {
-        // TODO Auto-generated method stub
-        
+        entityManager.setProperty(propertyName, value);
     }
 
     @Override
     public <T> T unwrap(Class<T> cls) {
-        // TODO Auto-generated method stub
-        return null;
+        return entityManager.unwrap(cls);
     }
 
 }

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=822560&r1=822559&r2=822560&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Wed Oct  7 02:40:32 2009
@@ -86,6 +86,9 @@
             TransactionManagerImpl transactionManager,
             Collection<ExtendedEntityManagerRegistry > entityManagerRegistry,
             URL configurationBaseURL,
+            String persistenceXMLSchemaVersion,
+            SharedCacheMode sharedCacheMode,
+            ValidationMode validationMode,
             ClassLoader classLoader) throws URISyntaxException, MalformedURLException, ResourceException
{
         List<String> mappingFileNames = mappingFileNamesUntyped == null? NO_STRINGS:
new ArrayList<String>(mappingFileNamesUntyped);
         this.persistenceUnitRoot = persistenceUnitRoot;
@@ -122,6 +125,9 @@
                 managedClassNames,
                 excludeUnlistedClassesValue,
                 properties,
+                persistenceXMLSchemaVersion,
+                sharedCacheMode,
+                validationMode,
                 classLoader);
         try {
             Class clazz = classLoader.loadClass(persistenceProviderClassName);
@@ -245,9 +251,18 @@
         private final ClassLoader classLoader;
         private final TemporaryClassLoader tempClassLoader;
         private final List<TransformerWrapper> transformers;
+        private final String persistenceXMLSchemaVersion;
+        private final SharedCacheMode sharedCacheMode;
+        private final ValidationMode validationMode;
 
 
-        public PersistenceUnitInfoImpl(String persistenceUnitName, String persistenceProviderClassName,
PersistenceUnitTransactionType persistenceUnitTransactionType, DataSource jtaDataSource, DataSource
nonJtaDataSource, List<String> mappingFileNames, List<URL> jarFileUrls, URL persistenceUnitRootUrl,
List<String> managedClassNames, boolean excludeUnlistedClassesValue, Properties properties,
ClassLoader classLoader) {
+        public PersistenceUnitInfoImpl(String persistenceUnitName, String persistenceProviderClassName,
+                PersistenceUnitTransactionType persistenceUnitTransactionType, DataSource
jtaDataSource,
+                DataSource nonJtaDataSource, List<String> mappingFileNames, List<URL>
jarFileUrls,
+                URL persistenceUnitRootUrl, List<String> managedClassNames, boolean
excludeUnlistedClassesValue,
+                Properties properties, String persistenceXMLSchemaVersion, SharedCacheMode
sharedCacheMode,
+                ValidationMode validationMode, ClassLoader classLoader) {
+            
             this.persistenceUnitName = persistenceUnitName;
             this.persistenceProviderClassName = persistenceProviderClassName;
             this.persistenceUnitTransactionType = persistenceUnitTransactionType;
@@ -259,6 +274,10 @@
             this.managedClassNames = managedClassNames;
             this.excludeUnlistedClassesValue = excludeUnlistedClassesValue;
             this.properties = properties;
+            this.persistenceXMLSchemaVersion = persistenceXMLSchemaVersion;
+            this.sharedCacheMode = sharedCacheMode;
+            this.validationMode = validationMode;
+
             this.classLoader = classLoader;
             this.transformers = new ArrayList<TransformerWrapper>();
             
@@ -350,20 +369,17 @@
          */
         @Override
         public String getPersistenceXMLSchemaVersion() {
-            // TODO Auto-generated method stub
-            return null;
+            return persistenceXMLSchemaVersion;
         }
 
         @Override
         public SharedCacheMode getSharedCacheMode() {
-            // TODO Auto-generated method stub
-            return null;
+            return sharedCacheMode;
         }
 
         @Override
         public ValidationMode getValidationMode() {
-            // TODO Auto-generated method stub
-            return null;
+            return validationMode;
         }
 
     }
@@ -385,6 +401,10 @@
         infoBuilder.addAttribute("properties", Properties.class, true, true);
         infoBuilder.addAttribute("configurationBaseUrl", URL.class, true);
 
+        infoBuilder.addAttribute("persistenceXMLSchemaVersion", String.class, true, true);
+        infoBuilder.addAttribute("sharedCacheMode", SharedCacheMode.class, true, true);
+        infoBuilder.addAttribute("validationMode", ValidationMode.class, true, true);
+
         infoBuilder.addReference("TransactionManager", TransactionManagerImpl.class, NameFactory.JTA_RESOURCE);
         infoBuilder.addReference("JtaDataSourceWrapper", ResourceSource.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
         infoBuilder.addReference("NonJtaDataSourceWrapper", ResourceSource.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
@@ -405,6 +425,9 @@
                 "TransactionManager",
                 "EntityManagerRegistry",
                 "configurationBaseUrl",
+                "persistenceXMLSchemaVersion",
+                "sharedCacheMode",
+                "validationMode",
                 "classLoader"
         });
 

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java?rev=822560&r1=822559&r2=822560&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
Wed Oct  7 02:40:32 2009
@@ -20,6 +20,8 @@
 import java.io.File;
 
 import javax.persistence.spi.PersistenceUnitInfo;
+import javax.persistence.spi.SharedCacheMode;
+import javax.persistence.spi.ValidationMode;
 
 import junit.framework.TestCase;
 
@@ -47,6 +49,9 @@
                 null,
                 null,
                 new File("/foo/bar/Root").toURL(),
+                "2.0",
+                SharedCacheMode.NONE,
+                ValidationMode.AUTO,
                 getClass().getClassLoader());
         assertNotNull(gbean.getManagedClassNames());
         assertNotNull(gbean.getProperties());



Mime
View raw message