geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r350206 [2/3] - in /geronimo/trunk: applications/console-core/src/java/org/apache/geronimo/console/core/jms/ applications/console-core/src/java/org/apache/geronimo/console/core/keystore/ applications/console-core/src/java/org/apache/geronim...
Date Thu, 01 Dec 2005 08:32:34 GMT
Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java Thu Dec  1 00:31:14 2005
@@ -526,7 +526,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Jetty WebApplication Context", JettyWebAppContext.class, NameFactory.WEB_MODULE);
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("Jetty WebApplication Context", JettyWebAppContext.class, NameFactory.WEB_MODULE);
         infoBuilder.addAttribute("deploymentDescriptor", String.class, true);
         //from jetty's webapp context
 

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java Thu Dec  1 00:31:14 2005
@@ -42,7 +42,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Connector AJP13", AJP13Connector.class, JettyConnector.GBEAN_INFO);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty Connector AJP13", AJP13Connector.class, JettyConnector.GBEAN_INFO);
         infoFactory.setConstructor(new String[]{"JettyContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java Thu Dec  1 00:31:14 2005
@@ -42,7 +42,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Connector HTTP", HTTPConnector.class, JettyConnector.GBEAN_INFO);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty Connector HTTP", HTTPConnector.class, JettyConnector.GBEAN_INFO);
         infoFactory.setConstructor(new String[]{"JettyContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java Thu Dec  1 00:31:14 2005
@@ -123,7 +123,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Connector HTTPS", HTTPSConnector.class, JettyConnector.GBEAN_INFO);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty Connector HTTPS", HTTPSConnector.class, JettyConnector.GBEAN_INFO);
         infoFactory.addAttribute("keystoreFileName", String.class, true, true);
         infoFactory.addAttribute("algorithm", String.class, true, true);
         infoFactory.addAttribute("keystorePassword", String.class, true, true);

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java Thu Dec  1 00:31:14 2005
@@ -231,7 +231,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty HTTP Connector", JettyConnector.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty HTTP Connector", JettyConnector.class);
         infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, JettyContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addInterface(JettyWebConnector.class, new String[]{"host", "port", "minThreads","maxThreads","bufferSizeBytes","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","connectUrl",},
                                                           new String[]{"host", "port", "redirectPort"});

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java Thu Dec  1 00:31:14 2005
@@ -260,7 +260,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Log Manager", JettyLogManagerImpl.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty Log Manager", JettyLogManagerImpl.class);
         infoFactory.addReference("LogGBeans", JettyRequestLog.class);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
         infoFactory.addInterface(JettyLogManager.class);

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java Thu Dec  1 00:31:14 2005
@@ -127,7 +127,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("NCSA Request Log", NCSARequestLog.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("NCSA Request Log", NCSARequestLog.class);
         infoFactory.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
 

Modified: geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/JMXConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/JMXConnector.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/JMXConnector.java (original)
+++ geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/JMXConnector.java Thu Dec  1 00:31:14 2005
@@ -141,7 +141,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JMXConnector.class); //TODO just  a gbean?
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(JMXConnector.class); //TODO just  a gbean?
         infoFactory.addAttribute("url", String.class, true, true);
         infoFactory.addAttribute("applicationConfigName", String.class, true, true);
         infoFactory.addAttribute("kernel", Kernel.class, false);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfo.java Thu Dec  1 00:31:14 2005
@@ -33,7 +33,7 @@
 import org.apache.geronimo.kernel.management.NotificationType;
 
 /**
- * Describes a GBean.
+ * Describes a GBean.  This class should never be constructed directly.  Insted use GBeanInfoBuilder.
  *
  * @version $Rev$ $Date$
  */
@@ -68,6 +68,7 @@
         }
     }
 
+    private final String sourceClass;
     private final String name;
     private final String className;
     private final String j2eeType;
@@ -79,25 +80,40 @@
     private final Set references;
     private final Set interfaces;
 
