geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r897346 - in /geronimo/server/trunk: framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/ framework/modules/geronimo-kernel/src/main/j...
Date Fri, 08 Jan 2010 23:21:00 GMT
Author: djencks
Date: Fri Jan  8 23:20:59 2010
New Revision: 897346

URL: http://svn.apache.org/viewvc?rev=897346&view=rev
Log:
GERONIMO-5021 allow gbean classes to be loaded from another plugin, plus use in jetty and jasper

Modified:
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
    geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java
    geronimo/server/trunk/plugins/jasper/jasper-deployer/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
    geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Fri Jan  8 23:20:59 2010
@@ -818,13 +818,15 @@
     public static LinkedHashSet<String> getImports(List<GBeanData> gbeans) {
         LinkedHashSet<String> imports = new LinkedHashSet<String>();
         for (GBeanData data: gbeans) {
-            GBeanInfo info = data.getGBeanInfo();
-            addImport(imports, info.getClassName());
-            for (GAttributeInfo attInfo: info.getAttributes()) {
-                addImport(imports, attInfo.getType());
-            }
-            for (GReferenceInfo refInfo: info.getReferences()) {
-                addImport(imports, refInfo.getReferenceType());
+            if (data.getClassSource() == null) {
+                GBeanInfo info = data.getGBeanInfo();
+                addImport(imports, info.getClassName());
+                for (GAttributeInfo attInfo: info.getAttributes()) {
+                    addImport(imports, attInfo.getType());
+                }
+                for (GReferenceInfo refInfo: info.getReferences()) {
+                    addImport(imports, refInfo.getReferenceType());
+                }
             }
         }
         return imports;

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java Fri Jan  8 23:20:59 2010
@@ -28,6 +28,7 @@
 import java.util.Set;
 
 import org.apache.geronimo.gbean.annotation.EncryptionSetting;
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
  * @version $Rev$ $Date$
@@ -37,7 +38,8 @@
 
     private Externalizable backwardExternalizables[] = new Externalizable[]{
             new V0Externalizable(),
-            new V1Externalizable()
+            new V1Externalizable(),
+            new V2Externalizable()
     };
 
     private GBeanInfo gbeanInfo;
@@ -45,6 +47,7 @@
     private final Map<String, Object> attributes;
     private final Map<String, ReferencePatterns> references;
     private final Set<ReferencePatterns> dependencies;
+    private Artifact classSource;
     private AbstractName abstractName;
     private int priority;
 
@@ -62,6 +65,10 @@
         GBeanInfo gbeanInfo = infoFactory.getGBeanInfo(gbeanClass);
         setGBeanInfo(gbeanInfo);
     }
+    public GBeanData(Class gbeanClass, Artifact classSource) {
+        this(gbeanClass);
+        this.classSource = classSource;
+    }
 
     public GBeanData(GBeanInfo gbeanInfo) {
         this();
@@ -79,11 +86,15 @@
     public GBeanData(AbstractName abstractName, Class gbeanClass) {
         this();
         this.abstractName = abstractName;
-
         GBeanInfo gbeanInfo = infoFactory.getGBeanInfo(gbeanClass);
         setGBeanInfo(gbeanInfo);
     }
     
+    public GBeanData(AbstractName abstractName, Class gbeanClass, Artifact classSource) {
+        this(abstractName, gbeanClass);
+        this.classSource = classSource;
+    }
+
     public GBeanData(GBeanData gbeanData) {
         setGBeanInfo(gbeanData.gbeanInfo);
         infoFactory = gbeanData.infoFactory;
@@ -91,6 +102,7 @@
         references = new HashMap<String, ReferencePatterns>(gbeanData.references);
         dependencies = new HashSet<ReferencePatterns>(gbeanData.dependencies);
         abstractName = gbeanData.abstractName;
+        classSource = gbeanData.classSource;
     }
 
     public AbstractName getAbstractName() {
@@ -122,6 +134,14 @@
         }
     }
 
+    public Artifact getClassSource() {
+        return classSource;
+    }
+
+    public void setClassSource(Artifact classSource) {
+        this.classSource = classSource;
+    }
+
     public Map<String, Object> getAttributes() {
         return new HashMap<String, Object>(attributes);
     }
@@ -169,7 +189,7 @@
         setReferencePatterns(name, new ReferencePatterns(abstractName));
     }
 
-    public void setReferencePatterns(String name, Set patterns) {
+    public void setReferencePatterns(String name, Set<? extends Object> patterns) {
         setReferencePatterns(name, new ReferencePatterns(patterns));
     }
 
@@ -230,6 +250,8 @@
         // write the gbean info
         out.writeObject(gbeanInfo);
 
+        out.writeObject(classSource);
+
         // write the abstract name
         out.writeObject(abstractName);
 
@@ -310,6 +332,7 @@
         public final void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
             // read the gbean info
             readGBeanInfo(in);
+            readClassSource(in);
 
             // read the abstract name
             try {
@@ -367,6 +390,9 @@
         protected void readGBeanInfo(ObjectInput in) throws IOException, ClassNotFoundException {
         }
 
+        protected void readClassSource(ObjectInput in) throws ClassNotFoundException, IOException {
+        }
+
         protected void readPriority(ObjectInput in) throws IOException, ClassNotFoundException {
             priority = GBeanInfo.PRIORITY_NORMAL;
         }
@@ -388,6 +414,13 @@
         }
 
     }
