geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r723643 - in /geronimo/server/trunk/framework/modules: geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ geronimo-service-builder/src/main/xsd/ geronimo-service-builder/src/test/java/org/apache/geronimo/deployme...
Date Fri, 05 Dec 2008 08:02:26 GMT
Author: djencks
Date: Fri Dec  5 00:02:26 2008
New Revision: 723643

URL: http://svn.apache.org/viewvc?rev=723643&view=rev
Log:
GERONIMO-4403 re-add private-classes element handling.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_dep_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_ejb_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/assembly_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/gbean_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/servlet_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_1_result.xml
    geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_2_result.xml

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtil.java
Fri Dec  5 00:02:26 2008
@@ -48,6 +48,11 @@
             ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
             nonOverrideableRule.setClassPrefixes(toFilters(environmentType.getNonOverridableClasses()));
         }
+        
+        if (null != environmentType.getPrivateClasses()) {
+            ClassLoadingRule privateRule = classLoadingRules.getPrivateRule();
+            privateRule.setClassPrefixes(toFilters(environmentType.getPrivateClasses()));
+        }
     }
    
     private static Set<String> toFilters(ClassFilterType filterType) {

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
Fri Dec  5 00:02:26 2008
@@ -33,10 +33,10 @@
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.ClassFilterType;
 import org.apache.geronimo.deployment.xbeans.DependenciesType;
-import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentDocument;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xbeans.ImportType;
+import org.apache.geronimo.deployment.xbeans.DependencyType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ClassLoadingRule;
 import org.apache.geronimo.kernel.repository.ClassLoadingRules;
@@ -123,6 +123,9 @@
         classLoadingRule = classLoadingRules.getNonOverrideableRule();
         environmentType.setNonOverridableClasses(toFilterType(classLoadingRule.getClassPrefixes()));
 
+        classLoadingRule = classLoadingRules.getPrivateRule();
+        environmentType.setPrivateClasses(toFilterType(classLoadingRule.getClassPrefixes()));
+        
         return environmentType;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
Fri Dec  5 00:02:26 2008
@@ -204,6 +204,21 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
+            <xs:element name="private-classes"
+                type="sys:classFilterType" minOccurs="0">
+                <xs:annotation>
+                    <xs:documentation>
+                        A list of classes which will only be loaded from the
+                        ClassLoader of this module or from parent ClassLoaders.
+                        
+                        This is used to prevent children configurations to see
+                        specific classes from its parents. The same effect can
+                        be achieved by using hidden-classes. However,
+                        private-classes is the preferred approach to hide 
+                        specific classes from all children configurations. 
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
             <xs:element name="inverse-classloading" type="sys:emptyType"
                 minOccurs="0">
                 <xs:annotation>

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ClassLoadingRulesUtilTest.java
Fri Dec  5 00:02:26 2008
@@ -40,6 +40,7 @@
         environmentType.setInverseClassloading(EmptyType.Factory.newInstance());
         environmentType.setHiddenClasses(newFilter("hidden"));
         environmentType.setNonOverridableClasses(newFilter("nonOverrideable"));
+        environmentType.setPrivateClasses(newFilter("private"));
         
         ClassLoadingRules classLoadingRules = new ClassLoadingRules();
         ClassLoadingRulesUtil.configureRules(classLoadingRules, environmentType);
@@ -47,6 +48,7 @@
         assertTrue(classLoadingRules.isInverseClassLoading());
         assertPrefix(classLoadingRules.getHiddenRule(), "hidden");
         assertPrefix(classLoadingRules.getNonOverrideableRule(), "nonOverrideable");
+        assertPrefix(classLoadingRules.getPrivateRule(), "private");
     }
 
     private void assertPrefix(ClassLoadingRule classLoadingRule, String filter) {

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_dep_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_dep_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_dep_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_dep_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -44,6 +44,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
   <module>
     <java>appclient_dep_resref_single_client.jar</java>
@@ -89,6 +90,7 @@
         </dep:dependencies>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:client-environment>
       <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
         <dep:moduleId>
@@ -100,6 +102,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:server-environment>
       <resource-ref xmlns="http://geronimo.apache.org/xml/ns/naming-1.2">
         <ref-name>url/URL</ref-name>
@@ -126,6 +129,7 @@
             <dep:dependencies/>
             <dep:hidden-classes/>
             <dep:non-overridable-classes/>
+            <dep:private-classes/>
             <dep:suppress-default-environment/>
           </dep:environment>
           <resourceadapter>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_ejb_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_ejb_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_ejb_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/appclient_ejb_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -32,6 +32,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
   <module>
     <ejb>appclient_ejb_1_ejb.jar</ejb>
@@ -46,6 +47,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:environment>
       <cmp-connection-factory>
         <resource-link>jdbc/DB1</resource-link>
@@ -90,6 +92,7 @@
         </dep:dependencies>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:client-environment>
       <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
         <dep:moduleId>
@@ -101,6 +104,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:server-environment>
     </application-client>
   </module>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/assembly_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/assembly_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/assembly_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/assembly_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -34,6 +34,7 @@
         </dep:dependencies>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
     </dep:environment>
     <module>
         <java>assembly_compat_standalone_jar_compat12_13_client.jar</java>
@@ -55,6 +56,7 @@
                 </dep:dependencies>
                 <dep:hidden-classes/>
                 <dep:non-overridable-classes/>
+                <dep:private-classes/>
             </dep:client-environment>
             <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
                 <dep:moduleId>
@@ -66,6 +68,7 @@
                 <dep:dependencies/>
                 <dep:hidden-classes/>
                 <dep:non-overridable-classes/>
+                <dep:private-classes/>
             </dep:server-environment>
             <ejb-ref>
                 <ref-name>ejb/TestBean</ref-name>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/gbean_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/gbean_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/gbean_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/gbean_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -34,6 +34,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
   <gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
     <attribute name="realmName">hello-realm</attribute>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/servlet_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/servlet_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/servlet_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/servlet_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -32,6 +32,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
   <module>
     <web>servlet_deploy_ejblink_single_web.war</web>
@@ -46,6 +47,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:environment>
       <ejb-ref>
         <ref-name>ejb/StatelessBean_ExternalJAR</ref-name>
@@ -66,6 +68,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:environment>
       <!--YOU MUST INSERT THE ELEMENT <inverse-classloading/> INTO THE ENVIRONMENT
ELEMENT FOR THIS MODULE-->
       <ejb-ref>
@@ -87,6 +90,7 @@
           <dep:dependencies/>
           <dep:hidden-classes/>
           <dep:non-overridable-classes/>
+          <dep:private-classes/>
         </dep:environment>
       </web-app>
     </module>
@@ -103,6 +107,7 @@
           <dep:dependencies/>
           <dep:hidden-classes/>
           <dep:non-overridable-classes/>
+          <dep:private-classes/>
         </dep:environment>
         <!--YOU MUST INSERT THE ELEMENT <inverse-classloading/> INTO THE ENVIRONMENT
ELEMENT FOR THIS MODULE-->
       </web-app>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_1_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_1_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_1_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_1_result.xml
Fri Dec  5 00:02:26 2008
@@ -34,6 +34,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
   <module>
     <java>transport_1_client.jar</java>
@@ -55,6 +56,7 @@
         </dep:dependencies>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:client-environment>
       <dep:server-environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
         <dep:moduleId>
@@ -66,6 +68,7 @@
         <dep:dependencies/>
         <dep:hidden-classes/>
         <dep:non-overridable-classes/>
+        <dep:private-classes/>
       </dep:server-environment>
       <ejb-ref>
         <ref-name>ejb/EJBVehicle</ref-name>

Modified: geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_2_result.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_2_result.xml?rev=723643&r1=723642&r2=723643&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_2_result.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-upgrade/src/test/resources/transport_2_result.xml
Fri Dec  5 00:02:26 2008
@@ -34,6 +34,7 @@
     </dep:dependencies>
     <dep:hidden-classes/>
     <dep:non-overridable-classes/>
+    <dep:private-classes/>
   </dep:environment>
 </application>
         



Mime
View raw message