geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r514034 - in /geronimo/server/trunk: configs/shutdown/ configs/shutdown/src/plan/ modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/
Date Sat, 03 Mar 2007 00:47:10 GMT
Author: gdamour
Date: Fri Mar  2 16:47:09 2007
New Revision: 514034

URL: http://svn.apache.org/viewvc?view=rev&rev=514034
Log:
shutdown.jar now boots a kernel with a boot configuration defining boot
dependencies, a la deployer.jar, such that dependencies can be loaded
from the boot repository and no more from lib.

This fixes GERONIMO-2912 - Server can not be shutdown using bin\shutdown.

Modified:
    geronimo/server/trunk/configs/shutdown/pom.xml
    geronimo/server/trunk/configs/shutdown/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/StopServer.java
    geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
    geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java

Modified: geronimo/server/trunk/configs/shutdown/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/shutdown/pom.xml?view=diff&rev=514034&r1=514033&r2=514034
==============================================================================
--- geronimo/server/trunk/configs/shutdown/pom.xml (original)
+++ geronimo/server/trunk/configs/shutdown/pom.xml Fri Mar  2 16:47:09 2007
@@ -32,6 +32,43 @@
     <artifactId>shutdown</artifactId>
     <name>Geronimo Configs :: Shutdown</name>
     <packaging>car</packaging>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-deploy-tool</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-common</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-system</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-util</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>jline</groupId>
+            <artifactId>jline</artifactId>
+        </dependency>
+    </dependencies>
     
     <build>
         <plugins>
@@ -45,7 +82,7 @@
                             <Extension-Dirs>lib/ext</Extension-Dirs>
                         </manifestEntries>
                         <manifest>
-                            <mainClass>org.apache.geronimo.deployment.cli.StopServer</mainClass>
+                            <mainClass>org.apache.geronimo.kernel.util.MainBootstrapper</mainClass>
                         </manifest>
                     </archive>
                     
@@ -55,34 +92,10 @@
                     <classpath>
                         <element>
                             <groupId>org.apache.geronimo.modules</groupId>
-                            <artifactId>geronimo-deploy-tool</artifactId>
-                            <version>${version}</version>
-                        </element>
-                        <element>
-                            <groupId>org.apache.geronimo.modules</groupId>
-                            <artifactId>geronimo-common</artifactId>
-                            <version>${version}</version>
-                        </element>
-                        <element>
-                            <groupId>org.apache.geronimo.modules</groupId>
                             <artifactId>geronimo-kernel</artifactId>
                             <version>${version}</version>
                         </element>
                         <element>
-                            <groupId>org.apache.geronimo.modules</groupId>
-                            <artifactId>geronimo-system</artifactId>
-                            <version>${version}</version>
-                        </element>
-                        <element>
-                            <groupId>org.apache.geronimo.modules</groupId>
-                            <artifactId>geronimo-util</artifactId>
-                            <version>${version}</version>
-                        </element>
-                        <element>
-                            <groupId>commons-cli</groupId>
-                            <artifactId>commons-cli</artifactId>
-                        </element>
-                        <element>
                             <groupId>commons-logging</groupId>
                             <artifactId>commons-logging</artifactId>
                         </element>
@@ -93,10 +106,6 @@
                         <element>
                             <groupId>log4j</groupId>
                             <artifactId>log4j</artifactId>
-                        </element>
-                        <element>
-                            <groupId>jline</groupId>
-                            <artifactId>jline</artifactId>
                         </element>
                     </classpath>
                     <classpathPrefix>../lib</classpathPrefix>

Modified: geronimo/server/trunk/configs/shutdown/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/shutdown/src/plan/plan.xml?view=diff&rev=514034&r1=514033&r2=514034
==============================================================================
--- geronimo/server/trunk/configs/shutdown/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/shutdown/src/plan/plan.xml Fri Mar  2 16:47:09 2007
@@ -19,5 +19,40 @@
 <!-- $Rev$ $Date$ -->
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
-    <environment/>
+
+    <gbean name="ServerInfo" class="org.apache.geronimo.system.serverinfo.BasicServerInfo"/>
+
+    <gbean name="Repository" class="org.apache.geronimo.system.repository.Maven2Repository">
+        <attribute name="root">repository/</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+    </gbean>
+
+    <gbean name="Local" class="org.apache.geronimo.system.configuration.RepositoryConfigurationStore">
+        <reference name="Repository">
+            <name>Repository</name>
+        </reference>
+    </gbean>
+
+    <gbean name="ArtifactManager" class="org.apache.geronimo.kernel.repository.DefaultArtifactManager"/>
+
+    <gbean name="ArtifactResolver" class="org.apache.geronimo.kernel.repository.DefaultArtifactResolver">
+        <reference name="ArtifactManager">
+            <name>ArtifactManager</name>
+        </reference>
+        <reference name="Repositories"></reference>
+    </gbean>
+
+    <gbean name="ConfigurationManager" class="org.apache.geronimo.kernel.config.SimpleConfigurationManager">
+        <reference name="Repositories"></reference>
+        <reference name="Stores"></reference>
+        <reference name="Watchers"></reference>
+        <reference name="ArtifactResolver">
+            <name>ArtifactResolver</name>
+        </reference>
+    </gbean>
+
+    <gbean name="StopServer" class="org.apache.geronimo.deployment.cli.StopServer"/>
+
 </module>