+    
+    private class V2Externalizable extends V1Externalizable {
+
+        protected void readClassSource(ObjectInput in) throws ClassNotFoundException, IOException {
+            classSource = (Artifact) in.readObject();
+        }
+    }
 
 }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java Fri Jan  8 23:20:59 2010
@@ -31,6 +31,8 @@
 
 import javax.management.ObjectName;
 
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.AbstractName;
@@ -230,8 +232,21 @@
         this.classLoader = new BundleClassLoader(bundleContext.getBundle());
 
         GBeanInfo gbeanInfo = gbeanData.getGBeanInfo();
+        Bundle bundle;
+        if (gbeanData.getClassSource() == null) {
+            bundle = bundleContext.getBundle();
+        } else {
+            try {
+                Configuration configuration = (Configuration) kernel.getGBean(Configuration.getConfigurationAbstractName(gbeanData.getClassSource()));
+                bundle = configuration.getBundle();
+            } catch (GBeanNotFoundException e) {
+                throw new InvalidConfigurationException("Class loading configuration not found: " + gbeanData.getClassSource(), e);
+            } catch (InvalidConfigException e) {
+                throw new InvalidConfigurationException("Class loading configuration not identified: " + gbeanData.getClassSource(), e);
+            }
+        }
         try {
-            type = bundleContext.getBundle().loadClass(gbeanInfo.getClassName());
+            type = bundle.loadClass(gbeanInfo.getClassName());
         } catch (ClassNotFoundException e) {
             throw new InvalidConfigurationException("Could not load GBeanInfo class from classloader: " + bundleContext +
                     " className=" + gbeanInfo.getClassName(), e);
@@ -240,12 +255,12 @@
         name = gbeanInfo.getName();
 
         // interfaces
-        interfaces = (String[]) gbeanInfo.getInterfaces().toArray(new String[0]);
+        interfaces = gbeanInfo.getInterfaces().toArray(new String[gbeanInfo.getInterfaces().size()]);
 
         // attributes
         attributes = buildAttributes(gbeanInfo);
         for (int i = 0; i < attributes.length; i++) {
-            attributeIndex.put(attributes[i].getName(), new Integer(i));
+            attributeIndex.put(attributes[i].getName(), i);
         }
 
         // references
@@ -255,7 +270,7 @@
 
         references = referencesSet.toArray(new GBeanReference[referencesSet.size()]);
         for (int i = 0; i < references.length; i++) {
-            referenceIndex.put(references[i].getName(), new Integer(i));
+            referenceIndex.put(references[i].getName(), i);
         }
 
         //dependencies

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java (original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java Fri Jan  8 23:20:59 2010
@@ -29,17 +29,14 @@
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.LinkedHashSet;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 
 import javax.xml.namespace.QName;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
@@ -61,8 +58,8 @@
 import org.apache.geronimo.jasper.JasperServletContextCustomizer;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
@@ -78,8 +75,9 @@
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
-
 import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This JSP module builder extension is meant to find all the TLD descriptor files associated with a
@@ -93,10 +91,6 @@
 public class JspModuleBuilderExtension implements ModuleBuilderExtension {
 
     private static final Logger log = LoggerFactory.getLogger(JspModuleBuilderExtension.class);
-
-    private final Environment defaultEnvironment;
-    private final NamingBuilder namingBuilders;
-
     private static final QName TLIB_VERSION = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "tlib-version");
     private static final QName SHORT_NAME = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "short-name");
     private static final QName TAG_CLASS = new QName(SchemaConversionUtils.JAVAEE_NAMESPACE, "tag-class");
@@ -106,9 +100,15 @@
     private static final String SCHEMA_LOCATION_URL = "http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
     private static final String VERSION = "2.1";
 
-    public JspModuleBuilderExtension(@ParamAttribute(name="defaultEnvironment")Environment defaultEnvironment,
-                                     @ParamReference(name="NamingBuilders", namingType = NameFactory.MODULE_BUILDER)NamingBuilder namingBuilders) {
+    private final Environment defaultEnvironment;
+    private final NamingBuilder namingBuilders;
+    private final Artifact jasperArtifact;
+
+    public JspModuleBuilderExtension(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
+                                     @ParamAttribute(name = "jasperArtifact") Artifact jasperArtifact,
+                                     @ParamReference(name = "NamingBuilders", namingType = NameFactory.MODULE_BUILDER) NamingBuilder namingBuilders) {
         this.defaultEnvironment = defaultEnvironment;
+        this.jasperArtifact = jasperArtifact;
         this.namingBuilders = namingBuilders;
     }
 
@@ -159,8 +159,6 @@
 
         XmlObject jettyWebApp = webModule.getVendorDD();
 
-        Configuration earConfiguration = earContext.getConfiguration();
-
         Set<String> listenerNames = new HashSet<String>();
 
         ClassFinder classFinder = createJspClassFinder(webApp, webModule, listenerNames);
@@ -173,7 +171,7 @@
         GBeanInfo webAppGBeanInfo = webAppData.getGBeanInfo();
         if (webAppGBeanInfo.getReference("ContextCustomizer") != null) {
             AbstractName jspLifecycleName = moduleContext.getNaming().createChildName(moduleName, "jspLifecycleProvider", GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
-            GBeanData gbeanData = new GBeanData(jspLifecycleName, JasperServletContextCustomizer.GBEAN_INFO);
+            GBeanData gbeanData = new GBeanData(jspLifecycleName, JasperServletContextCustomizer.class, jasperArtifact);
             gbeanData.setAttribute("holder", holder);
 
             try {
@@ -201,14 +199,14 @@
 
     /**
      * getTldFiles(): Find all the TLD files in the web module being deployed
-     *
+     * <p/>
      * <p>Locations to search for these TLD file(s) (matches the precedence search order for TLD
      * files per the JSP specs):
      * <ol>
-     *      <li>web.xml <taglib> entries
-     *      <li>TLD(s) in JAR files in WEB-INF/lib
-     *      <li>TLD(s) under WEB-INF
-     *      <li>All TLD files in all META-INF(s)
+     * <li>web.xml <taglib> entries
+     * <li>TLD(s) in JAR files in WEB-INF/lib
+     * <li>TLD(s) under WEB-INF
+     * <li>All TLD files in all META-INF(s)
      * </ol>
      *
      * @param webApp    spec DD for module
@@ -236,7 +234,7 @@
                     }
                     try {
                         File targetFile = webModule.getEarContext().getTargetFile(webModule.resolve(createURI(location)));
-                        if (targetFile!=null) {
+                        if (targetFile != null) {
                             tldURLs.add(targetFile.toURI().toURL());
                         }
                     }
@@ -291,8 +289,8 @@
                 JarEntry jarEntry = entries.nextElement();
                 if (jarEntry.getName().startsWith("WEB-INF/") && jarEntry.getName().endsWith(".tld")) {
                     File targetFile = webModule.getEarContext().getTargetFile(webModule.resolve(createURI(jarEntry.getName())));
-                    if (targetFile!=null) {
-                        modURLs.add(targetFile.toURL());
+                    if (targetFile != null) {
+                        modURLs.add(targetFile.toURI().toURL());
                     }
                 }
                 if (jarEntry.getName().startsWith("WEB-INF/lib/") && jarEntry.getName().endsWith(".jar")) {
@@ -397,7 +395,7 @@
                         File[] children = directory.listFiles();
                         for (File child : children) {
                             if (child.getName().endsWith(".tld")) {
-                                dirURLs.add(child.toURL());
+                                dirURLs.add(child.toURI().toURL());
                             }
                         }
                     } else {
@@ -420,7 +418,7 @@
     private List<Class> getListenerClasses(WebAppType webApp, WebModule webModule, Collection<URL> urls, Set<String> listenerNames) throws DeploymentException {
         if (log.isDebugEnabled()) {
             log.debug("getListenerClasses( " + webApp.toString() + "," + '\n' +
-                      webModule.getName() + " ): Entry");
+                    webModule.getName() + " ): Entry");
         }
 
         // Get the classloader from the module's EARContext
@@ -489,17 +487,17 @@
     /**
      * convertToTaglibSchema(): Convert older TLD files based on the 1.1 and 1.2 DTD or the 2.0 XSD
      * schemas
-     *
+     * <p/>
      * <p><strong>Note(s):</strong>
      * <ul>
-     *      <li>Those tags from the 1.1 and 1.2 DTD that are no longer valid (e.g., jsp-version) are
-     *      removed
-     *      <li>Valid  tags from the 1.1 and 1.2 DTD are converted (e.g., tlibversion to
-     *      tlib-version)
-     *      <li>The <taglib> root and the <tag> root elements are reordered as necessary (i.e.,
-     *      description, display-name)
-     *      <li>The <rtexprvalue> tag is inserted in the &lt;attribute> tag if necessary since it was
-     *      not required to preceed <type> in 2.0 schema. Default value of false is used.
+     * <li>Those tags from the 1.1 and 1.2 DTD that are no longer valid (e.g., jsp-version) are
+     * removed
+     * <li>Valid  tags from the 1.1 and 1.2 DTD are converted (e.g., tlibversion to
+     * tlib-version)
+     * <li>The <taglib> root and the <tag> root elements are reordered as necessary (i.e.,
+     * description, display-name)
+     * <li>The <rtexprvalue> tag is inserted in the &lt;attribute> tag if necessary since it was
+     * not required to preceed <type> in 2.0 schema. Default value of false is used.
      * </ul>
      *
      * @param xmlObject possibly old-style tag lib document
@@ -518,8 +516,7 @@
             cursor.toFirstChild();
             if (SchemaConversionUtils.JAVAEE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
                 log.debug("Nothing to do");
-            }
-            else if (SchemaConversionUtils.J2EE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
+            } else if (SchemaConversionUtils.J2EE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
                 log.debug("Converting XSD 2.0 to 2.1 schema");
                 SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, SCHEMA_LOCATION_URL, VERSION);
                 cursor.toStartDoc();
@@ -581,8 +578,7 @@
                         SchemaConversionUtils.convertToTldTag(SchemaConversionUtils.JAVAEE_NAMESPACE, cursor, moveable);
                     }
                 } while (cursor.toNextSibling());
-            }
-            else {
+            } else {
                 log.debug("Converting DTD to 2.1 schema");
                 SchemaConversionUtils.convertToSchema(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE, SCHEMA_LOCATION_URL, VERSION);
                 cursor.toStartDoc();
@@ -592,8 +588,8 @@
                 do {
                     String name = cursor.getName().getLocalPart();
                     if ("jsp-version".equals(name) ||
-                        "jspversion".equals(name) ||
-                        "info".equals(name)) {
+                            "jspversion".equals(name) ||
+                            "info".equals(name)) {
                         cursor.removeXmlContents();
                         cursor.removeXml();
                     }

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java (original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/BasicTest.java Fri Jan  8 23:20:59 2010
@@ -23,7 +23,6 @@
 import java.util.Collections;
 
 import junit.framework.TestCase;
-import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
 
 /**
@@ -32,7 +31,7 @@
 public class BasicTest extends TestCase {
     
     public void testMyFacesModuleBuilderExtension() throws Exception {
-        JspModuleBuilderExtension instance = new JspModuleBuilderExtension(null, new NamingBuilderCollection(Collections.EMPTY_SET));
+        JspModuleBuilderExtension instance = new JspModuleBuilderExtension(null, null, new NamingBuilderCollection(Collections.EMPTY_SET));
     }
 
 }

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java (original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper/src/main/java/org/apache/geronimo/jasper/JasperServletContextCustomizer.java Fri Jan  8 23:20:59 2010
@@ -28,6 +28,8 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
 import org.apache.geronimo.j2ee.RuntimeCustomizer;
 import org.apache.geronimo.j2ee.annotation.Holder;
 import org.apache.tomcat.InstanceManager;
@@ -35,6 +37,7 @@
 /**
  * @version $Rev$ $Date$
  */
+@GBean(j2eeType = GBeanInfoBuilder.DEFAULT_J2EE_TYPE)
 public class JasperServletContextCustomizer implements RuntimeCustomizer {
     private final Holder holder;
 
@@ -47,7 +50,7 @@
         }
     }
 
-    public JasperServletContextCustomizer(Holder holder) {
+    public JasperServletContextCustomizer(@ParamAttribute(name = "holder") Holder holder) {
         this.holder = holder;
     }
 
@@ -78,28 +81,15 @@
                 throw new InvocationTargetException(e, "Attempted to destroy instance");
             }
         }
-        
-        public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException, NamingException {
-	    throw new UnsupportedOperationException("separate instantiation and injection is not supported");
-	}
-
-	public Object newInstance(String fqcn) throws IllegalAccessException, InvocationTargetException, NamingException,
-		InstantiationException, ClassNotFoundException {
-	    throw new UnsupportedOperationException("separate instantiation and injection is not supported");
-	}
-    }
 
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JasperServletContextCustomizer.class, GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
-        infoBuilder.addAttribute("holder", Holder.class, true, true);
-        infoBuilder.setConstructor(new String[] {"holder"});
+        public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException, NamingException {
+            throw new UnsupportedOperationException("separate instantiation and injection is not supported");
+        }
 
-        GBEAN_INFO = infoBuilder.getBeanInfo();
+        public Object newInstance(String fqcn) throws IllegalAccessException, InvocationTargetException, NamingException,
+                InstantiationException, ClassNotFoundException {
+            throw new UnsupportedOperationException("separate instantiation and injection is not supported");
+        }
     }
 
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
 }

