geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r263902 - in /geronimo/trunk: configs/j2ee-server/ configs/j2ee-server/src/plan/ configs/j2ee-system/src/plan/ configs/rmi-naming/ configs/rmi-naming/src/ configs/rmi-naming/src/plan/ modules/assembly/src/plan/ modules/kernel/src/java/org/a...
Date Sun, 28 Aug 2005 18:50:43 GMT
Author: jboynes
Date: Sun Aug 28 11:50:31 2005
New Revision: 263902

URL: http://svn.apache.org/viewcvs?rev=263902&view=rev
Log:
fix for GERONIMO-935 by injecting a reference to the config

Added:
    geronimo/trunk/configs/rmi-naming/
      - copied from r263831, geronimo/trunk/configs/j2ee-server/
    geronimo/trunk/configs/rmi-naming/LICENSE.txt
      - copied unchanged from r263897, geronimo/trunk/configs/j2ee-server/LICENSE.txt
    geronimo/trunk/configs/rmi-naming/NOTICE.txt
      - copied unchanged from r263897, geronimo/trunk/configs/j2ee-server/NOTICE.txt
    geronimo/trunk/configs/rmi-naming/maven.xml
      - copied unchanged from r263897, geronimo/trunk/configs/j2ee-server/maven.xml
    geronimo/trunk/configs/rmi-naming/project.properties
      - copied, changed from r263897, geronimo/trunk/configs/j2ee-server/project.properties
    geronimo/trunk/configs/rmi-naming/project.xml
      - copied, changed from r263897, geronimo/trunk/configs/j2ee-server/project.xml
    geronimo/trunk/configs/rmi-naming/src/
      - copied from r263897, geronimo/trunk/configs/j2ee-server/src/
    geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java   (with props)
Modified:
    geronimo/trunk/configs/j2ee-server/project.xml
    geronimo/trunk/configs/j2ee-server/src/plan/plan.xml
    geronimo/trunk/configs/j2ee-system/src/plan/plan.xml
    geronimo/trunk/configs/rmi-naming/src/plan/plan.xml
    geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml
    geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml
    geronimo/trunk/modules/assembly/src/plan/system-plan.xml
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/ManageableAttributeStore.java
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
    geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
    geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java

Modified: geronimo/trunk/configs/j2ee-server/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-server/project.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-server/project.xml (original)
+++ geronimo/trunk/configs/j2ee-server/project.xml Sun Aug 28 11:50:31 2005
@@ -25,9 +25,10 @@
     <name>Server Configuration for the J2EE Server</name>
 
     <dependencies>
+        <!-- parent config -->
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>j2ee-system</artifactId>
+            <artifactId>rmi-naming</artifactId>
             <version>${geronimo_version}</version>
             <type>car</type>
         </dependency>

Modified: geronimo/trunk/configs/j2ee-server/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-server/src/plan/plan.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-server/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/j2ee-server/src/plan/plan.xml Sun Aug 28 11:50:31 2005
@@ -27,7 +27,7 @@
 <configuration
     xmlns="http://geronimo.apache.org/xml/ns/deployment"
     configId="${pom.groupId}/cars/${pom.artifactId}-${pom.currentVersion}.car"
-    parentId="${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car"
+    parentId="${pom.groupId}/cars/rmi-naming-${pom.currentVersion}.car"
     >
 
     <!--runtime dependencies-->

Modified: geronimo/trunk/configs/j2ee-system/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-system/src/plan/plan.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-system/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/j2ee-system/src/plan/plan.xml Sun Aug 28 11:50:31 2005
@@ -26,7 +26,7 @@
 specific services - those should be provided by children.
 -->
 
-<!-- $Rev$ $Date$ -->
+<!-- $Rev:$ $Date:$ -->
 <configuration
     xmlns="http://geronimo.apache.org/xml/ns/deployment"
     configId="${pom.groupId}/cars/${pom.artifactId}-${pom.currentVersion}.car"
@@ -136,17 +136,5 @@
         <attribute name="configFileName">var/log/server-log4j.properties</attribute>
         <attribute name="refreshPeriodSeconds">60</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
-    <!-- RMI Registry -->
-    <gbean name="RMIRegistry" class="org.apache.geronimo.system.rmi.RMIRegistryService">
-        <attribute name="port">1099</attribute>
-    </gbean>
-
-    <!-- Naming properties -->
-    <gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">
-        <attribute name="namingFactoryInitial">com.sun.jndi.rmi.registry.RegistryContextFactory</attribute>
-        <attribute name="namingFactoryUrlPkgs">org.apache.geronimo.naming</attribute>
-        <attribute name="namingProviderUrl">rmi://localhost:1099</attribute>
     </gbean>
 </configuration>