-    public GBeanInfo(String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces) {
-        this(className, className, j2eeType, attributes, constructor, operations, references, interfaces, DEFAULT_NOTIFICATIONS);
+    /**
+     * @deprecated use GBeanInfoBuilder
+     */
+    public GBeanInfo(String name, String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces) {
+        this(null, name, className, j2eeType, attributes, constructor, operations, references, interfaces, DEFAULT_NOTIFICATIONS);
     }
 
-    public GBeanInfo(String name, String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces) {
-        this(name, className, j2eeType, attributes, constructor, operations, references, interfaces, DEFAULT_NOTIFICATIONS);
+    /**
+     * @deprecated use GBeanInfoBuilder
+     */
+    public GBeanInfo(String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces) {
+        this(null, className, className, j2eeType, attributes, constructor, operations, references, interfaces, DEFAULT_NOTIFICATIONS);
     }
 
     /**
-     * @deprecated
+     * @deprecated use GBeanInfoBuilder
      */
     public GBeanInfo(String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces, Set notifications) {
-        this(className, className, j2eeType, attributes, constructor, operations, references, interfaces, notifications);
+        this(null, className, className, j2eeType, attributes, constructor, operations, references, interfaces, notifications);
     }
 
     /**
-     * @deprecated
+     * @deprecated use GBeanInfoBuilder
      */
     public GBeanInfo(String name, String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces, Set notifications) {
+        this(null, name, className, j2eeType, attributes, constructor, operations, references, interfaces, notifications);
+    }
+
+    GBeanInfo(String sourceClass, String name, String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces) {
+        this(sourceClass, name, className, j2eeType, attributes, constructor, operations, references, interfaces, DEFAULT_NOTIFICATIONS);
+    }
+
+    GBeanInfo(String sourceClass, String name, String className, String j2eeType, Collection attributes, GConstructorInfo constructor, Collection operations, Set references, Set interfaces, Set notifications) {
+        this.sourceClass = sourceClass;
         this.name = name;
         this.className = className;
         this.j2eeType = j2eeType;
@@ -140,6 +156,15 @@
         }
     }
 
+    /**
+     * Gets the source class from which this GBeanInfo can be retrieved using GBeanInfo.getGBeanInfo(className, classLoader).
+     * A null source class means the gbean info was dynamically generated.
+     * @return the source of this GBeanInfo, or null if it was dynamically generated
+     */
+    public String getSourceClass() {
+        return sourceClass;
+    }
+
     public String getName() {
         return name;
     }
@@ -212,7 +237,10 @@
     }
 
     public String toString() {
-        StringBuffer result = new StringBuffer("[GBeanInfo: id=").append(super.toString()).append(" name=").append(name);
+        StringBuffer result = new StringBuffer("[GBeanInfo:");
+        result.append(" id=").append(super.toString());
+        result.append(" sourceClass=").append(sourceClass);
+        result.append(" name=").append(name);
         for (Iterator iterator = attributes.iterator(); iterator.hasNext();) {
             GAttributeInfo geronimoAttributeInfo = (GAttributeInfo) iterator.next();
             result.append("\n    attribute: ").append(geronimoAttributeInfo);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java Thu Dec  1 00:31:14 2005
@@ -32,11 +32,72 @@
  * @version $Rev$ $Date$
  */
 public class GBeanInfoBuilder {
+    public static GBeanInfoBuilder createStatic(Class gbeanType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, gbeanType.getName(), gbeanType, null, null);
+    }
+
+    public static GBeanInfoBuilder createStatic(Class gbeanType, String j2eeType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, gbeanType.getName(), gbeanType, null, j2eeType);
+    }
+
+    public static GBeanInfoBuilder createStatic(String name, Class gbeanType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, name, gbeanType, null, null);
+    }
+
+    public static GBeanInfoBuilder createStatic(String name, Class gbeanType, String j2eeType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, name, gbeanType, null, j2eeType);
+    }
+
+    public static GBeanInfoBuilder createStatic(Class gbeanType, GBeanInfo source) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, gbeanType.getName(), gbeanType, source, null);
+    }
+
+    public static GBeanInfoBuilder createStatic(Class gbeanType, GBeanInfo source, String j2eeType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, gbeanType.getName(), gbeanType, source, j2eeType);
+    }
+
+    public static GBeanInfoBuilder createStatic(String name, Class gbeanType, GBeanInfo source) {
+        if (name == null) throw new NullPointerException("name is null");
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(gbeanType, name, gbeanType, source, null);
+    }
+
+    //
+    // These methods are used by classes that declare a GBeanInfo for another class
+    //
+    public static GBeanInfoBuilder createStatic(Class sourceClass, Class gbeanType) {
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(sourceClass, gbeanType.getName(), gbeanType, null, null);
+    }
+
+    public static GBeanInfoBuilder createStatic(Class sourceClass, Class gbeanType, String j2eeType) {
+        if (sourceClass == null) throw new NullPointerException("sourceClass is null");
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return createStatic(sourceClass, gbeanType.getName(), gbeanType, null, j2eeType);
+    }
+
+    public static GBeanInfoBuilder createStatic(Class sourceClass, String name, Class gbeanType, GBeanInfo source, String j2eeType) {
+        if (sourceClass == null) throw new NullPointerException("sourceClass is null");
+        if (name == null) throw new NullPointerException("name is null");
+        if (gbeanType == null) throw new NullPointerException("gbeanType is null");
+        return new GBeanInfoBuilder(sourceClass.getName(), name, gbeanType, source, j2eeType);
+    }
 
     public static final String DEFAULT_J2EE_TYPE = "GBean"; //NameFactory.GERONIMO_SERVICE
 
     private static final Class[] NO_ARGS = {};
 
+    /**
+     * The class from which the info can be retrieved using GBeanInfo.getGBeanInfo(className, classLoader)
+     */
+    private final String sourceClass;
+
     private final String name;
 
     private final String j2eeType;
@@ -77,7 +138,10 @@
         this(checkNotNull(gbeanType).getName(), gbeanType, source, j2eeType);
     }
 
-    //TODO this is not used, shall we remove it?
+    //TODO remove this
+    /**
+     * @deprecated This will be removed in a future release
+     */
     public GBeanInfoBuilder(String name, ClassLoader classLoader) {
         this(checkNotNull(name), loadClass(classLoader, name), GBeanInfo.getGBeanInfo(name, classLoader));
     }