Modified: geronimo/server/trunk/plugins/jasper/jasper-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/jasper-deployer/src/main/plan/plan.xml?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/jasper-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/jasper/jasper-deployer/src/main/plan/plan.xml Fri Jan  8 23:20:59 2010
@@ -21,20 +21,10 @@
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
     <gbean name="JspModuleBuilderExtension" class="org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension">
+        <attribute name="jasperArtifact">org.apache.geronimo.configs/jasper/${version}/car</attribute>
         <reference name="NamingBuilders">
             <name>NamingBuilders</name>
         </reference>
-        <xml-attribute name="defaultEnvironment">
-            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.geronimo.configs</groupId>
-                        <artifactId>jasper</artifactId>
-                        <type>car</type>
-                    </dependency>
-                </dependencies>
-            </environment>
-        </xml-attribute>
     </gbean>
 
 </module>

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java Fri Jan  8 23:20:59 2010
@@ -17,23 +17,45 @@
 
 package org.apache.geronimo.jetty8.deployment;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.jar.JarFile;
+
+import javax.management.ObjectName;
+import javax.servlet.Servlet;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 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.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
 import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.deployment.WebModule;
@@ -54,8 +76,11 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Dependency;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
@@ -101,31 +126,14 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.management.ObjectName;
-import javax.servlet.Servlet;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.Serializable;
 import static java.lang.Boolean.FALSE;
 import static java.lang.Boolean.TRUE;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.jar.JarFile;
 
 /**
  * @version $Rev:385659 $ $Date$
  */