Copied: geronimo/trunk/configs/rmi-naming/project.properties (from r263897, geronimo/trunk/configs/j2ee-server/project.properties)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/rmi-naming/project.properties?p2=geronimo/trunk/configs/rmi-naming/project.properties&p1=geronimo/trunk/configs/j2ee-server/project.properties&r1=263897&r2=263902&rev=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-server/project.properties (original)
+++ geronimo/trunk/configs/rmi-naming/project.properties Sun Aug 28 11:50:31 2005
@@ -24,9 +24,5 @@
 # just use basic GBean deployer
 geronimo.packaging.deploymentConfig=geronimo/cars/geronimo-gbean-deployer-${geronimo_version}.car
 
-PlanHTTPPort=8080
-PlanHTTPSPort=8443
-PlanOpenEJBPort=4201
 PlanServerHostname=localhost
-PlanClientAddresses=127.0.0.1
-PlanRemoteLoginPort=4242
+PlanNamingPort=1099

Copied: geronimo/trunk/configs/rmi-naming/project.xml (from r263897, geronimo/trunk/configs/j2ee-server/project.xml)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/rmi-naming/project.xml?p2=geronimo/trunk/configs/rmi-naming/project.xml&p1=geronimo/trunk/configs/j2ee-server/project.xml&r1=263897&r2=263902&rev=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-server/project.xml (original)
+++ geronimo/trunk/configs/rmi-naming/project.xml Sun Aug 28 11:50:31 2005
@@ -21,10 +21,11 @@
 <project>
     <pomVersion>3</pomVersion>
     <extend>../../etc/project.xml</extend>
-    <id>j2ee-server</id>
-    <name>Server Configuration for the J2EE Server</name>
+    <id>rmi-naming</id>
+    <name>RMI/Naming configuration</name>
 
     <dependencies>
+        <!-- parent config -->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>j2ee-system</artifactId>

Modified: geronimo/trunk/configs/rmi-naming/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/rmi-naming/src/plan/plan.xml?rev=263902&r1=263897&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/configs/rmi-naming/src/plan/plan.xml (original)
+++ geronimo/trunk/configs/rmi-naming/src/plan/plan.xml Sun Aug 28 11:50:31 2005
@@ -19,10 +19,7 @@
 <!-- $Rev$ $Date$ -->
 
 <!--
-Configuration for the main ring of a Geronimo server.
-
-This configuration should contain those services normally provided
-by the server.
+    Configuration that configures the RMI registry and naming properties.
 -->
 <configuration
     xmlns="http://geronimo.apache.org/xml/ns/deployment"
@@ -30,327 +27,15 @@
     parentId="${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car"
     >
 