Modified: geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/StopServer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/StopServer.java?view=diff&rev=514034&r1=514033&r2=514034
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/StopServer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/StopServer.java
Fri Mar  2 16:47:09 2007
@@ -27,13 +27,16 @@
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.util.Main;
 import org.apache.geronimo.system.jmx.KernelDelegate;
 
 /**
  * @version $Rev$ $Date$
  */
-public class StopServer {
+public class StopServer implements Main {
 
 	public static final String RMI_NAMING_CONFG_ID = "org/apache/geronimo/RMINaming";
 
@@ -52,7 +55,7 @@
 		cmd.execute(args);
 	}
 
-	public void execute(String args[]) throws IOException {
+	public int execute(String args[]) {
         this.args = args;
 
         int i = 0;
@@ -73,11 +76,11 @@
             }
         } catch (NumberFormatException e) {
             System.out.println("Invalid port number specified.");
-            System.exit(1);
+            return 1;
         }
 
-        InputPrompt prompt = new InputPrompt(System.in, System.out);
         try {
+            InputPrompt prompt = new InputPrompt(System.in, System.out);
             if (user == null) {
                 user = prompt.getInput("Username: ");
             }
@@ -86,7 +89,7 @@
             }
         } catch (IOException e) {
             System.out.println("Unable to prompt for login.");
-            System.exit(1);
+            return 1;
         }
 
         try {
@@ -108,7 +111,9 @@
             }
         } catch (Exception e) {
             e.printStackTrace();
+            return 1;
         }
+        return 0;
     }
 
 	private boolean argumentHasValue(int i) {
@@ -160,5 +165,21 @@
 		System.out.println("    --port");
 		System.exit(1);
 	}
+
+    public static final GBeanInfo GBEAN_INFO;
+    
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(StopServer.class, "StopServer");
+
+        infoBuilder.addInterface(Main.class);
+        
+        infoBuilder.setConstructor(new String[0]);
+        
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+    
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
 
 }

Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?view=diff&rev=514034&r1=514033&r2=514034
==============================================================================
--- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
Fri Mar  2 16:47:09 2007
@@ -328,15 +328,11 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(KernelConfigurationManager.class,
"ConfigurationManager");
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(KernelConfigurationManager.class,
SimpleConfigurationManager.GBEAN_INFO, "ConfigurationManager");
         infoFactory.addAttribute("kernel", Kernel.class, false);
-        infoFactory.addReference("Stores", ConfigurationStore.class, "ConfigurationStore");
         infoFactory.addReference("AttributeStore", ManageableAttributeStore.class, ManageableAttributeStore.ATTRIBUTE_STORE);
         infoFactory.addReference("PersistentConfigurationList", PersistentConfigurationList.class,
PersistentConfigurationList.PERSISTENT_CONFIGURATION_LIST);
         infoFactory.addReference("ArtifactManager", ArtifactManager.class, "ArtifactManager");
-        infoFactory.addReference("ArtifactResolver", ArtifactResolver.class, "ArtifactResolver");
-        infoFactory.addReference("Repositories", Repository.class, "Repository");
-        infoFactory.addReference("Watchers", DeploymentWatcher.class);
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
         infoFactory.addInterface(ConfigurationManager.class);
         infoFactory.setConstructor(new String[]{"kernel", "Stores", "AttributeStore", "PersistentConfigurationList",
"ArtifactManager", "ArtifactResolver", "Repositories", "Watchers", "classLoader"});

Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java?view=diff&rev=514034&r1=514033&r2=514034
==============================================================================
--- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
Fri Mar  2 16:47:09 2007
@@ -20,6 +20,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
@@ -27,11 +28,12 @@
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashSet;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
@@ -39,6 +41,7 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.Version;
 
 /**
@@ -1304,4 +1307,22 @@
         }
         return map;
     }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(SimpleConfigurationManager.class,
"ConfigurationManager");
+        infoFactory.addReference("Stores", ConfigurationStore.class, "ConfigurationStore");
+        infoFactory.addReference("ArtifactResolver", ArtifactResolver.class, "ArtifactResolver");
+        infoFactory.addReference("Repositories", Repository.class, "Repository");
+        infoFactory.addReference("Watchers", DeploymentWatcher.class);
+        infoFactory.addInterface(ConfigurationManager.class);
+        infoFactory.setConstructor(new String[]{"Stores", "ArtifactResolver", "Repositories",
"Watchers"});
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
 }



Mime
View raw message