tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1029536 - in /openejb/branches/openejb-3.1.x: ./ container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ container/openejb-core/src/main/java/org/apache/openejb/config/ container/openejb-core/src/test/java/org/apache/ope...
Date Mon, 01 Nov 2010 03:16:12 GMT
Author: dblevins
Date: Mon Nov  1 03:16:10 2010
New Revision: 1029536

URL: http://svn.apache.org/viewvc?rev=1029536&view=rev
Log:
Slight tweak to OPENEJB-1392 and OPENEJB-1392 and OPENEJB-1391

Modified:
    openejb/branches/openejb-3.1.x/   (props changed)
    openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceBuilder.java
    openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
    openejb/branches/openejb-3.1.x/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java
  (props changed)
    openejb/branches/openejb-3.1.x/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml
  (props changed)

Propchange: openejb/branches/openejb-3.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  1 03:16:10 2010
@@ -1,2 +1,2 @@
 /openejb/branches/openejb-3.1.1:779593
-/openejb/trunk/openejb3:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948243,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030,1004172
+/openejb/trunk/openejb3:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948243,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030,1004172,1029528

Modified: openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceBuilder.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceBuilder.java?rev=1029536&r1=1029535&r2=1029536&view=diff
==============================================================================
--- openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceBuilder.java
(original)
+++ openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/PersistenceBuilder.java
Mon Nov  1 03:16:10 2010
@@ -19,6 +19,7 @@ package org.apache.openejb.assembler.cla
 import java.io.File;
 import java.util.HashMap;
 import java.util.concurrent.TimeUnit;
+import java.util.Map;
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.spi.PersistenceProvider;
 import javax.persistence.spi.PersistenceUnitTransactionType;
@@ -187,8 +188,11 @@ public class PersistenceBuilder {
         } finally {
             final long time = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);
             logger.info("assembler.buildingPersistenceUnit", unitInfo.getPersistenceUnitName(),
unitInfo.getPersistenceProviderClassName(), time+"");
-
-
+            if (logger.isDebugEnabled()) {
+                for (Map.Entry<Object, Object> entry : unitInfo.getProperties().entrySet())
{
+                    logger.debug(entry.getKey() + "=" + entry.getValue());
+                }
+            }
         }
     }
 }

Modified: openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java?rev=1029536&r1=1029535&r2=1029536&view=diff
==============================================================================
--- openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
(original)
+++ openejb/branches/openejb-3.1.x/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
Mon Nov  1 03:16:10 2010
@@ -66,6 +66,13 @@ import org.apache.openejb.jee.PortCompon
 import org.apache.openejb.jee.ServiceImplBean;
 
 import javax.xml.bind.JAXBException;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.List;
@@ -561,6 +568,14 @@ class AppInfoBuilder {
                     info.properties.setProperty(lookupProperty, openejbLookupClass);
                     logger.debug("Adjusting PersistenceUnit(name="+info.name+") property
to "+lookupProperty+"="+openejbLookupClass);
                 }
+
+                final Set<String> keys = new HashSet<String>(info.properties.stringPropertyNames());
+                for (String key : keys) {
+                    if (key.matches("openjpa.Connection(DriverName|URL|UserName|Password)"))
{
+                        final Object o = info.properties.remove(key);
+                        logger.warning("Removing PersistenceUnit(name=" + info.name + ")
property " + key + "=" + o + "  [not valid in a container environment]");
+                    }
+                }
             }
         }
     }

Propchange: openejb/branches/openejb-3.1.x/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  1 03:16:10 2010
@@ -1,2 +1,2 @@
 /openejb/branches/openejb-3.1.1/container/openejb-core/src/test/java/org/apache/openejb/config/UberInterfaceTest.java:779593
-/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030,1004172
+/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030,1004172,1029528

Propchange: openejb/branches/openejb-3.1.x/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  1 03:16:10 2010
@@ -1,2 +1,2 @@
 /openejb/branches/openejb-3.1.1/examples/alternate-descriptors/src/main/resources/META-INF/ejb-jar.xml:779593
-/openejb/trunk/openejb3/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948243,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030
+/openejb/trunk/openejb3/examples/alternate-descriptors/src/main/resources/META-INF/test.ejb-jar.xml:943472,943862,943965,944757,945989,946399,946485,946489,946705,946792,946805,946814,946861,946863-946864,947010,947017,947042,948022,948241,948243,948548,949014,949233,950391,950801,951611,953191,953196,953556,955104,955496,957463,962382,962750,987030,1029528



Mime
View raw message