-    <!--runtime dependencies-->
-    <dependency>
-        <groupId>geronimo-spec</groupId>
-        <artifactId>geronimo-spec-j2ee</artifactId>
-        <version>${geronimo_spec_j2ee_version}</version>
-    </dependency>
-
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-activation</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-management</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-j2ee</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-core</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-connector</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-naming</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-timer</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-transaction</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-security</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-webservices</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-jmxremoting</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-client</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-axis</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-servicemix</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>geronimo-jetty</artifactId>
-        <version>${geronimo_version}</version>
-    </dependency>
-
-    <dependency>
-        <groupId>concurrent</groupId>
-        <artifactId>concurrent</artifactId>
-        <version>${concurrent_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>tranql</groupId>
-        <artifactId>tranql</artifactId>
-        <version>${tranql_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>openejb</groupId>
-        <artifactId>openejb-core</artifactId>
-        <version>${openejb_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>howl</groupId>
-        <artifactId>howl-logger</artifactId>
-        <version>${howl_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>antlr</groupId>
-        <artifactId>antlr</artifactId>
-        <version>${antlr_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>regexp</groupId>
-        <artifactId>regexp</artifactId>
-        <version>${regexp_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>xstream</groupId>
-        <artifactId>xstream</artifactId>
-        <version>${xstream_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>xpp3</groupId>
-        <artifactId>xpp3</artifactId>
-        <version>${xpp3_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>asm</groupId>
-        <artifactId>asm</artifactId>
-        <version>${asm_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>activemq</groupId>
-        <artifactId>activemq-gbean-management</artifactId>
-        <version>${activemq_version}</version>
-    </dependency>
-    <dependency>
-        <groupId>activeio</groupId>
-        <artifactId>activeio</artifactId>
-        <version>${activeio_version}</version>
-    </dependency>
-
-    <!-- default WAR container using Jetty -->
-    <gbean name="WebContainer" class="org.apache.geronimo.jetty.JettyContainerImpl">
-    </gbean>
-
-    <gbean name="JettyRequestLog" class="org.apache.geronimo.jetty.requestlog.NCSARequestLog">
-        <reference name="JettyContainer"><name>WebContainer</name></reference>
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
-        <attribute name="filename">var/log/jetty_yyyy_mm_dd.log</attribute>
-        <attribute name="logDateFormat">dd/MMM/yyyy:HH:mm:ss ZZZ</attribute>
-        <attribute name="logTimeZone">GMT</attribute>
-    </gbean>
-
-    <gbean name="JettyWebConnector" class="org.apache.geronimo.jetty.connector.HTTPConnector">
-        <attribute name="port">${PlanHTTPPort}</attribute>
-        <reference name="JettyContainer"><name>WebContainer</name></reference>
-        <attribute name="maxThreads">50</attribute>
-        <attribute name="minThreads">10</attribute>
-    </gbean>
-
-    <gbean name="JettySSLConnector" class="org.apache.geronimo.jetty.connector.HTTPSConnector">
-        <attribute name="port">${PlanHTTPSPort}</attribute>
-        <attribute name="keystoreFileName">var/security/keystore</attribute>
-        <attribute name="keystoreType">JKS</attribute>
-        <attribute name="keystorePassword">secret</attribute>
-        <attribute name="keyPassword">secret</attribute>
-        <attribute name="clientAuthRequired">false</attribute>
-        <attribute name="secureProtocol">TLS</attribute>
-        <attribute name="maxThreads">50</attribute>
-        <attribute name="minThreads">10</attribute>
-        <reference name="JettyContainer"><name>WebContainer</name></reference>
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
-    </gbean>
-
-    <!-- TODO add in Tomcat support -->
-
-    <!-- Default security realm using properties files -->
-    <gbean name="properties-login"
-        class="org.apache.geronimo.security.jaas.LoginModuleGBean">
-        <attribute name="loginModuleClass">org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</attribute>
-        <attribute name="serverSide">true</attribute>
-        <attribute name="options">
-            usersURI=var/security/users.properties
-            groupsURI=var/security/groups.properties
-        </attribute>
-        <attribute name="loginDomainName">geronimo-properties-realm</attribute>
-    </gbean>
-
-    <gbean name="geronimo-properties-realm"
-        class="org.apache.geronimo.security.realm.GenericSecurityRealm">
-        <attribute name="realmName">geronimo-properties-realm</attribute>
-        <reference name="LoginModuleConfiguration">
-            <name>properties-login</name>
-        </reference>
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
-    </gbean>
-    <gbean name="properties-login" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
-         <attribute name="controlFlag">REQUIRED</attribute>
-         <reference name="LoginModule">
-             <name>properties-login</name>
-         </reference>
-     </gbean>
-
-    <gbean name="JMX"
-        class="org.apache.geronimo.security.jaas.ServerRealmConfigurationEntry">
-        <attribute name="applicationConfigName">JMX</attribute>
-        <attribute name="realmName">geronimo-properties-realm</attribute>
-    </gbean>
-
-    <!-- Register GeronimoLoginConfiguration as the LoginConfiguration handler -->
-    <gbean name="LoginConfiguration" class="org.apache.geronimo.security.jaas.GeronimoLoginConfiguration">
-        <references name="Configurations">
-            <pattern><gbean-name>geronimo.server:j2eeType=SecurityRealm,*</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.server:j2eeType=ConfigurationEntry,*</gbean-name></pattern>
-        </references>
-    </gbean>
-
-    <gbean name="SecurityService" class="org.apache.geronimo.security.SecurityServiceImpl">
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
-        <attribute name="policyConfigurationFactory">org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory</attribute>
-        <attribute name="policyProvider">org.apache.geronimo.security.jacc.GeronimoPolicy</attribute>
-    </gbean>
-
-    <gbean name="JaasLoginService" class="org.apache.geronimo.security.jaas.JaasLoginService">
-        <reference name="Realms"><application>*</application><module>*</module><name>*</name></reference>
-        <!--        <attribute name="reclaimPeriod">100000</attribute>-->
-        <attribute name="algorithm">HmacSHA1</attribute>
-        <attribute name="password">secret</attribute>
-    </gbean>
-
-    <gbean gbeanName="geronimo.remoting:target=JaasLoginServiceRemotingServer" class="org.apache.geronimo.security.remoting.jmx.JaasLoginServiceRemotingServer">
-        <attribute name="protocol">tcp</attribute>
-        <attribute name="host">${PlanServerHostname}</attribute>
-        <attribute name="port">${PlanRemoteLoginPort}</attribute>
-        <reference name="LoginService"><name>JaasLoginService</name></reference>
-    </gbean>
-
-    <gbean name="DefaultThreadPool" class="org.apache.geronimo.pool.ThreadPool">
-        <attribute name="keepAliveTime">5000</attribute>
-        <attribute name="poolSize">30</attribute>
-        <attribute name="poolName">DefaultThreadPool</attribute>
-    </gbean>
-
-    <gbean name="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean">
-    </gbean>
-
-    <gbean name="DefaultWorkManager" class="org.apache.geronimo.connector.work.GeronimoWorkManagerGBean">
-        <attribute name="syncMaximumPoolSize">10</attribute>
-        <attribute name="startMaximumPoolSize">10</attribute>
-        <attribute name="scheduledMaximumPoolSize">10</attribute>
-        <reference name="TransactionContextManager"><name>TransactionContextManager</name></reference>
-    </gbean>
-
-    <gbean name="HOWLTransactionLog" class="org.apache.geronimo.transaction.log.HOWLLog">
-        <attribute name="bufferClassName">org.objectweb.howl.log.BlockLogBuffer</attribute>
-        <attribute name="bufferSizeKBytes">32</attribute>
-        <attribute name="checksumEnabled">true</attribute>
-        <attribute name="flushSleepTimeMilliseconds">50</attribute>
-        <attribute name="logFileDir">var/txlog</attribute>
-        <attribute name="logFileExt">log</attribute>
-        <attribute name="logFileName">howl</attribute>
-        <attribute name="maxBlocksPerFile">-1</attribute>
-        <attribute name="maxBuffers">0</attribute>
-        <attribute name="maxLogFiles">2</attribute>
-        <attribute name="minBuffers">4</attribute>
-        <attribute name="threadsWaitingForceThreshold">-1</attribute>
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
-    </gbean>
-
-    <gbean name="TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImplGBean">
-        <attribute name="defaultTransactionTimeoutSeconds">600</attribute>
-        <reference name="TransactionLog"><name>HOWLTransactionLog</name></reference>
-        <references name="ResourceManagers">
-            <pattern><gbean-name>geronimo.server:j2eeType=JCAManagedConnectionFactory,*</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.server:j2eeType=ActivationSpec,*</gbean-name></pattern>
-        </references>
-    </gbean>
-
-    <gbean name="TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManagerGBean">
-        <reference name="TransactionManager"><name>TransactionManager</name></reference>
-        <reference name="XidImporter"><name>TransactionManager</name></reference>
-    </gbean>
-
-    <!-- EJB Protocol -->
-    <gbean gbeanName="openejb:type=NetworkService,name=EJB" class="org.openejb.server.StandardServiceStackGBean">
-        <attribute name="name">EJB</attribute>
-        <attribute name="port">${PlanOpenEJBPort}</attribute>
-        <attribute name="host">${PlanServerHostname}</attribute>
-        <attribute name="allowHosts">${PlanClientAddresses}</attribute>
-        <attribute name="logOnSuccess">HOST,NAME,THREADID,USERID</attribute>
-        <attribute name="logOnFailure">HOST,NAME</attribute>
-        <reference name="Executor"><name>DefaultThreadPool</name></reference>
-        <reference name="Server"><gbean-name>openejb:type=Server,name=EJB</gbean-name></reference>
-    </gbean>
-    <gbean gbeanName="openejb:type=Server,name=EJB" class="org.openejb.server.ejbd.EjbServerGBean">
-        <reference name="ContainerIndex"><gbean-name>openejb:type=ContainerIndex</gbean-name></reference>
-    </gbean>
-    <!-- pattern domain name must match the domain of the j2eeServer attribute of the EAR builder in the deployer plan -->
-    <gbean gbeanName="openejb:type=ContainerIndex" class="org.openejb.ContainerIndex">
-        <references name="EJBContainers">
-            <pattern><gbean-name>geronimo.server:j2eeType=StatelessSessionBean,*</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.server:j2eeType=StatefulSessionBean,*</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.server:j2eeType=EntityBean,*</gbean-name></pattern>
-        </references>
-    </gbean>
-
-    <!-- JSR77 Management Objects -->
-    <gbean gbeanName="geronimo.server:j2eeType=J2EEDomain,name=geronimo.server" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
-    <gbean gbeanName="geronimo.server:j2eeType=J2EEServer,name=geronimo" class="org.apache.geronimo.j2ee.management.impl.J2EEServerImpl">
-        <reference name="ServerInfo"><module>${pom.groupId}/cars/j2ee-system-${pom.currentVersion}.car</module><name>ServerInfo</name></reference>
+    <!-- RMI Registry -->
+    <gbean name="RMIRegistry" class="org.apache.geronimo.system.rmi.RMIRegistryService">
+        <attribute name="port">${PlanNamingPort}</attribute>
     </gbean>
 
-    <gbean gbeanName="geronimo.server:j2eeType=JVM,J2EEServer=geronimo,name=JVM" class="org.apache.geronimo.j2ee.management.impl.JVMImpl"/>
-
-    <!-- JMX Remoting -->
-    <gbean name="JMXService" class="org.apache.geronimo.jmxremoting.JMXConnector">
-        <attribute name="url">service:jmx:rmi://${PlanServerHostname}/jndi/rmi:/JMXConnector</attribute>
-        <attribute name="applicationConfigName">JMX</attribute>
+    <!-- Naming properties -->
+    <gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">
+        <attribute name="namingFactoryInitial">com.sun.jndi.rmi.registry.RegistryContextFactory</attribute>
+        <attribute name="namingFactoryUrlPkgs">org.apache.geronimo.naming</attribute>
+        <attribute name="namingProviderUrl">rmi://${PlanServerHostname}:${PlanNamingPort}</attribute>
     </gbean>
-
-
-    <gbean name="eis/JAXR" class="org.apache.geronimo.webservices.jaxr.JAXRGBean"/>
-
-    <gbean gbeanName="geronimo.server:J2EEApplication=null,EJBModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=StatelessSessionBean,name=ejb/mgmt/MEJB" class="org.openejb.mejb.MEJB"/>
-
 </configuration>

Modified: geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/client-system-plan.xml Sun Aug 28 11:50:31 2005
@@ -39,15 +39,22 @@
     <!-- URLFactory service -->
     <gbean name="URLFactory" class="org.apache.geronimo.system.url.GeronimoURLFactory"/>
 
+    <!-- Configuration Manager service -->
+    <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.ConfigurationManagerImpl">
+        <reference name="Stores"><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></reference>
+    </gbean>
+
+    <!-- User-editable attribute service -->
+    <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
+        <reference name="ServerInfo"><name>ServerInfo</name></reference>
+        <attribute name="configFile">var/config/config.xml</attribute>
+    </gbean>
+
     <!-- Configuration Store service -->
     <gbean name="Local" class="org.apache.geronimo.system.configuration.LocalConfigStore">
         <attribute name="root">config-store</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
-    <!-- Configuration Manager service -->
-    <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.ConfigurationManagerImpl">
-        <reference name="Stores"><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></reference>
+        <reference name="AttributeStore"><name>AttributeManager</name></reference>
     </gbean>
 
     <!-- Repository -->
@@ -62,11 +69,4 @@
         <attribute name="refreshPeriodSeconds">60</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
     </gbean>
-
-    <!-- User-editable attribute service -->
-    <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
-        <reference name="ServerInfo"><name>ServerInfo</name></reference>
-        <attribute name="configFile">var/config/config.xml</attribute>
-    </gbean>
-
 </configuration>

Modified: geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/deployer-system-plan.xml Sun Aug 28 11:50:31 2005
@@ -32,27 +32,28 @@
     <gbean name="ServerInfo" class="org.apache.geronimo.system.serverinfo.BasicServerInfo">
     </gbean>
 
-    <!-- Configuration Store service -->
-    <gbean name="Local" class="org.apache.geronimo.system.configuration.LocalConfigStore">
-        <attribute name="root">config-store/</attribute>
-        <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
     <!-- Configuration Manager service -->
     <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.ConfigurationManagerImpl">
         <reference name="Stores"><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></reference>
     </gbean>
 
-    <!-- Repository -->
-    <gbean name="Repository" class="org.apache.geronimo.system.repository.ReadOnlyRepository">
-        <attribute name="root">repository/</attribute>
-        <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
     <!-- User-editable attribute service -->
     <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
         <attribute name="configFile">var/config/config.xml</attribute>
+    </gbean>
+
+    <!-- Configuration Store service -->
+    <gbean name="Local" class="org.apache.geronimo.system.configuration.LocalConfigStore">
+        <attribute name="root">config-store</attribute>
+        <reference name="ServerInfo"><name>ServerInfo</name></reference>
+        <reference name="AttributeStore"><name>AttributeManager</name></reference>
+    </gbean>
+
+    <!-- Repository -->
+    <gbean name="Repository" class="org.apache.geronimo.system.repository.ReadOnlyRepository">
+        <attribute name="root">repository/</attribute>
+        <reference name="ServerInfo"><name>ServerInfo</name></reference>
     </gbean>
 
     <!-- Logging service -->

Modified: geronimo/trunk/modules/assembly/src/plan/system-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/system-plan.xml?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/system-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/system-plan.xml Sun Aug 28 11:50:31 2005
@@ -39,15 +39,22 @@
     <!-- URLFactory service -->
     <gbean name="URLFactory" class="org.apache.geronimo.system.url.GeronimoURLFactory"/>
 
+    <!-- Configuration Manager service -->
+    <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.ConfigurationManagerImpl">
+        <reference name="Stores"><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></reference>
+    </gbean>
+
+    <!-- User-editable attribute service -->
+    <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
+        <reference name="ServerInfo"><name>ServerInfo</name></reference>
+        <attribute name="configFile">var/config/config.xml</attribute>
+    </gbean>
+
     <!-- Configuration Store service -->
     <gbean name="Local" class="org.apache.geronimo.system.configuration.LocalConfigStore">
         <attribute name="root">config-store</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
-    </gbean>
-
-    <!-- Configuration Manager service -->
-    <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.ConfigurationManagerImpl">
-        <reference name="Stores"><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></reference>
+        <reference name="AttributeStore"><name>AttributeManager</name></reference>
     </gbean>
 
     <!-- Persistent List of running Configurations service -->
@@ -55,12 +62,6 @@
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
         <reference name="ConfigurationManager"><name>ConfigurationManager</name></reference>
         <attribute name="configFile">var/config/config.list</attribute>
-    </gbean>
-
-    <!-- User-editable attribute service -->
-    <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
-        <reference name="ServerInfo"><name>ServerInfo</name></reference>
-        <attribute name="configFile">var/config/config.xml</attribute>
     </gbean>
 
     <!-- Repository -->

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=263902&r1=263901&r2=263902&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 Sun Aug 28 11:50:31 2005
@@ -45,7 +45,6 @@
 import org.apache.geronimo.kernel.ObjectInputStreamExt;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
@@ -127,7 +126,7 @@
     /**
      * Used to override stored attribute values with values set by the user.
      */
-    private ManageableAttributeStore manageableStore;
+    private final ManageableAttributeStore manageableStore;
 
     private final List dependencies;
     private final List classPath;
@@ -186,6 +185,7 @@
         baseURL = null;
         parent = null;
         repositories = null;
+        manageableStore = null;
     }
 
     /**
@@ -213,7 +213,8 @@
             byte[] gbeanState,
             Collection repositories,
             List dependencies,
-            ConfigurationStore configurationStore) throws Exception {
+            ConfigurationStore configurationStore,
+            ManageableAttributeStore manageableStore) throws Exception {
 
         this.kernel = kernel;
         this.objectNameString = objectName;
@@ -237,6 +238,7 @@
         }
 
         this.configurationStore = configurationStore;
+        this.manageableStore = manageableStore;
 
         this.domain = domain;
         this.server = server;
@@ -268,13 +270,6 @@
             configurationClassLoader = new ConfigurationClassLoader(id, urls, parent.getConfigurationClassLoader());
         }
 
-        // Look up the manageable store before we try to load the GBeans
-        Set set = kernel.listGBeans(new GBeanQuery(null, ManageableAttributeStore.class.getName()));
-        if(set.size() > 0) {
-            manageableStore = (ManageableAttributeStore) kernel.getProxyManager().createProxy(((ObjectName)set.iterator().next()),
-                                                                                              ManageableAttributeStore.class);
-        }
-
         // DSS: why exactally are we doing this?  I bet there is a reason, but
         // we should state why here.
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
@@ -464,9 +459,12 @@
     }
 
     private ObjectName loadGBean(GBeanData beanData, Set objectNames) throws GBeanAlreadyExistsException {
+        // todo jnb: initializing attibutes here seems questionable - perhaps these should be injected
+        // by the ConfigurationManager once the Configuration has been loaded
         ObjectName name = beanData.getName();
         setGBeanBaseUrl(beanData, baseURL);
         setManageableAttributes(beanData);
+
         log.trace("Registering GBean " + name);
         kernel.loadGBean(beanData, configurationClassLoader);
         objectNames.add(name);
@@ -604,6 +602,7 @@
         infoFactory.addReference("Parent", ConfigurationParent.class);
         infoFactory.addReference("Repositories", Repository.class, "GBean");
         infoFactory.addReference("ConfigurationStore", ConfigurationStore.class);
+        infoFactory.addReference("AttributeStore", ManageableAttributeStore.class);
 
         infoFactory.addOperation("addGBean", new Class[]{GBeanData.class, boolean.class});
         infoFactory.addOperation("removeGBean", new Class[]{ObjectName.class});
@@ -622,7 +621,8 @@
             "gBeanState",
             "Repositories",
             "dependencies",
-            "ConfigurationStore"});
+            "ConfigurationStore",
+            "AttributeStore"});
 
         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=263902&r1=263901&r2=263902&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 Sun Aug 28 11:50:31 2005
@@ -30,6 +30,12 @@
  */
 public interface ManageableAttributeStore {
     /**
+     * Return the object name of this store
+     * @return the object name of this store
+     */
+    public String getObjectName();
+
+    /**
      * Gets a stored value (if any) for a particular attribute.  The attribute
      * is identified by the configuration name, GBean ObjectName, and attribute
      * information.  Note: it is not possible to store a meaningful value of

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=263902&r1=263901&r2=263902&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 Sun Aug 28 11:50:31 2005
@@ -54,17 +54,24 @@
     private final static String TEMP_EXTENSION=".working";
     private final static int SAVE_BUFFER_MS=5000;
 
-    private ServerInfo serverInfo;
-    private String configFile;
+    private final ServerInfo serverInfo;
+    private final String configFile;
+    private String objectName;
+
     private File attributeFile;
     private File backupFile;
     private File tempFile;
     private final Map configurations = new LinkedHashMap();
     private UpdateThread updater;
 
-    public LocalAttributeManager(ServerInfo serverInfo, String configFile) {
+    public LocalAttributeManager(ServerInfo serverInfo, String configFile, String objectName) {
         this.serverInfo = serverInfo;
         this.configFile = configFile;
+        this.objectName = objectName;
+    }
+
+    public String getObjectName() {
+        return objectName;
     }
 
     public Object getValue(String configurationName, ObjectName gbean, GAttributeInfo attribute) {
@@ -368,9 +375,10 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(LocalAttributeManager.class, "AttributeStore");//does not use jsr-77 naming
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
         infoFactory.addAttribute("configFile", String.class, true);
+        infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addInterface(ManageableAttributeStore.class);
 
-        infoFactory.setConstructor(new String[]{"ServerInfo","configFile"});
+        infoFactory.setConstructor(new String[]{"ServerInfo","configFile","objectName"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

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=263902&r1=263901&r2=263902&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 Sun Aug 28 11:50:31 2005
@@ -54,6 +54,7 @@
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationInfo;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ManageableAttributeStore;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
@@ -67,6 +68,7 @@
     private final Kernel kernel;
     private final ObjectName objectName;
     private final URI root;
+    private final ManageableAttributeStore attributeStore;
     private final ServerInfo serverInfo;
     private final Properties index = new Properties();
     private final Log log;
@@ -81,15 +83,17 @@
         objectName = null;
         serverInfo = null;
         this.root = null;
+        this.attributeStore = null;
         this.rootDir = rootDir;
         log = LogFactory.getLog("LocalConfigStore:"+rootDir.getName());
     }
 
-    public LocalConfigStore(Kernel kernel, String objectName, URI root, ServerInfo serverInfo) throws MalformedObjectNameException {
+    public LocalConfigStore(Kernel kernel, String objectName, URI root, ServerInfo serverInfo, ManageableAttributeStore attributeStore) throws MalformedObjectNameException {
         this.kernel = kernel;
         this.objectName = new ObjectName(objectName);
         this.root = root;
         this.serverInfo = serverInfo;
+        this.attributeStore = attributeStore;
         log = LogFactory.getLog("LocalConfigStore:"+root.toString());
     }
 
@@ -251,6 +255,13 @@
             throw new InvalidConfigException("Cannot convert id to ObjectName: ", e);
         }
         config.setName(name);
+        ObjectName pattern;
+        try {
+            pattern = attributeStore == null ? null : new ObjectName(attributeStore.getObjectName());
+        } catch (MalformedObjectNameException e) {
+            throw new InvalidConfigException("Invalid ObjectName for AttributeStore: " + attributeStore.getObjectName());
+        }
+        config.setReferencePattern("AttributeStore", pattern);
 
         try {
             kernel.loadGBean(config, Configuration.class.getClassLoader());
@@ -426,9 +437,10 @@
         infoFactory.addAttribute("objectName", String.class, false);
         infoFactory.addAttribute("root", URI.class, true);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+        infoFactory.addReference("AttributeStore", ManageableAttributeStore.class, "AttributeStore");
         infoFactory.addInterface(ConfigurationStore.class);
 
-        infoFactory.setConstructor(new String[]{"kernel", "objectName", "root", "ServerInfo"});
+        infoFactory.setConstructor(new String[]{"kernel", "objectName", "root", "ServerInfo", "AttributeStore"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Added: geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java?rev=263902&view=auto
==============================================================================
--- geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java (added)
+++ geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java Sun Aug 28 11:50:31 2005
@@ -0,0 +1,65 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.plugin.packaging;
+
+import java.io.IOException;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
+
+import org.apache.geronimo.gbean.GAttributeInfo;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.config.ManageableAttributeStore;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MavenAttributeStore implements ManageableAttributeStore {
+    private final String objectName;
+
+    public MavenAttributeStore(String objectName) {
+        this.objectName = objectName;
+    }
+
+    public String getObjectName() {
+        return objectName;
+    }
+
+    public Object getValue(String configurationName, ObjectName gbean, GAttributeInfo attribute) {
+        return null;
+    }
+
+    public void setValue(String configurationName, ObjectName gbean, GAttributeInfo attribute, Object value) {
+    }
+
+    public void save() throws IOException {
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+    static {
+        GBeanInfoBuilder builder = new GBeanInfoBuilder(MavenAttributeStore.class);
+        builder.addAttribute("objectName", String.class, false);
+        builder.addInterface(ManageableAttributeStore.class);
+        builder.setConstructor(new String[] {"objectName"});
+        GBEAN_INFO = builder.getBeanInfo();
+    }
+}

Propchange: geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenAttributeStore.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Modified: geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java (original)
+++ geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java Sun Aug 28 11:50:31 2005
@@ -34,6 +34,7 @@
 import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ManageableAttributeStore;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.Kernel;
 
@@ -48,11 +49,13 @@
     private final Kernel kernel;
     private final ObjectName objectName;
     private final Repository repository;
+    private final ManageableAttributeStore attributeStore;
 
-    public MavenConfigStore(Kernel kernel, String objectName, Repository repository) throws MalformedObjectNameException {
+    public MavenConfigStore(Kernel kernel, String objectName, Repository repository, ManageableAttributeStore attributeStore) throws MalformedObjectNameException {
         this.kernel = kernel;
         this.objectName = new ObjectName(objectName);
         this.repository = repository;
+        this.attributeStore = attributeStore;
     }
 
     public String getObjectName() {
@@ -88,6 +91,13 @@
             throw new InvalidConfigException("Cannot convert id to ObjectName: ", e);
         }
         config.setName(name);
+        ObjectName pattern;
+        try {
+            pattern = attributeStore == null ? null : new ObjectName(attributeStore.getObjectName());
+        } catch (MalformedObjectNameException e) {
+            throw new InvalidConfigException("Invalid ObjectName for AttributeStore: " + attributeStore.getObjectName());
+        }
+        config.setReferencePattern("AttributeStore", pattern);
 
         try {
             kernel.loadGBean(config, Configuration.class.getClassLoader());
@@ -161,7 +171,8 @@
         builder.addAttribute("kernel", Kernel.class, false);
         builder.addAttribute("objectName", String.class, false);
         builder.addReference("Repository", Repository.class);
-        builder.setConstructor(new String[]{"kernel", "objectName", "Repository"});
+        builder.addReference("AttributeStore", ManageableAttributeStore.class);
+        builder.setConstructor(new String[]{"kernel", "objectName", "Repository", "AttributeStore"});
         GBEAN_INFO = builder.getBeanInfo();
     }
 }

Modified: geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java?rev=263902&r1=263901&r2=263902&view=diff
==============================================================================
--- geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java (original)
+++ geronimo/trunk/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java Sun Aug 28 11:50:31 2005
@@ -54,6 +54,17 @@
      */
     private static final ObjectName CONFIGMANAGER_NAME;
 
+    /**
+     * The name of the GBean that will provide values for managed attributes.
+     */
+    private static final ObjectName ATTRIBUTESTORE_NAME;
+
+    /**
+     * Reference to the kernel that will last the lifetime of this classloader.
+     * The KernelRegistry keeps soft references that may be garbage collected.
+     */
+    private static Kernel kernel;
+
     private static final String[] ARG_TYPES = {
             File.class.getName(),
             File.class.getName(),
@@ -69,6 +80,7 @@
             REPOSITORY_NAME = new ObjectName(KERNEL_NAME + ":name=Repository");
             CONFIGSTORE_NAME = new ObjectName(KERNEL_NAME + ":name=MavenConfigStore,j2eeType=ConfigurationStore");
             CONFIGMANAGER_NAME = new ObjectName(KERNEL_NAME + ":name=ConfigurationManager,j2eeType=ConfigurationManager");
+            ATTRIBUTESTORE_NAME = new ObjectName(KERNEL_NAME + ":name=ManagedAttributeStore");
         } catch (MalformedObjectNameException e) {
             throw new ExceptionInInitializerError(e.getMessage());
         }
@@ -197,7 +209,7 @@
     }
 
     public void execute() throws Exception {
-        Kernel kernel = createKernel();
+        Kernel kernel = createKernel(repository);
 
         // start the Configuration we're going to use for this deployment
         ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
@@ -221,16 +233,23 @@
     /**
      * Create a Geronimo Kernel to contain the deployment configurations.
      */
-    private Kernel createKernel() throws Exception {
-        Kernel kernel = KernelRegistry.getKernel(KERNEL_NAME);
+    private static synchronized Kernel createKernel(File repository) throws Exception {
+        // first return our cached version
         if (kernel != null) {
             return kernel;
         }
 
+        // check the registry in case someone else created one
+        kernel = KernelRegistry.getKernel(KERNEL_NAME);
+        if (kernel != null) {
+            return kernel;
+        }
+
+        // boot one ourselves
         kernel = KernelFactory.newInstance().createKernel(KERNEL_NAME);
         kernel.boot();
 
-        bootDeployerSystem(kernel);
+        bootDeployerSystem(kernel, repository);
 
         return kernel;
     }
@@ -240,7 +259,7 @@
      * This contains Repository and ConfigurationStore GBeans that map to
      * the local maven installation.
      */
-    private void bootDeployerSystem(Kernel kernel) throws Exception {
+    private static void bootDeployerSystem(Kernel kernel, File repository) throws Exception {
         ClassLoader cl = PackageBuilder.class.getClassLoader();
         GBeanData repoGBean = new GBeanData(REPOSITORY_NAME, MavenRepository.GBEAN_INFO);
         repoGBean.setAttribute("root", repository);
@@ -256,6 +275,10 @@
         configManagerGBean.setReferencePattern("Stores", CONFIGSTORE_NAME);
         kernel.loadGBean(configManagerGBean, cl);
         kernel.startGBean(CONFIGMANAGER_NAME);
+
+        GBeanData attrManagerGBean = new GBeanData(ATTRIBUTESTORE_NAME, MavenAttributeStore.GBEAN_INFO);
+        kernel.loadGBean(attrManagerGBean, cl);
+        kernel.startGBean(ATTRIBUTESTORE_NAME);
     }
 
     /**



Mime
View raw message