@@ -87,10 +151,16 @@
     }
 
     public GBeanInfoBuilder(String name, Class gbeanType, GBeanInfo source, String j2eeType) {
+        this(null, name, gbeanType, source, j2eeType);
+    }
+
+    private GBeanInfoBuilder(String sourceClass, String name, Class gbeanType, GBeanInfo source, String j2eeType) {
         checkNotNull(name);
         checkNotNull(gbeanType);
         this.name = name;
         this.gbeanType = gbeanType;
+        this.sourceClass = sourceClass;
+
         if (source != null) {
             for (Iterator i = source.getAttributes().iterator(); i.hasNext();) {
                 GAttributeInfo attributeInfo = (GAttributeInfo) i.next();
@@ -306,8 +376,7 @@
             referenceInfos.add(new GReferenceInfo(referenceName, referenceType, proxyType, setterName, namingType));
         }
 
-
-        return new GBeanInfo(name, gbeanType.getName(), j2eeType, attributes.values(), constructor, operations.values(), referenceInfos, interfaces);
+        return new GBeanInfo(sourceClass, name, gbeanType.getName(), j2eeType, attributes.values(), constructor, operations.values(), referenceInfos, interfaces);
     }
 
     private Map getConstructorTypes() throws InvalidConfigurationException {
@@ -336,10 +405,10 @@
         }
 
         if (validConstructors.isEmpty()) {
-            throw new InvalidConfigurationException("Could not find a valid constructor for GBean: " + name);
+            throw new InvalidConfigurationException("Could not find a valid constructor for GBean: " + gbeanType.getName());
         }
         if (validConstructors.size() > 1) {
-            throw new InvalidConfigurationException("More then one valid constructors found for GBean: " + name);
+            throw new InvalidConfigurationException("More then one valid constructors found for GBean: " + gbeanType.getName());
         }
 
         Map constructorTypes = new HashMap();

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java Thu Dec  1 00:31:14 2005
@@ -164,7 +164,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(KernelGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(KernelGBean.class);
         infoFactory.addInterface(Kernel.class);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.setConstructor(new String[]{"kernel"});

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Thu Dec  1 00:31:14 2005
@@ -665,7 +665,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(Configuration.class);//does not use jsr-77 naming
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Configuration.class);//does not use jsr-77 naming
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addAttribute("id", URI.class, true, false);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java Thu Dec  1 00:31:14 2005
@@ -243,7 +243,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ConfigurationManagerImpl.class, "ConfigurationManager");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ConfigurationManagerImpl.class, "ConfigurationManager");
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addReference("Stores", ConfigurationStore.class, "ConfigurationStore");
         infoFactory.addReference("AttributeStore", ManageableAttributeStore.class, ManageableAttributeStore.ATTRIBUTE_STORE);

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java Thu Dec  1 00:31:14 2005
@@ -46,6 +46,8 @@
         } catch (Exception e) {
             throw new InvalidConfigException("Unable to add GBean to configuration", e);
         }