+
+@GBean(j2eeType=NameFactory.MODULE_BUILDER)
 public class JettyModuleBuilder extends AbstractWebModuleBuilder implements GBeanLifecycle {
     private static final Logger log = LoggerFactory.getLogger(JettyModuleBuilder.class);
     static final String ROLE_MAPPER_DATA_NAME = "roleMapperDataName";
@@ -153,6 +161,8 @@
     }
 
     private final Environment defaultEnvironment;
+    //plugin wose bundle can load jetty classes and gbean wrappers.
+    private final Artifact jettyArtifact;
     private final AbstractNameQuery jettyContainerObjectName;
     private final JspServletHolderWrapper jspServlet;
     private final Collection defaultServlets;
@@ -169,26 +179,28 @@
 
     private static final String JETTY_NAMESPACE = JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI();
 
-    public JettyModuleBuilder(Environment defaultEnvironment,
-                              Integer defaultSessionTimeoutSeconds,
-                              List<String> defaultWelcomeFiles,
-                              AbstractNameQuery jettyContainerName,
-                              JspServletHolderWrapper jspServlet,
-                              Collection defaultServlets,
-                              Collection defaultFilters,
-                              Collection defaultFilterMappings,
-                              Map<String, String> defaultLocaleEncodingMappings,
-                              Map<String, String> defaultMimeTypeMappings,
-                              Object pojoWebServiceTemplate,
-                              Collection<WebServiceBuilder> webServiceBuilder,
-                              Collection clusteringBuilders,
-                              Collection serviceBuilders,
-                              NamingBuilder namingBuilders,
-                              Collection<ModuleBuilderExtension> moduleBuilderExtensions,
-                              ResourceEnvironmentSetter resourceEnvironmentSetter,
-                              Kernel kernel) throws GBeanNotFoundException {
+    public JettyModuleBuilder(@ParamAttribute(name="defaultEnvironment")Environment defaultEnvironment,
+                              @ParamAttribute(name="jettyArtifact")Artifact jettyArtifact,
+                              @ParamAttribute(name="defaultSessionTimeoutSeconds")Integer defaultSessionTimeoutSeconds,
+                              @ParamAttribute(name="defaultWelcomeFiles")List<String> defaultWelcomeFiles,
+                              @ParamAttribute(name="jettyContainerObjectName")AbstractNameQuery jettyContainerName,
+                              @ParamReference(name="JspServlet", namingType=NameFactory.SERVLET_TEMPLATE)JspServletHolderWrapper jspServlet,
+                              @ParamReference(name="DefaultServlets", namingType=NameFactory.SERVLET_TEMPLATE)Collection<DefaultServletHolderWrapper> defaultServlets,
+                              @ParamReference(name="DefaultFilters", namingType=NameFactory.SERVLET_TEMPLATE)Collection<FilterHolderWrapper> defaultFilters,
+                              @ParamReference(name="DefaultFilterMappings", namingType=NameFactory.SERVLET_TEMPLATE)Collection<JettyFilterMapping> defaultFilterMappings,
+                              @ParamAttribute(name="defaultLocaleEncodingMappings")Map<String, String> defaultLocaleEncodingMappings,
+                              @ParamAttribute(name="defaultMimeTypeMappings")Map<String, String> defaultMimeTypeMappings,
+                              @ParamReference(name="PojoWebServiceTemplate", namingType=NameFactory.SERVLET_WEB_SERVICE_TEMPLATE)Object pojoWebServiceTemplate,
+                              @ParamReference(name="WebServiceBuilder", namingType=NameFactory.MODULE_BUILDER)Collection<WebServiceBuilder> webServiceBuilder,
+                              @ParamReference(name="ClusteringBuilders", namingType=NameFactory.MODULE_BUILDER)Collection<NamespaceDrivenBuilder> clusteringBuilders,
+                              @ParamReference(name="ServiceBuilders", namingType=NameFactory.MODULE_BUILDER)Collection<NamespaceDrivenBuilder> serviceBuilders,
+                              @ParamReference(name="NamingBuilders", namingType=NameFactory.MODULE_BUILDER)NamingBuilder namingBuilders,
+                              @ParamReference(name="ModuleBuilderExtensions", namingType=NameFactory.MODULE_BUILDER)Collection<ModuleBuilderExtension> moduleBuilderExtensions,
+                              @ParamReference(name="ResourceEnvironmentSetter", namingType=NameFactory.MODULE_BUILDER)ResourceEnvironmentSetter resourceEnvironmentSetter,
+                              @ParamSpecial(type = SpecialAttributeType.kernel)Kernel kernel) throws GBeanNotFoundException {
         super(kernel, serviceBuilders, namingBuilders, resourceEnvironmentSetter, webServiceBuilder, moduleBuilderExtensions);
         this.defaultEnvironment = defaultEnvironment;
+        this.jettyArtifact = jettyArtifact;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? 30 * 60 : defaultSessionTimeoutSeconds;
         this.jettyContainerObjectName = jettyContainerName;
         this.jspServlet = jspServlet;
@@ -223,7 +235,7 @@
             return null;
         }
         AbstractName templateName = kernel.getAbstractNameFor(template);
-        return kernel.getGBeanData(templateName);
+        return new GBeanData(kernel.getGBeanData(templateName));
     }
 
     protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
