geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1147426 - in /geronimo/server/trunk/plugins: bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/ openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/
Date Sat, 16 Jul 2011 13:39:57 GMT
Author: genspring
Date: Sat Jul 16 13:39:57 2011
New Revision: 1147426

URL: http://svn.apache.org/viewvc?rev=1147426&view=rev
Log:
GERONIMO-5050  to increase ValidatorFactoryGBean and PU Gbean priority so that the openjpa
transformer could be started before entity classes are loaded by AppinfoGbean.

Modified:
    geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
    geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java

Modified: geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java?rev=1147426&r1=1147425&r2=1147426&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/bval/geronimo-bval-builder/src/main/java/org/apache/geronimo/bval/deployment/BValModuleBuilderExtension.java
Sat Jul 16 13:39:57 2011
@@ -41,6 +41,7 @@ import org.apache.geronimo.deployment.De
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.j2ee.deployment.EARContext;
@@ -200,6 +201,7 @@ public class BValModuleBuilderExtension 
         EARContext moduleContext = module.getEarContext();
         AbstractName abstractName = moduleContext.getNaming().createChildName(module.getModuleName(),
"ValidatorFactory", NameFactory.VALIDATOR_FACTORY);
         GBeanData gbeanData = new GBeanData(abstractName, ValidatorFactoryGBean.class);
+        gbeanData.setPriority(GBeanInfo.PRIORITY_CLASSLOADER);
         gbeanData.setAttribute("moduleName", moduleName);
         gbeanData.setAttribute("validationConfig", validationConfig);
         try {

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?rev=1147426&r1=1147425&r2=1147426&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
Sat Jul 16 13:39:57 2011
@@ -43,6 +43,7 @@ import org.apache.geronimo.deployment.se
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
@@ -264,6 +265,9 @@ public class PersistenceUnitBuilder impl
         }
         gbeanData.setAttribute("persistenceUnitName", persistenceUnitName);
         gbeanData.setAttribute("persistenceUnitRoot", persistenceModulePath);
+        
+        //try to start PU GBean firstly to init the transformer before the entity classes
get loaded.
+        gbeanData.setPriority(GBeanInfo.PRIORITY_CLASSLOADER);
 
         //set defaults:
         gbeanData.setAttribute("persistenceProviderClassName", defaultPersistenceProviderClassName);



Mime
View raw message