+
+        attributeStore.addGBean(configID.toString(), gbean);
     }
 
     public void removeGBeanFromConfiguration(URI configID, ObjectName gbean) throws GBeanNotFoundException, InvalidConfigException {
@@ -79,7 +81,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(EditableConfigurationManagerImpl.class, ConfigurationManagerImpl.GBEAN_INFO, "ConfigurationManager");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EditableConfigurationManagerImpl.class, ConfigurationManagerImpl.GBEAN_INFO, "ConfigurationManager");
         infoFactory.addInterface(EditableConfigurationManager.class);
         infoFactory.setConstructor(new String[]{"kernel", "Stores", "AttributeStore", "PersistentConfigurationList"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ManageableAttributeStore.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ManageableAttributeStore.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ManageableAttributeStore.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ManageableAttributeStore.java Thu Dec  1 00:31:14 2005
@@ -78,6 +78,14 @@
      */
     public void setShouldLoad(String configurationName, ObjectName gbean, boolean load);
 
+
+    /**
+     * Adds a GBean to the configuration.
+     * @param configurationName the configuration that the GBean belongs to
+     * @param gbeanData the GBean to add
+     */
+    public void addGBean(String configurationName, GBeanData gbeanData);
+
     /**
      * Saves the current values to persistent storage.  This should be called
      * when the server is shut down or more often, to make sure that any

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java Thu Dec  1 00:31:14 2005
@@ -122,7 +122,7 @@
         public static final GBeanInfo GBEAN_INFO;
 
         static {
-            GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(MockGBean.class);
+            GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MockGBean.class);
 
             infoFactory.addAttribute(nonPersistentAttrInfo);
             infoFactory.addAttribute(persistentAttrInfo);

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockDynamicGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockDynamicGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockDynamicGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockDynamicGBean.java Thu Dec  1 00:31:14 2005
@@ -59,7 +59,7 @@
     }
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("MockDynamicGBean", MockDynamicGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MockDynamicGBean.class);
         infoFactory.addAttribute(new DynamicGAttributeInfo("mutableInt", Integer.class.getName(), false, false, true, true));
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java Thu Dec  1 00:31:14 2005
@@ -57,7 +57,7 @@
     }
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("MockGBean", MockGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MockGBean.class);
         infoFactory.addAttribute("name", String.class, true);
         infoFactory.addAttribute("actualObjectName", String.class, false);
         infoFactory.addAttribute("objectName", String.class, false);

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/config/MyGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/config/MyGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/config/MyGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/config/MyGBean.java Thu Dec  1 00:31:14 2005
@@ -32,7 +32,7 @@
 
     public static final GBeanInfo GBEAN_INFO;
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(MyGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MyGBean.class);
         infoFactory.addOperation("main", new Class[] {String[].class});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/IMAPStoreGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/IMAPStoreGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/IMAPStoreGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/IMAPStoreGBean.java Thu Dec  1 00:31:14 2005
@@ -763,7 +763,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(IMAPStoreGBean.class, ProtocolGBean.GBEAN_INFO);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(IMAPStoreGBean.class, ProtocolGBean.GBEAN_INFO);
 
         infoFactory.addAttribute("port", Integer.class, true);
         infoFactory.addAttribute("partialFetch", Boolean.class, true);

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java Thu Dec  1 00:31:14 2005
@@ -361,7 +361,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(MailGBean.class, NameFactory.JAVA_MAIL_RESOURCE);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MailGBean.class, NameFactory.JAVA_MAIL_RESOURCE);
 
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addReference("Protocols", ProtocolGBean.class, NameFactory.GERONIMO_SERVICE);

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/POP3StoreGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/POP3StoreGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/POP3StoreGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/POP3StoreGBean.java Thu Dec  1 00:31:14 2005
@@ -426,7 +426,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(POP3StoreGBean.class, ProtocolGBean.GBEAN_INFO);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(POP3StoreGBean.class, ProtocolGBean.GBEAN_INFO);
 
         infoFactory.addAttribute("port", Integer.class, true);
         infoFactory.addAttribute("connectionTimeout", Integer.class, true);

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/ProtocolGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/ProtocolGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/ProtocolGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/ProtocolGBean.java Thu Dec  1 00:31:14 2005
@@ -165,7 +165,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ProtocolGBean.class); //TODO just a gbean?
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ProtocolGBean.class); //TODO just a gbean?
 
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addAttribute("protocol", String.class, true);

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/SMTPTransportGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/SMTPTransportGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/SMTPTransportGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/SMTPTransportGBean.java Thu Dec  1 00:31:14 2005
@@ -730,7 +730,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SMTPTransportGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SMTPTransportGBean.class);
 
         infoFactory.addAttribute("port", Integer.class, true);
         infoFactory.addAttribute("connectionTimeout", Integer.class, true);

Modified: geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java (original)
+++ geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java Thu Dec  1 00:31:14 2005
@@ -139,7 +139,7 @@
     }
 
     public GBeanInfo getGbeanInfo() {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(TestProxyFactory.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ContextBuilderTest.class, TestProxyFactory.class);
         infoFactory.addAttribute("Content", Object.class, true);
         infoFactory.addOperation("getProxy");
         infoFactory.setConstructor(new String[]{"Content"});

Modified: geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java (original)
+++ geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java Thu Dec  1 00:31:14 2005
@@ -153,7 +153,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(LoginConfigBuilder.class, "XmlReferenceBuilder");
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(LoginConfigBuilder.class, "XmlReferenceBuilder");
         infoBuilder.addInterface(XmlReferenceBuilder.class);
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java Thu Dec  1 00:31:14 2005
@@ -118,7 +118,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SecurityServiceImpl.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SecurityServiceImpl.class);
 
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
         infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java Thu Dec  1 00:31:14 2005
@@ -61,7 +61,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(DirectConfigurationEntry.class, NameFactory.CONFIGURATION_ENTRY);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DirectConfigurationEntry.class, NameFactory.CONFIGURATION_ENTRY);
         infoFactory.addInterface(ConfigurationEntryFactory.class);
         infoFactory.addAttribute("applicationConfigName", String.class, true);
         infoFactory.addAttribute("controlFlag", LoginModuleControlFlag.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java Thu Dec  1 00:31:14 2005
@@ -151,7 +151,7 @@
     private static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(GeronimoLoginConfiguration.class); //just a gbean
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(GeronimoLoginConfiguration.class); //just a gbean
         infoFactory.addReference("Configurations", ConfigurationEntryFactory.class, null);
 
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginModuleUse.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginModuleUse.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginModuleUse.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginModuleUse.java Thu Dec  1 00:31:14 2005
@@ -126,7 +126,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JaasLoginModuleUse.class, "LoginModuleUse");
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JaasLoginModuleUse.class, "LoginModuleUse");
         infoBuilder.addAttribute("controlFlag", String.class, true);
         infoBuilder.addAttribute("kernel", Kernel.class, false, false);
         infoBuilder.addReference("LoginModule", LoginModuleGBean.class, NameFactory.LOGIN_MODULE);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/LoginModuleGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/LoginModuleGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/LoginModuleGBean.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/LoginModuleGBean.java Thu Dec  1 00:31:14 2005
@@ -105,7 +105,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(LoginModuleGBean.class, NameFactory.LOGIN_MODULE);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(LoginModuleGBean.class, NameFactory.LOGIN_MODULE);
         infoFactory.addAttribute("options", Properties.class, true);
         infoFactory.addAttribute("loginModuleClass", String.class, true);
         infoFactory.addAttribute("objectName", String.class, false);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java Thu Dec  1 00:31:14 2005
@@ -91,7 +91,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ServerRealmConfigurationEntry.class, NameFactory.CONFIGURATION_ENTRY);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ServerRealmConfigurationEntry.class, NameFactory.CONFIGURATION_ENTRY);
         infoFactory.addInterface(ConfigurationEntryFactory.class);
         infoFactory.addAttribute("applicationConfigName", String.class, true);
         infoFactory.addAttribute("realmName", String.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/server/JaasLoginService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/server/JaasLoginService.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/server/JaasLoginService.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/server/JaasLoginService.java Thu Dec  1 00:31:14 2005
@@ -432,7 +432,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JaasLoginService.class, "JaasLoginService");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(JaasLoginService.class, "JaasLoginService");
 
         infoFactory.addAttribute("algorithm", String.class, true);
         infoFactory.addAttribute("password", String.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ApplicationPolicyConfigurationManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ApplicationPolicyConfigurationManager.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ApplicationPolicyConfigurationManager.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ApplicationPolicyConfigurationManager.java Thu Dec  1 00:31:14 2005
@@ -147,7 +147,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ApplicationPolicyConfigurationManager.class, NameFactory.JACC_MANAGER);
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(ApplicationPolicyConfigurationManager.class, NameFactory.JACC_MANAGER);
         infoBuilder.addAttribute("contextIdToPermissionsMap", Map.class, true);
         infoBuilder.addAttribute("principalRoleMap", Map.class, true);
         infoBuilder.addAttribute("roleDesignates", Map.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java Thu Dec  1 00:31:14 2005
@@ -170,7 +170,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(GenericSecurityRealm.class, NameFactory.SECURITY_REALM);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(GenericSecurityRealm.class, NameFactory.SECURITY_REALM);
 
         infoFactory.addInterface(SecurityRealm.class);
         infoFactory.addInterface(ConfigurationEntryFactory.class);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java Thu Dec  1 00:31:14 2005
@@ -181,7 +181,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Remote Login Listener", JaasLoginServiceRemotingServer.class); //has fixed name, j2eeType is irrelevant
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Remote Login Listener", JaasLoginServiceRemotingServer.class); //has fixed name, j2eeType is irrelevant
         infoFactory.addAttribute("clientConnectURI", URI.class, false);
         infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "JaasLoginService");
         infoFactory.addInterface(NetworkConnector.class, new String[]{"host", "port", "protocol"}, new String[]{"host", "port"});

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java (original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java Thu Dec  1 00:31:14 2005
@@ -126,7 +126,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JavaBeanXmlAttributeBuilder.class, "XmlAttributeBuilder");
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JavaBeanXmlAttributeBuilder.class, "XmlAttributeBuilder");
         infoBuilder.addInterface(XmlAttributeBuilder.class);
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Thu Dec  1 00:31:14 2005
@@ -434,7 +434,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ServiceConfigBuilder.class, NameFactory.CONFIG_BUILDER);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ServiceConfigBuilder.class, NameFactory.CONFIG_BUILDER);
 
         infoFactory.addInterface(ConfigurationBuilder.class);
 

Modified: geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java (original)
+++ geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java Thu Dec  1 00:31:14 2005
@@ -88,7 +88,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("MockGBean", MockGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MockGBean.class);
 
         infoFactory.addAttribute("name", String.class, true);
         infoFactory.addAttribute("value", String.class, true);

Modified: geronimo/trunk/modules/servicemix-builder/src/java/org/apache/geronimo/servicemix/deployment/ServiceMixConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/servicemix-builder/src/java/org/apache/geronimo/servicemix/deployment/ServiceMixConfigBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/servicemix-builder/src/java/org/apache/geronimo/servicemix/deployment/ServiceMixConfigBuilder.java (original)
+++ geronimo/trunk/modules/servicemix-builder/src/java/org/apache/geronimo/servicemix/deployment/ServiceMixConfigBuilder.java Thu Dec  1 00:31:14 2005
@@ -62,7 +62,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ServiceMixConfigBuilder.class, NameFactory.CONFIG_BUILDER);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ServiceMixConfigBuilder.class, NameFactory.CONFIG_BUILDER);
         infoFactory.addInterface(ConfigurationBuilder.class);
         infoFactory.addAttribute("defaultParentId", List.class, true);
         infoFactory.addAttribute("deploymentDependencies", String.class, true);

Modified: geronimo/trunk/modules/servicemix/src/java/org/apache/geronimo/servicemix/ServiceMixDeployment.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/servicemix/src/java/org/apache/geronimo/servicemix/ServiceMixDeployment.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/servicemix/src/java/org/apache/geronimo/servicemix/ServiceMixDeployment.java (original)
+++ geronimo/trunk/modules/servicemix/src/java/org/apache/geronimo/servicemix/ServiceMixDeployment.java Thu Dec  1 00:31:14 2005
@@ -12,7 +12,7 @@
 
     public static final GBeanInfo GBEAN_INFO;
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ServiceMixDeployment.class);
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(ServiceMixDeployment.class);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
         infoBuilder.addAttribute("configurationBaseUrl", URL.class, true);
         infoBuilder.setConstructor(new String[] { "classLoader", "configurationBaseUrl" });

Modified: geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java (original)
+++ geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigBuilder.java Thu Dec  1 00:31:14 2005
@@ -71,7 +71,7 @@
 
   static
   {
-    GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SPRConfigBuilder.class, NameFactory.CONFIG_BUILDER);
+    GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SPRConfigBuilder.class, NameFactory.CONFIG_BUILDER);
     infoFactory.addAttribute("defaultParentId" , List.class, true);
     infoFactory.addReference("Repository"      , Repository.class, NameFactory.GERONIMO_SERVICE);
     infoFactory.addAttribute("kernel"          , Kernel.class, false);

Modified: geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigurer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigurer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigurer.java (original)
+++ geronimo/trunk/modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/SPRConfigurer.java Thu Dec  1 00:31:14 2005
@@ -40,7 +40,7 @@
 
   static
   {
-    GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SPRConfigurer.class, NameFactory.DEPLOYMENT_CONFIGURER);
+    GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SPRConfigurer.class, NameFactory.DEPLOYMENT_CONFIGURER);
     infoFactory.addInterface(ModuleConfigurer.class);
     GBEAN_INFO = infoFactory.getBeanInfo();
   }

Modified: geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/POJOGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/POJOGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/POJOGBean.java (original)
+++ geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/POJOGBean.java Thu Dec  1 00:31:14 2005
@@ -44,7 +44,7 @@
 
   static
   {
-    GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Spring Managed POJO", POJOGBean.class);
+    GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("Spring Managed POJO", POJOGBean.class);
 
     infoBuilder.addAttribute("kernel"     , Kernel.class , false);
     infoBuilder.addAttribute("objectName" , String.class , false);

Modified: geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringApplicationImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringApplicationImpl.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringApplicationImpl.java (original)
+++ geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringApplicationImpl.java Thu Dec  1 00:31:14 2005
@@ -33,7 +33,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SpringApplicationImpl.class, "SpringApplication");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SpringApplicationImpl.class, "SpringApplication");
 
 	//        infoFactory.addAttribute("kernel", Kernel.class, false);
 	//        infoFactory.addAttribute("objectName", String.class, false);

Modified: geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringGBean.java (original)
+++ geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/SpringGBean.java Thu Dec  1 00:31:14 2005
@@ -71,7 +71,7 @@
 
   static
   {
-    GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Spring Application Context", SpringGBean.class);
+    GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("Spring Application Context", SpringGBean.class);
 
     infoBuilder.addAttribute("kernel"               , Kernel.class      , false);
     infoBuilder.addAttribute("objectName"           , String.class      , false);
@@ -308,7 +308,7 @@
       throws MalformedObjectNameException
   {
     Class c=createProxyClass(bean);
-    GBeanInfoBuilder gbif = new GBeanInfoBuilder(c, "POJO["+(_count++)+"]");
+    GBeanInfoBuilder gbif = GBeanInfoBuilder.createStatic(c, "POJO["+(_count++)+"]");
 
     gbif.addAttribute("invocationHandler", java.lang.reflect.InvocationHandler.class, true);
     gbif.setConstructor(new String[]{"invocationHandler"});

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/FileConfigurationList.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/FileConfigurationList.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/FileConfigurationList.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/FileConfigurationList.java Thu Dec  1 00:31:14 2005
@@ -230,7 +230,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(FileConfigurationList.class, "PersistentConfigurationList");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(FileConfigurationList.class, "PersistentConfigurationList");
         infoFactory.addInterface(PersistentConfigurationList.class);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addAttribute("kernelFullyStarted", boolean.class, false);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java Thu Dec  1 00:31:14 2005
@@ -19,6 +19,7 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.apache.geronimo.gbean.GBeanData;
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -26,6 +27,8 @@
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
+import java.util.Collections;
 
 /**
  * @version $Rev$ $Date$
@@ -34,15 +37,29 @@
     private final Object name;
     private boolean load;
     private final Map attributes = new LinkedHashMap();
+    private final Map references = new LinkedHashMap();
+    private final String gbeanInfoSource;
 
     public GBeanOverride(String name, boolean load) {
         this.name = name;
         this.load = load;
+        gbeanInfoSource = null;
     }
 
     public GBeanOverride(ObjectName name, boolean load) {
         this.name = name;
         this.load = load;
+        gbeanInfoSource = null;
+    }
+
+    public GBeanOverride(GBeanData gbeanData) {
+        gbeanInfoSource = gbeanData.getGBeanInfo().getSourceClass();
+        if (gbeanInfoSource == null) {
+            throw new IllegalArgumentException("GBeanInfo must have a source class set");
+        }
+        name = gbeanData.getName();
+        attributes.putAll(gbeanData.getAttributes());
+        references.putAll(gbeanData.getReferences());
     }
 
     public GBeanOverride(Element gbean) throws MalformedObjectNameException {
@@ -53,6 +70,8 @@
             name = nameString;
         }
 
+        gbeanInfoSource = gbean.getAttribute("gbeanInfo");
+
         String loadString = gbean.getAttribute("load");
         load = !"false".equals(loadString);
 
@@ -76,6 +95,10 @@
         return name;
     }
 
+    public String getGbeanInfoSource() {
+        return gbeanInfoSource;
+    }
+
     public boolean isLoad() {
         return load;
     }
@@ -96,6 +119,22 @@
         attributes.put(attributeName, attributeValue);
     }
 
+    public Map getReferences() {
+        return references;
+    }
+
+    public Set getReferencePatterns(String name) {
+        return (Set) references.get(name);
+    }
+
+    public void setReferencePattern(String name, ObjectName pattern) {
+        setReferencePatterns(name, Collections.singleton(pattern));
+    }
+
+    public void setReferencePatterns(String name, Set patterns) {
+        references.put(name, patterns);
+    }
+
     public void writeXml(PrintWriter out) {
         String gbeanName;
         if (name instanceof String) {
@@ -105,6 +144,10 @@
         }
 
         out.print("    <gbean name=\"" + gbeanName + "\"");
+        if (gbeanInfoSource != null) {
+            out.print(" gbeanInfoSource=\"" + gbeanInfoSource + "\"");
+        }
+        
         if (!load) {
             out.print(" load=\"false\"");
         }

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java Thu Dec  1 00:31:14 2005
@@ -94,12 +94,13 @@
 
     public synchronized Collection setAttributes(URI configurationName, Collection datas) throws InvalidConfigException {
         String configName = configurationName.toString();
-        ConfigurationOverride configurationOverride = serverOverride.getConfiguration(configName);
-        if (configurationOverride != null) {
-            if (configurationOverride.isLoad()) {
+        ConfigurationOverride configuration = serverOverride.getConfiguration(configName);
+        if (configuration != null) {
+            if (configuration.isLoad()) {
+                // todo add new gbeans here
                 for (Iterator iterator = datas.iterator(); iterator.hasNext();) {
                     GBeanData data = (GBeanData) iterator.next();
-                    boolean load = setAttributes(data, configurationOverride, configName);
+                    boolean load = setAttributes(data, configuration, configName);
                     if (!load) {
                         iterator.remove();
                     }
@@ -115,21 +116,21 @@
      * Set the attributes from the attribute store on a single gbean, and return whether or not to load the gbean.
      *
      * @param data
-     * @param configurationOverride
+     * @param configuration
      * @param configName
      * @return true if the gbean should be loaded, false otherwise.
      * @throws org.apache.geronimo.kernel.config.InvalidConfigException
      */
-    private synchronized boolean setAttributes(GBeanData data, ConfigurationOverride configurationOverride, String configName) throws InvalidConfigException {
+    private synchronized boolean setAttributes(GBeanData data, ConfigurationOverride configuration, String configName) throws InvalidConfigException {
         ObjectName gbeanName = data.getName();
         GBeanInfo gBeanInfo = data.getGBeanInfo();
-        GBeanOverride attributeMap = configurationOverride.getGBean(gbeanName);
-        if (attributeMap == null) {
-            attributeMap = configurationOverride.getGBean(gbeanName.getKeyProperty("name"));
-        }
-        if (attributeMap != null) {
-            if (attributeMap.isLoad()) {
-                for (Iterator iterator = attributeMap.getAttributes().entrySet().iterator(); iterator.hasNext();) {
+        GBeanOverride gbean = configuration.getGBean(gbeanName);
+        if (gbean == null) {
+            gbean = configuration.getGBean(gbeanName.getKeyProperty("name"));
+        }
+        if (gbean != null) {
+            if (gbean.isLoad()) {
+                for (Iterator iterator = gbean.getAttributes().entrySet().iterator(); iterator.hasNext();) {
                     Map.Entry entry = (Map.Entry) iterator.next();
                     String attributeName = (String) entry.getKey();
                     GAttributeInfo attributeInfo = gBeanInfo.getAttribute(attributeName);
@@ -174,13 +175,13 @@
         if (readOnly) {
             return;
         }
-        ConfigurationOverride config = serverOverride.getConfiguration(configurationName, true);
-        GBeanOverride gbeanOverride = config.getGBean(gbeanName);
-        if (gbeanOverride == null) {
-            gbeanOverride = config.getGBean(gbeanName.getKeyProperty("name"));
-            if (gbeanOverride == null) {
-                gbeanOverride = new GBeanOverride(gbeanName, true);
-                config.addGBean(gbeanName, gbeanOverride);
+        ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName, true);
+        GBeanOverride gbean = configuration.getGBean(gbeanName);
+        if (gbean == null) {
+            gbean = configuration.getGBean(gbeanName.getKeyProperty("name"));
+            if (gbean == null) {
+                gbean = new GBeanOverride(gbeanName, true);
+                configuration.addGBean(gbeanName, gbean);
             }
         }
         try {
@@ -194,7 +195,7 @@
                 editor.setValue(value);
                 string = editor.getAsText();
             }
-            Map attrMap = gbeanOverride.getAttributes();
+            Map attrMap = gbean.getAttributes();
             attrMap.put(attribute.getName(), string);
             attributeChanged();
         } catch (ClassNotFoundException e) {
@@ -207,23 +208,35 @@
         if (readOnly) {
             return;
         }
-        ConfigurationOverride config = serverOverride.getConfiguration(configurationName, true);
+        ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName, true);
 
-        GBeanOverride atts = config.getGBean(gbeanName);
-        if (atts == null) {
+        GBeanOverride gbean = configuration.getGBean(gbeanName);
+        if (gbean == null) {
             // attempt to lookup by short name
-            atts = config.getGBean(gbeanName.getKeyProperty("name"));
+            gbean = configuration.getGBean(gbeanName.getKeyProperty("name"));
         }
 
-        if (atts == null) {
-            atts = new GBeanOverride(gbeanName, load);
-            config.addGBean(gbeanName, atts);
+        if (gbean == null) {
+            gbean = new GBeanOverride(gbeanName, load);
+            configuration.addGBean(gbeanName, gbean);
         } else {
-            atts.setLoad(load);
+            gbean.setLoad(load);
         }
         attributeChanged();
     }
 
+    public void addGBean(String configurationName, GBeanData gbeanData) {
+        if (readOnly) {
+            return;
+        }
+        ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName);
+        if (configuration == null) {
+            log.debug("Can not add GBean; Configuration not found " + configurationName);
+        }
+        GBeanOverride gbean = new GBeanOverride(gbeanData);
+        configuration.addGBean(gbean);
+    }
+
     public synchronized void load() throws IOException {
         ensureParentDirectory();
         if (!attributeFile.exists()) {
@@ -294,8 +307,8 @@
         List configs = new ArrayList();
         for (Iterator iterator = serverOverride.getConfigurations().entrySet().iterator(); iterator.hasNext();) {
             Map.Entry entry = (Map.Entry) iterator.next();
-            ConfigurationOverride configurationOverride = (ConfigurationOverride) entry.getValue();
-            if (configurationOverride.isLoad()) {
+            ConfigurationOverride configuration = (ConfigurationOverride) entry.getValue();
+            if (configuration.isLoad()) {
                 String configName = (String) entry.getKey();
                 try {
                     URI configID = new URI(configName);
@@ -309,8 +322,8 @@
     }
 
     public synchronized void addConfiguration(String configurationName) {
-        ConfigurationOverride config = serverOverride.getConfiguration(configurationName, true);
-        config.setLoad(true);
+        ConfigurationOverride configuration = serverOverride.getConfiguration(configurationName, true);
+        configuration.setLoad(true);
     }
 
     public synchronized void removeConfiguration(String configName) {
@@ -403,7 +416,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(LocalAttributeManager.class, "AttributeStore");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(LocalAttributeManager.class, "AttributeStore");
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
         infoFactory.addAttribute("configFile", String.class, true);
         infoFactory.addAttribute("readOnly", boolean.class, true);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java Thu Dec  1 00:31:14 2005
@@ -417,7 +417,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(LocalConfigStore.class, "ConfigurationStore"); //NameFactory.CONFIGURATION_STORE
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(LocalConfigStore.class, "ConfigurationStore"); //NameFactory.CONFIGURATION_STORE
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addAttribute("objectName", String.class, false);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/jmx/MBeanServerKernelBridge.java Thu Dec  1 00:31:14 2005
@@ -179,7 +179,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(MBeanServerKernelBridge.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MBeanServerKernelBridge.class);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addAttribute("mbeanServerId", String.class, true);
         infoFactory.setConstructor(new String[]{"kernel", "mbeanServerId"});

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java Thu Dec  1 00:31:14 2005
@@ -660,7 +660,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(Log4jService.class, "SystemLog");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Log4jService.class, "SystemLog");
 
         infoFactory.addAttribute("configFileName", String.class, true);
         infoFactory.addAttribute("refreshPeriodSeconds", int.class, true);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/NamingProperties.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/NamingProperties.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/NamingProperties.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/NamingProperties.java Thu Dec  1 00:31:14 2005
@@ -47,7 +47,7 @@
     public static final GBeanInfo gbeanInfo;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(NamingProperties.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(NamingProperties.class);
         infoFactory.addAttribute("namingFactoryInitial", String.class, true);
         infoFactory.addAttribute("namingFactoryUrlPkgs", String.class, true);
         infoFactory.addAttribute("namingProviderUrl", String.class, true, true);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/SystemProperties.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/SystemProperties.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/SystemProperties.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/properties/SystemProperties.java Thu Dec  1 00:31:14 2005
@@ -57,7 +57,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(SystemProperties.class, "GBean");
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(SystemProperties.class, "GBean");
         infoBuilder.addAttribute("systemProperties", Properties.class, true, true);
         infoBuilder.addAttribute("systemPathProperties", Properties.class, true, true);
         infoBuilder.addReference("ServerInfo", ServerInfo.class, "GBean");

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/FileSystemRepository.java Thu Dec  1 00:31:14 2005
@@ -215,7 +215,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(FileSystemRepository.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(FileSystemRepository.class);
 
         infoFactory.addAttribute("root", URI.class, true);
 

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/ReadOnlyRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/ReadOnlyRepository.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/ReadOnlyRepository.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repository/ReadOnlyRepository.java Thu Dec  1 00:31:14 2005
@@ -98,7 +98,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ReadOnlyRepository.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ReadOnlyRepository.class);
 
         infoFactory.addAttribute("root", URI.class, true);
 

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIRegistryService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIRegistryService.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIRegistryService.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/RMIRegistryService.java Thu Dec  1 00:31:14 2005
@@ -79,7 +79,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("RMI Naming", RMIRegistryService.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("RMI Naming", RMIRegistryService.class);
         infoFactory.addAttribute("host", String.class, false);
         infoFactory.addAttribute("protocol", String.class, false);
         infoFactory.addAttribute("port", int.class, true, true);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java Thu Dec  1 00:31:14 2005
@@ -127,7 +127,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(BasicServerInfo.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(BasicServerInfo.class);
 
         infoFactory.addAttribute("baseDirectory", String.class, true);
         infoFactory.addAttribute("version", String.class, false);

Modified: geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/configuration/MockGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/configuration/MockGBean.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/configuration/MockGBean.java (original)
+++ geronimo/trunk/modules/system/src/test/org/apache/geronimo/system/configuration/MockGBean.java Thu Dec  1 00:31:14 2005
@@ -39,7 +39,7 @@
     }
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("MockGBean", MockGBean.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(MockGBean.class);
         infoFactory.addAttribute("value", String.class, true);
 
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledNonTransactionalTimer.java Thu Dec  1 00:31:14 2005
@@ -51,7 +51,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JDBCStoreThreadPooledNonTransactionalTimer.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(JDBCStoreThreadPooledNonTransactionalTimer.class);
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addReference("ManagedConnectionFactoryWrapper", ManagedConnectionFactoryWrapper.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/jdbc/JDBCStoreThreadPooledTransactionalTimer.java Thu Dec  1 00:31:14 2005
@@ -55,7 +55,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JDBCStoreThreadPooledTransactionalTimer.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(JDBCStoreThreadPooledTransactionalTimer.class);
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addAttribute("repeatCount", int.class, true);

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledNonTransactionalTimer.java Thu Dec  1 00:31:14 2005
@@ -43,7 +43,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(VMStoreThreadPooledNonTransactionalTimer.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(VMStoreThreadPooledNonTransactionalTimer.class);
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addReference("ThreadPool", Executor.class, NameFactory.GERONIMO_SERVICE);

Modified: geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java (original)
+++ geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/vm/VMStoreThreadPooledTransactionalTimer.java Thu Dec  1 00:31:14 2005
@@ -45,7 +45,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(VMStoreThreadPooledTransactionalTimer.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(VMStoreThreadPooledTransactionalTimer.class);
         infoFactory.addInterface(PersistentTimer.class);
 
         infoFactory.addAttribute("repeatCount", int.class, true);

Modified: geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=350206&r1=350205&r2=350206&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Thu Dec  1 00:31:14 2005
@@ -982,7 +982,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(TomcatModuleBuilder.class, NameFactory.MODULE_BUILDER);
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(TomcatModuleBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addAttribute("defaultParentId", URI[].class, true, true);
         infoBuilder.addAttribute("defaultContextPriorityClassloader", boolean.class, true, true);
         infoBuilder.addAttribute("tomcatContainerObjectName", ObjectName.class, true, true);



Mime
View raw message