@@ -271,6 +283,8 @@
 
         EnvironmentType environmentType = jettyWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+        //make sure jetty is started.
+        environment.addDependency(new Dependency(jettyArtifact, ImportType.SERVICES));
 
         Boolean distributable = webApp.getDistributableArray().length == 1 ? TRUE : FALSE;
         if (TRUE == distributable) {
@@ -378,7 +392,7 @@
 
         WebAppType webApp = (WebAppType) webModule.getSpecDD();
         JettyWebAppType jettyWebApp = (JettyWebAppType) webModule.getVendorDD();
-        GBeanData webModuleData = new GBeanData(moduleName, WebAppContextWrapper.class);
+        GBeanData webModuleData = new GBeanData(moduleName, WebAppContextWrapper.class, jettyArtifact);
 
         configureBasicWebModuleAttributes(webApp, jettyWebApp, moduleContext, earContext, webModule, webModuleData);
 
@@ -472,8 +486,9 @@
 
             buildServletMappings(module, webApp, servletMappings, knownServletMappings);
 
-            //be careful that the jsp servlet defaults don't overrride anything configured in the app.
+            //be careful that the jsp servlet defaults don't override anything configured in the app.
             if (jspServlet != null) {
+                //TODO rfc 66 make sure this has classSource set
                 GBeanData jspServletData = (GBeanData) module.getSharedContext().get(DEFAULT_JSP_SERVLET_KEY);
                 Set<String> jspMappings = (Set<String>) jspServletData.getAttribute("servletMappings");
                 jspMappings.removeAll(knownServletMappings);
@@ -563,7 +578,7 @@
 //        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
 //                "DefaultWebApplicationHandlerFactory",
 //                NameFactory.GERONIMO_SERVICE);
-//        GBeanData beanData = new GBeanData(name, DefaultWebApplicationHandlerFactory.GBEAN_INFO);
+//        GBeanData beanData = new GBeanData(name, DefaultWebApplicationHandlerFactory.class, jettyArtifact);
 //        webModuleData.setReferencePattern(WebAppContextWrapper.GBEAN_REF_WEB_APPLICATION_HANDLER_FACTORY, name);
 //        moduleContext.addGBean(beanData);
     }
@@ -599,6 +614,7 @@
 
     private GBeanData configureDefaultServlet(Object defaultServlet, EARContext earContext, AbstractName moduleName, Set knownServletMappings) throws GBeanNotFoundException, GBeanAlreadyExistsException {
         GBeanData servletGBeanData = getGBeanData(kernel, defaultServlet);
+        servletGBeanData.setClassSource(jettyArtifact);
         AbstractName defaultServletObjectName = earContext.getNaming().createChildName(moduleName, (String) servletGBeanData.getAttribute("servletName"), NameFactory.SERVLET);
         servletGBeanData.setAbstractName(defaultServletObjectName);
         servletGBeanData.setReferencePattern("JettyServletRegistration", moduleName);
@@ -613,7 +629,7 @@
         for (FilterType filterType : filterArray) {
             String filterName = filterType.getFilterName().getStringValue().trim();
             AbstractName filterAbstractName = earContext.getNaming().createChildName(moduleName, filterName, NameFactory.WEB_FILTER);
-            GBeanData filterData = new GBeanData(filterAbstractName, FilterHolderWrapper.class);
+            GBeanData filterData = new GBeanData(filterAbstractName, FilterHolderWrapper.class, jettyArtifact);
             filterData.setAttribute("filterName", filterName);
             filterData.setAttribute("filterClass", filterType.getFilterClass().getStringValue().trim());
             Map<String, String> initParams = new HashMap<String, String>();
@@ -631,7 +647,7 @@
         FilterMappingType[] filterMappingArray = webApp.getFilterMappingArray();
         for (FilterMappingType filterMappingType : filterMappingArray) {
             String filterName = filterMappingType.getFilterName().getStringValue().trim();
-            GBeanData filterMappingData = new GBeanData(JettyFilterMapping.class);
+            GBeanData filterMappingData = new GBeanData(JettyFilterMapping.class, jettyArtifact);
             if (previous != null) {
                 filterMappingData.addDependency(previous);
             }
@@ -692,6 +708,7 @@
     private AbstractName addDefaultFiltersGBeans(EARContext earContext, EARContext moduleContext, AbstractName moduleName, AbstractName previous) throws GBeanNotFoundException, GBeanAlreadyExistsException {
         for (Object defaultFilter : defaultFilters) {
             GBeanData filterGBeanData = getGBeanData(kernel, defaultFilter);
+            filterGBeanData.setClassSource(jettyArtifact);
             String filterName = (String) filterGBeanData.getAttribute("filterName");
             AbstractName defaultFilterAbstractName = earContext.getNaming().createChildName(moduleName, filterName, NameFactory.WEB_FILTER);
             filterGBeanData.setAbstractName(defaultFilterAbstractName);
@@ -699,7 +716,7 @@
             moduleContext.addGBean(filterGBeanData);
             //add a mapping to /*
 
-            GBeanData filterMappingGBeanData = new GBeanData(JettyFilterMapping.class);
+            GBeanData filterMappingGBeanData = new GBeanData(JettyFilterMapping.class, jettyArtifact);
             if (previous != null) {
                 filterMappingGBeanData.addDependency(previous);
             }
@@ -773,7 +790,7 @@
 
 
             if (authType != null) {
-                GBeanData securityFactoryData = new GBeanData(factoryName, AuthConfigProviderHandlerFactory.class);
+                GBeanData securityFactoryData = new GBeanData(factoryName, AuthConfigProviderHandlerFactory.class, jettyArtifact);
                 securityFactoryData.setAttribute("messageLayer", "HttpServlet");
                 String contextPath = (String)webModuleData.getAttribute("contextPath");
                 securityFactoryData.setAttribute("appContext", "server " + contextPath);
@@ -783,7 +800,7 @@
                 //otherwise rely on pre-configured jaspi
             } else {
                 LoginConfigType loginConfig = loginConfigArray.length == 1? loginConfigArray[0]: null;
-                GBeanData securityFactoryData = new GBeanData(factoryName, JettySecurityHandlerFactory.class);
+                GBeanData securityFactoryData = new GBeanData(factoryName, JettySecurityHandlerFactory.class, jettyArtifact);
                 configureConfigurationFactory(jettyWebApp, loginConfig, securityFactoryData);
                 BuiltInAuthMethod auth = BuiltInAuthMethod.NONE;
                 if (loginConfig != null) {
@@ -972,7 +989,7 @@
         if (hosts.length > 0 || virtualHosts.length > 0) {
             //use name same as module
             AbstractName hostName = earContext.getNaming().createChildName(webModuleData.getAbstractName(), "Host", "Host");
-            GBeanData hostData = new GBeanData(hostName, Host.class);
+            GBeanData hostData = new GBeanData(hostName, Host.class, jettyArtifact);
             hostData.setAttribute("hosts", hosts);
             hostData.setAttribute("virtualHosts", virtualHosts);
             earContext.addGBean(hostData);
@@ -1059,10 +1076,11 @@
                 throw new DeploymentException("Could not load javax.servlet.Servlet in bundle " + webBundle, e);
             }
             if (baseServletClass.isAssignableFrom(servletClass)) {
-                servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class);
+                servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class, jettyArtifact);
                 servletData.setAttribute("servletClass", servletClassName);
             } else {
                 servletData = new GBeanData(pojoWebServiceTemplate);
+                //TODO rfc 66 set classSource!
                 servletData.setAbstractName(servletAbstractName);
                 //let the web service builder deal with configuring the gbean with the web service stack
 //                Object portInfo = portMap.get(servletName);
@@ -1082,7 +1100,7 @@
                 }
             }
         } else if (servletType.isSetJspFile()) {
-            servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class);
+            servletData = new GBeanData(servletAbstractName, ServletHolderWrapper.class, jettyArtifact);
             servletData.setAttribute("jspFile", servletType.getJspFile().getStringValue().trim());
             servletData.setAttribute("servletClass", jspServlet.getServletClassName());
             initParams.put("development", "false");
@@ -1127,55 +1145,6 @@
         return servletAbstractName;
     }
 
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JettyModuleBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
-        infoBuilder.addAttribute("defaultSessionTimeoutSeconds", Integer.class, true, true);
-        infoBuilder.addAttribute("defaultWelcomeFiles", List.class, true, true);
-        infoBuilder.addAttribute("defaultLocaleEncodingMappings", Map.class, true, true);
-        infoBuilder.addAttribute("defaultMimeTypeMappings", Map.class, true, true);
-        infoBuilder.addAttribute("jettyContainerObjectName", AbstractNameQuery.class, true, true);
-        infoBuilder.addReference("JspServlet", JspServletHolderWrapper.class, NameFactory.SERVLET_TEMPLATE);
-        infoBuilder.addReference("DefaultServlets", DefaultServletHolderWrapper.class, NameFactory.SERVLET_TEMPLATE);
-        infoBuilder.addReference("DefaultFilters", Object.class);
-        infoBuilder.addReference("DefaultFilterMappings", Object.class);
-        infoBuilder.addReference("PojoWebServiceTemplate", Object.class, NameFactory.SERVLET_WEB_SERVICE_TEMPLATE);
-        infoBuilder.addReference("WebServiceBuilder", WebServiceBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addReference("ClusteringBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addReference("ServiceBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addReference("NamingBuilders", NamingBuilder.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addReference("ModuleBuilderExtensions", ModuleBuilderExtension.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addReference("ResourceEnvironmentSetter", ResourceEnvironmentSetter.class, NameFactory.MODULE_BUILDER);
-        infoBuilder.addAttribute("kernel", Kernel.class, false);
-        infoBuilder.addInterface(ModuleBuilder.class);
-
-        infoBuilder.setConstructor(new String[]{
-                "defaultEnvironment",
-                "defaultSessionTimeoutSeconds",
-                "defaultWelcomeFiles",
-                "jettyContainerObjectName",
-                "JspServlet",
-                "DefaultServlets",
-                "DefaultFilters",
-                "DefaultFilterMappings",
-                "defaultLocaleEncodingMappings",
-                "defaultMimeTypeMappings",
-                "PojoWebServiceTemplate",
-                "WebServiceBuilder",
-                "ClusteringBuilders",
-                "ServiceBuilders",
-                "NamingBuilders",
-                "ModuleBuilderExtensions",
-                "ResourceEnvironmentSetter",
-                "kernel"});
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
 
     static class StartupOrderComparator implements Comparator<ServletType>, Serializable {
         /**

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java Fri Jan  8 23:20:59 2010
@@ -286,6 +286,7 @@
         Collection<ModuleBuilderExtension> moduleBuilderExtensions = new ArrayList<ModuleBuilderExtension>();
         GeronimoSecurityBuilderImpl securityBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
         builder = new JettyModuleBuilder(defaultEnvironment,
+                Artifact.create("org.apache.geronimo.configs/jetty8/3.0-SNAPSHOT/car"),
                 new Integer(1800),
                 Collections.EMPTY_LIST,
                 new AbstractNameQuery(containerName),

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java Fri Jan  8 23:20:59 2010
@@ -77,6 +77,7 @@
         super.setUp();
         GeronimoSecurityBuilderImpl securityBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
         builder = new JettyModuleBuilder(defaultEnvironment,
+                Artifact.create("org.apache.geronimo.configs/jetty8/3.0-SNAPSHOT/car"),
                 new Integer(1800),
                 null,
                 jettyContainerObjectName,

Modified: geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml?rev=897346&r1=897345&r2=897346&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml Fri Jan  8 23:20:59 2010
@@ -127,29 +127,7 @@
         <reference name="ResourceEnvironmentSetter">
             <name>ResourceRefBuilder</name>
         </reference>
-        <xml-attribute name="defaultEnvironment">
-            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
-                <dependencies>
-                    <dependency>
-                        <groupId>${pom.groupId}</groupId>
-                        <artifactId>jetty8</artifactId>
-                        <version>${version}</version>
-                        <type>car</type>
-                    </dependency>
-                </dependencies>
-                <hidden-classes/>
-                <non-overridable-classes>
-                    <filter>java.</filter>
-                    <filter>javax.</filter>
-                    <filter>org.apache.geronimo.</filter>
-                    <filter>org.apache.myfaces.</filter>
-                    <filter>org.apache.taglibs.</filter>
-                    <filter>org.mortbay.</filter>
-                    <filter>org.xml.</filter>
-                    <filter>org.w3c.</filter>
-                </non-overridable-classes>
-            </environment>
-        </xml-attribute>
+        <attribute name="jettyArtifact">${pom.groupId}/jetty8/${version}/car</attribute>
     </gbean>
 
     <gbean name="StaticContent" class="org.apache.geronimo.jetty8.DefaultServletHolderWrapper">



Mime
View raw message