geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r831332 - in /geronimo/server/trunk/framework: ./ buildsupport/car-maven-plugin/ configs/client-system/ configs/client-system/src/main/history/ configs/client-system/src/main/plan/ configs/geronimo-gbean-deployer-bootstrap/src/main/history/...
Date Fri, 30 Oct 2009 15:33:17 GMT
Author: gawor
Date: Fri Oct 30 15:33:15 2009
New Revision: 831332

URL: http://svn.apache.org/viewvc?rev=831332&view=rev
Log:
add bin/geronimo and bin/client that work just like before. bin/karaf will only start the karaf framework

Added:
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client   (contents, props changed)
      - copied, changed from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo   (contents, props changed)
      - copied, changed from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat   (contents, props changed)
      - copied, changed from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat   (contents, props changed)
      - copied, changed from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat
    geronimo/server/trunk/framework/modules/geronimo-main/
    geronimo/server/trunk/framework/modules/geronimo-main/pom.xml   (with props)
    geronimo/server/trunk/framework/modules/geronimo-main/src/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/kernel/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/kernel/util/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java   (with props)
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java   (with props)
    geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java   (with props)
Modified:
    geronimo/server/trunk/framework/buildsupport/car-maven-plugin/pom.xml
    geronimo/server/trunk/framework/configs/client-system/pom.xml
    geronimo/server/trunk/framework/configs/client-system/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml
    geronimo/server/trunk/framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/gshell-geronimo/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/j2ee-system/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml
    geronimo/server/trunk/framework/configs/jsr88-cli/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/jsr88-deploymentfactory/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/karaf-framework/pom.xml
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/startup.properties
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/online-deployer/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/configs/shutdown/src/main/history/dependencies.xml
    geronimo/server/trunk/framework/modules/geronimo-cli/pom.xml
    geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/AbstractCLI.java
    geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/client/ClientCLI.java
    geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLI.java
    geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java
    geronimo/server/trunk/framework/modules/geronimo-cli/src/test/java/org/apache/geronimo/cli/AbstractCLITest.java
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java
    geronimo/server/trunk/framework/modules/pom.xml
    geronimo/server/trunk/framework/pom.xml

Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/pom.xml (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/pom.xml Fri Oct 30 15:33:15 2009
@@ -212,34 +212,18 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.framework</artifactId>
-            <version>2.1.0-SNAPSHOT</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.osgi.compendium</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
+
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.osgi.compendium</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.osgi.foundation</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>javax.servlet</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
+
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>
 
-
     </dependencies>
 
 </project>

Modified: geronimo/server/trunk/framework/configs/client-system/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/client-system/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/client-system/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/client-system/pom.xml Fri Oct 30 15:33:15 2009
@@ -132,6 +132,12 @@
                 <groupId>org.apache.geronimo.buildsupport</groupId>
                 <artifactId>car-maven-plugin</artifactId>
                 <configuration>
+                    <deploymentConfigs>
+                        <deploymentConfig>${gbeanDeployerBootstrap}</deploymentConfig>
+                    </deploymentConfigs>
+                    <deployerName>org.apache.geronimo.framework/geronimo-gbean-deployer-bootstrap/${geronimoVersion}/car?j2eeType=Deployer,name=Deployer</deployerName>
+                    <boot>true</boot>
+                    <!--
                     <archive>
                         <manifestEntries>
                             <Endorsed-Dirs>lib/endorsed</Endorsed-Dirs>
@@ -141,7 +147,7 @@
                             <mainClass>org.apache.geronimo.cli.client.ClientCLI</mainClass>
                         </manifest>
                     </archive>
-
+                    -->
                     <!--
                     NOTE: This list of dependencies is non-transitive.
                     -->

Modified: geronimo/server/trunk/framework/configs/client-system/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/client-system/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/client-system/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/client-system/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -58,6 +58,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-system</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/framework/configs/client-system/src/main/plan/plan.xml Fri Oct 30 15:33:15 2009
@@ -18,8 +18,6 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
-    <gbean name="EmbeddedClientCommandLine" class="org.apache.geronimo.system.main.EmbeddedClientCommandLine"/>
-
     <!-- ServerInfo service -->
     <gbean name="ServerInfo" class="org.apache.geronimo.system.serverinfo.BasicServerInfo"/>
 
@@ -96,4 +94,6 @@
     </gbean>
     -->
 
+    <gbean name="EmbeddedClientCommandLine" class="org.apache.geronimo.system.main.EmbeddedClientCommandLine"/>
+
 </module>

Modified: geronimo/server/trunk/framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -58,6 +58,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-service-builder</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -28,6 +28,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-service-builder</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/gshell-geronimo/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/gshell-geronimo/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/gshell-geronimo/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/gshell-geronimo/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -88,6 +88,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-plugin</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/j2ee-system/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/j2ee-system/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/j2ee-system/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/j2ee-system/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -73,6 +73,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-system</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/framework/configs/j2ee-system/src/main/plan/plan.xml Fri Oct 30 15:33:15 2009
@@ -28,8 +28,6 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
-    <!--<gbean name="EmbeddedDaemon" class="org.apache.geronimo.system.main.EmbeddedDaemon"/>-->
-
     <!-- ServerInfo service -->
     <gbean name="ServerInfo" class="org.apache.geronimo.system.serverinfo.BasicServerInfo">
         <attribute name="useSystemProperties">true</attribute>
@@ -125,4 +123,6 @@
     </gbean>
     -->
 
+    <gbean name="EmbeddedDaemon" class="org.apache.geronimo.system.main.EmbeddedDaemon"/>
+
 </module>

Modified: geronimo/server/trunk/framework/configs/jsr88-cli/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/jsr88-cli/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/jsr88-cli/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/jsr88-cli/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -73,6 +73,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-plugin</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/jsr88-deploymentfactory/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/jsr88-deploymentfactory/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/jsr88-deploymentfactory/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/jsr88-deploymentfactory/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -63,6 +63,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-plugin</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/karaf-framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/pom.xml Fri Oct 30 15:33:15 2009
@@ -406,6 +406,17 @@
             <groupId>org.apache.geronimo.blueprint</groupId>
             <artifactId>geronimo-blueprint</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-main</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-cli</artifactId>
+            <version>${version}</version>
+        </dependency>
     </dependencies>
     <build>
         <!--<resources>-->
@@ -544,6 +555,24 @@
                                     <outputDirectory>target/dependencies</outputDirectory>
                                     <destFileName>geronimo-rmi-loader.jar</destFileName>
                                 </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.framework</groupId>
+                                    <artifactId>geronimo-main</artifactId>
+                                    <outputDirectory>target/dependencies</outputDirectory>
+                                    <destFileName>geronimo-main.jar</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.framework</groupId>
+                                    <artifactId>geronimo-cli</artifactId>
+                                    <outputDirectory>target/dependencies</outputDirectory>
+                                    <destFileName>geronimo-cli.jar</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.bundles</groupId>
+                                    <artifactId>commons-cli</artifactId>
+                                    <outputDirectory>target/dependencies</outputDirectory>
+                                    <destFileName>commons-cli.jar</destFileName>
+                                </artifactItem>
                             </artifactItems>
                         </configuration>
                     </execution>

Copied: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client (from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client?p2=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client&p1=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf&r1=830720&r2=831332&rev=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client Fri Oct 30 15:33:15 2009
@@ -285,7 +285,7 @@
         KARAF_BASE=`cygpath --path --windows "$KARAF_BASE"`
         CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
     fi
-    exec $JAVA $JAVA_OPTS -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.felix.karaf.main.Bootstrap "$@"
+    exec $JAVA $JAVA_OPTS -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.geronimo.cli.client.ClientCLI "$@"
 }
 
 main() {

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 30 15:33:15 2009
@@ -0,0 +1,2 @@
+/geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:826768
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:749113,749116-807432,809079-825588

Copied: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo (from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo?p2=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo&p1=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf&r1=830720&r2=831332&rev=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo Fri Oct 30 15:33:15 2009
@@ -285,7 +285,7 @@
         KARAF_BASE=`cygpath --path --windows "$KARAF_BASE"`
         CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
     fi
-    exec $JAVA $JAVA_OPTS -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.felix.karaf.main.Bootstrap "$@"
+    exec $JAVA $JAVA_OPTS -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.geronimo.cli.daemon.DaemonCLI "$@"
 }
 
 main() {

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 30 15:33:15 2009
@@ -0,0 +1,2 @@
+/geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:826768
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf:749113,749116-807432,809079-825588

Copied: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat (from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat?p2=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat&p1=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat&r1=830720&r2=831332&rev=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat Fri Oct 30 15:33:15 2009
@@ -152,7 +152,7 @@
     if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
     if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
     rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.felix.karaf.main.Bootstrap %ARGS%
+    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.client.ClientCLI %ARGS%
 
 rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 30 15:33:15 2009
@@ -0,0 +1,2 @@
+/geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:826768
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:749113,749116-807432,809079-825588

Copied: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat (from r830720, geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat?p2=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat&p1=geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat&r1=830720&r2=831332&rev=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat Fri Oct 30 15:33:15 2009
@@ -152,7 +152,7 @@
     if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
     if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
     rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.felix.karaf.main.Bootstrap %ARGS%
+    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.geronimo.cli.daemon.DaemonCLI %ARGS%
 
 rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Oct 30 15:33:15 2009
@@ -0,0 +1,2 @@
+/geronimo/server/branches/2.2/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:826768
+/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat:749113,749116-807432,809079-825588

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/config.properties Fri Oct 30 15:33:15 2009
@@ -40,7 +40,10 @@
 
 org.osgi.framework.system.packages.extra=\
  org.apache.felix.karaf.jaas.boot; version=${karaf.osgi.version}, \
- org.apache.felix.karaf.version; version=${karaf.osgi.version}
+ org.apache.felix.karaf.version; version=${karaf.osgi.version}, \
+ org.apache.geronimo.main; version=${karaf.osgi.version}, \
+ org.apache.geronimo.cli.daemon; version=${karaf.osgi.version}, \
+ org.apache.geronimo.cli.client; version=${karaf.osgi.version}
 
 # javax.transaction is needed to avoid class loader constraint violation when using javax.sql  
 org.osgi.framework.bootdelegation=sun.*,com.sun.*,javax.transaction,javax.transaction.*

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/startup.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/startup.properties?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/startup.properties (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/filtered-resources/etc/startup.properties Fri Oct 30 15:33:15 2009
@@ -86,4 +86,4 @@
 org/apache/geronimo/framework/geronimo-crypto/${pom.version}/geronimo-crypto-${pom.version}.jar=40
 org/apache/geronimo/framework/geronimo-kernel/${pom.version}/geronimo-kernel-${pom.version}.jar=40
 org/apache/geronimo/framework/geronimo-system/${pom.version}/geronimo-system-${pom.version}.jar=40
-org/apache/geronimo/framework/j2ee-system/${pom.version}/j2ee-system-${pom.version}.car=50
+#org/apache/geronimo/framework/j2ee-system/${pom.version}/j2ee-system-${pom.version}.car=50

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -177,6 +177,21 @@
         <type>jar</type>
     </dependency>
     <dependency>
+        <groupId>org.apache.geronimo.bundles</groupId>
+        <artifactId>commons-cli</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-cli</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-servlet_3.0_spec</artifactId>
         <type>jar</type>

Modified: geronimo/server/trunk/framework/configs/online-deployer/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/online-deployer/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/online-deployer/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/online-deployer/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -53,6 +53,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-plugin</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/configs/shutdown/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/shutdown/src/main/history/dependencies.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/shutdown/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/framework/configs/shutdown/src/main/history/dependencies.xml Fri Oct 30 15:33:15 2009
@@ -73,6 +73,11 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>geronimo-main</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
         <artifactId>geronimo-plugin</artifactId>
         <type>jar</type>
     </dependency>

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/pom.xml (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/pom.xml Fri Oct 30 15:33:15 2009
@@ -35,7 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>geronimo-kernel</artifactId>
+            <artifactId>geronimo-main</artifactId>
             <version>${version}</version>
         </dependency>
 

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/AbstractCLI.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/AbstractCLI.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/AbstractCLI.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/AbstractCLI.java Fri Oct 30 15:33:15 2009
@@ -19,9 +19,7 @@
 import java.io.PrintStream;
 
 import org.apache.geronimo.cli.CLParserException;
-import org.apache.geronimo.kernel.util.MainConfigurationBootstrapper;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
+import org.apache.geronimo.main.Bootstrapper;
 
 /**
  * @version $Rev: 476049 $ $Date: 2006-11-17 15:35:17 +1100 (Fri, 17 Nov 2006) $
@@ -63,11 +61,14 @@
         
         initializeLogging(parser);
         
-        MainConfigurationBootstrapper mainConfigurationBootstrapper = newMainConfigurationBootstrapper();
-        BundleContext bundleContext = null;
-        return MainConfigurationBootstrapper.main(mainConfigurationBootstrapper, parser, bundleContext);
+        Bootstrapper boot = createBootstrapper();
+        return boot.execute(parser);
     }
 
+    protected Bootstrapper createBootstrapper() {
+        return new Bootstrapper();
+    }
+    
     protected boolean executeCommand(CLParser parser) {
         return false;
     }
@@ -88,8 +89,6 @@
         System.setProperty("org.apache.geronimo.log.ConsoleLogLevel", level);
     }
 
-    protected abstract MainConfigurationBootstrapper newMainConfigurationBootstrapper();
-
     protected abstract CLParser getCLParser();
 
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/client/ClientCLI.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/client/ClientCLI.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/client/ClientCLI.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/client/ClientCLI.java Fri Oct 30 15:33:15 2009
@@ -16,9 +16,11 @@
  */
 package org.apache.geronimo.cli.client;
 
+import java.util.Arrays;
+
 import org.apache.geronimo.cli.AbstractCLI;
 import org.apache.geronimo.cli.CLParser;
-import org.apache.geronimo.kernel.util.MainConfigurationBootstrapper;
+import org.apache.geronimo.main.Bootstrapper;
 
 
 /**
@@ -39,10 +41,14 @@
     protected CLParser getCLParser() {
         return new ClientCLParser(System.out);
     }
-
+    
     @Override
-    protected MainConfigurationBootstrapper newMainConfigurationBootstrapper() {
-        return new MainConfigurationBootstrapper();
+    protected Bootstrapper createBootstrapper() {
+        Bootstrapper boot = super.createBootstrapper();
+        boot.setWaitForStop(false);
+        boot.setUniqueStorage(true);
+        boot.setStartBundles(Arrays.asList("org.apache.geronimo.framework/client-system/3.0-SNAPSHOT/car"));
+        return boot;
     }
 
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLI.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLI.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLI.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/daemon/DaemonCLI.java Fri Oct 30 15:33:15 2009
@@ -16,9 +16,11 @@
  */
 package org.apache.geronimo.cli.daemon;
 
+import java.util.Arrays;
+
 import org.apache.geronimo.cli.AbstractCLI;
 import org.apache.geronimo.cli.CLParser;
-import org.apache.geronimo.kernel.util.MainConfigurationBootstrapper;
+import org.apache.geronimo.main.Bootstrapper;
 
 
 /**
@@ -41,8 +43,10 @@
     }
 
     @Override
-    protected MainConfigurationBootstrapper newMainConfigurationBootstrapper() {
-        return new MainConfigurationBootstrapper();
+    protected Bootstrapper createBootstrapper() {
+        Bootstrapper boot = super.createBootstrapper();
+        boot.setWaitForStop(true);
+        boot.setStartBundles(Arrays.asList("org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car"));
+        return boot;
     }
-
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/main/java/org/apache/geronimo/cli/deployer/DeployerCLI.java Fri Oct 30 15:33:15 2009
@@ -18,9 +18,6 @@
 
 import org.apache.geronimo.cli.AbstractCLI;
 import org.apache.geronimo.cli.CLParser;
-import org.apache.geronimo.kernel.util.MainBootstrapper;
-import org.apache.geronimo.kernel.util.MainConfigurationBootstrapper;
-
 
 /**
  * @version $Rev: 476049 $ $Date: 2006-11-17 15:35:17 +1100 (Fri, 17 Nov 2006) $
@@ -52,9 +49,4 @@
         return new DeployerCLParser(System.out);
     }
 
-    @Override
-    protected MainConfigurationBootstrapper newMainConfigurationBootstrapper() {
-        return new MainBootstrapper();
-    }
-
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-cli/src/test/java/org/apache/geronimo/cli/AbstractCLITest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-cli/src/test/java/org/apache/geronimo/cli/AbstractCLITest.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-cli/src/test/java/org/apache/geronimo/cli/AbstractCLITest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-cli/src/test/java/org/apache/geronimo/cli/AbstractCLITest.java Fri Oct 30 15:33:15 2009
@@ -19,8 +19,6 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
-import org.apache.geronimo.kernel.util.MainConfigurationBootstrapper;
-
 import com.agical.rmock.extension.junit.RMockTestCase;
 
 /**
@@ -85,11 +83,6 @@
         protected CLParser getCLParser() {
             return parser;
         }
-
-        @Override
-        protected MainConfigurationBootstrapper newMainConfigurationBootstrapper() {
-            throw new UnsupportedOperationException();
-        }
         
         @Override
         protected boolean executeCommand(CLParser parser) {

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManager.java Fri Oct 30 15:33:15 2009
@@ -296,7 +296,7 @@
         try {
             String location = locateBundle(configurationId, monitor);
             Bundle bundle = bundleContext.installBundle(location);
-            bundle.start();
+            bundle.start(Bundle.START_TRANSIENT);
             bundles.put(configurationId, bundle);
         } catch (Exception e) {
             monitor.finished();

Added: geronimo/server/trunk/framework/modules/geronimo-main/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/pom.xml?rev=831332&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/pom.xml (added)
+++ geronimo/server/trunk/framework/modules/geronimo-main/pom.xml Fri Oct 30 15:33:15 2009
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>modules</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>geronimo-main</artifactId>
+    <packaging>bundle</packaging>
+    <name>Geronimo Framework, Modules :: Main</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix.karaf</groupId>
+            <artifactId>org.apache.felix.karaf.main</artifactId>
+            <scope>provided</scope>
+        </dependency>                
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+     <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
+                        <Import-Package>!org.apache.felix.karaf.main,*</Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java?rev=831332&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java (added)
+++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java Fri Oct 30 15:33:15 2009
@@ -0,0 +1,218 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.main;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class Bootstrapper {
+
+    private org.apache.felix.karaf.main.Main main;
+    private boolean waitForStop = true;    
+    private List<String> bundles;
+    private int defaultStartLevel = 100;
+    private boolean uniqueStorage = false;
+
+    public Bootstrapper() {
+        main = new org.apache.felix.karaf.main.Main(null);
+    }
+    
+    public void setWaitForStop(boolean waitForStop) {
+        this.waitForStop = waitForStop;
+    }
+    
+    public void setStartBundles(List<String> bundles) {
+        this.bundles = bundles;
+    }
+    
+    public void setUniqueStorage(boolean uniqueStorage) {
+        this.uniqueStorage = uniqueStorage;
+    }
+    
+    public int execute(Object opaque) {
+        int exitCode;
+        
+        exitCode = launch();
+        if (exitCode != 0) {
+            return exitCode;
+        }
+        
+        if (bundles != null) {
+            StartLevelListener listener = new StartLevelListener(this);
+            listener.start();            
+        }
+        
+        Main main = getMain();
+        if (main == null) {
+            System.err.println("Main not found");
+            stop(false);
+            return -1;
+        }
+
+        ClassLoader oldTCCL = Thread.currentThread().getContextClassLoader();
+        try {
+            ClassLoader newTCCL = main.getClass().getClassLoader();
+            Thread.currentThread().setContextClassLoader(newTCCL);
+            exitCode = main.execute(opaque);
+            stop(waitForStop);
+        } catch (Throwable e) {
+            e.printStackTrace();
+            stop(false);
+        } finally {
+            Thread.currentThread().setContextClassLoader(oldTCCL);
+        }
+        return exitCode;
+    }
+
+    public Main getMain() {
+        ServiceTracker tracker = new ServiceTracker(main.getFramework().getBundleContext(), Main.class.getName(), null);
+        tracker.open();
+        
+        Main main = null;
+        try {
+            main = (Main) tracker.waitForService(1000 * 60);
+            tracker.close();
+        } catch (Exception e) {            
+            e.printStackTrace();            
+        }
+        return main;
+    }
+    
+    public int launch() {        
+        try {
+            System.setProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, String.valueOf(defaultStartLevel));
+            System.setProperty(Constants.FRAMEWORK_STORAGE, getStorageDirectory());
+            
+            main.launch();
+        } catch (Exception e) {
+            e.printStackTrace();           
+        }
+        return main.getExitCode();
+    }
+    
+    public void stop(boolean await) {
+        try {
+            main.destroy(await);
+        } catch (Exception e) {
+            e.printStackTrace();           
+        } finally {
+            if (uniqueStorage) {
+                String dir = System.getProperty(Constants.FRAMEWORK_STORAGE);
+                recursiveDelete(new File(dir));                
+            }
+        }
+    }
+            
+    protected BundleContext getBundleContext() {
+        return main.getFramework().getBundleContext();
+    }
+            
+    public void startLevelChanged(int startLevel) {
+        if (startLevel == defaultStartLevel) {
+            startBundles();
+        }        
+    }
+    
+    public void startBundles() {
+        BundleContext context = getBundleContext();
+        for (String location : bundles) {
+            String mvnLocation = "mvn:" + location;
+            File fileLocation = getBundleLocation(location);
+            try {
+                Bundle b = context.installBundle(mvnLocation, fileLocation.toURL().openStream());
+                if (b != null) {
+                    b.start(Bundle.START_TRANSIENT);
+                }
+            } catch (Exception ex) {
+                System.err.println("Error starting: " + location + " " + fileLocation + " " + ex);
+            }            
+        }
+    }
+    
+    private File getBundleLocation(String name) {
+        String[] parts = name.split("/");
+        String group = parts[0].replace('.', '/');
+        String artifactId = parts[1];
+        String version = parts[2];
+        String type = parts[3];
+        
+        String fileName = group + "/" + artifactId + "/" + version + "/" + artifactId + "-" + version + "." + type;
+                
+        String defaultRepo = System.getProperty(org.apache.felix.karaf.main.Main.DEFAULT_REPO);
+        
+        File repo = new File(getHome(), defaultRepo);
+        File bundleLocation = new File(repo, fileName);
+        
+        return bundleLocation;
+    }
+    
+    private String getStorageDirectory() throws IOException {
+        File storage;
+        if (uniqueStorage) {
+            File var = new File(getHome(), "var");
+            File tmpFile = File.createTempFile("appclient-", "", var);
+            storage = new File(var, tmpFile.getName() + "-cache");
+            tmpFile.delete();
+        } else {
+            storage = new File(getHome(), "var/cache");
+        }
+                
+        storage.mkdirs();
+        return storage.getAbsolutePath();
+    }
+    
+    private String getHome() {
+        return System.getProperty(org.apache.felix.karaf.main.Main.PROP_KARAF_HOME);
+    }
+    
+    private static boolean recursiveDelete(File root) {
+        if (root == null) {
+            return true;
+        }
+
+        boolean ok = true;
+        
+        if (root.isDirectory()) {
+            File[] files = root.listFiles();
+            if (files != null) {
+                for (int i = 0; i < files.length; i++) {
+                    File file = files[i];
+                    if (file.isDirectory()) {
+                        ok = ok && recursiveDelete(file);
+                    } else {
+                        ok = ok && file.delete();
+                    }
+                }
+            }
+        }
+        
+        ok = ok && root.delete();
+        
+        return ok;
+    }
+
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Bootstrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java?rev=831332&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java (added)
+++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java Fri Oct 30 15:33:15 2009
@@ -0,0 +1,21 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.main;
+
+public interface Main {
+    int execute(Object opaque);
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Main.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java?rev=831332&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java (added)
+++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java Fri Oct 30 15:33:15 2009
@@ -0,0 +1,46 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.main;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.service.startlevel.StartLevel;
+
+public class StartLevelListener implements FrameworkListener {
+    
+    private Bootstrapper bootstrapper;
+    private StartLevel startLevel;
+    
+    public StartLevelListener(Bootstrapper bootstrapper) {
+        this.bootstrapper = bootstrapper;                      
+    }
+    
+    public void start() {
+        BundleContext context = bootstrapper.getBundleContext();
+        startLevel = (StartLevel) context.getService(context.getServiceReference(StartLevel.class.getName()));
+        
+        context.addFrameworkListener(this);        
+    }
+    
+    public void frameworkEvent(FrameworkEvent event) {
+        if (event.getType() == FrameworkEvent.STARTLEVEL_CHANGED) {
+            bootstrapper.startLevelChanged(startLevel.getStartLevel());
+        }
+    }
+
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/StartLevelListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java Fri Oct 30 15:33:15 2009
@@ -99,7 +99,7 @@
                     }
                     for (Bundle b : bundles) {
                         try {
-                            b.start();
+                            b.start(Bundle.START_TRANSIENT);
                         } catch (BundleException e) {
                             log.warn("Could not start bundle: " + b, e);
                         }

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/Daemon.java Fri Oct 30 15:33:15 2009
@@ -34,7 +34,7 @@
 
     private Daemon() {
         //TODO osgi bundleContext == null
-        super(KernelFactory.newInstance(null).createKernel("geronimo"));
+        super(KernelFactory.newInstance(null).createKernel("geronimo"), null);
     }
 
     @Override

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedClientCommandLine.java Fri Oct 30 15:33:15 2009
@@ -16,29 +16,35 @@
  */
 package org.apache.geronimo.system.main;
 
+import java.util.Hashtable;
+
 import org.apache.geronimo.cli.client.ClientCLParser;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.util.Main;
+import org.apache.geronimo.main.Main;
+import org.osgi.framework.Bundle;
 
 /**
  * @version $Revision: 476049 $ $Date: 2006-11-17 15:35:17 +1100 (Fri, 17 Nov 2006) $
  */
-public class EmbeddedClientCommandLine extends ClientCommandLine implements Main {
+public class EmbeddedClientCommandLine extends ClientCommandLine implements Main, GBeanLifecycle {
     
     private final Kernel kernel;
+    private final Bundle bundle;
 
-    public EmbeddedClientCommandLine(Kernel kernel) {
+    public EmbeddedClientCommandLine(Kernel kernel, Bundle bundle) {
         if (null == kernel) {
             throw new IllegalArgumentException("kernel is required");
         }
         this.kernel = kernel;
+        this.bundle = bundle;
     }
 
     public int execute(Object opaque) {
         if (! (opaque instanceof ClientCLParser)) {
-            throw new IllegalArgumentException("Argument type is [" + opaque.getClass() + "]; expected [" + String[].class + "]");
+            throw new IllegalArgumentException("Argument type is [" + opaque.getClass() + "]; expected [" + ClientCLParser.class + "]");
         }
         return super.execute((ClientCLParser) opaque);
     }
@@ -57,12 +63,26 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EmbeddedClientCommandLine.class, "EmbeddedClientCommandLine");
         infoFactory.addAttribute("kernel", Kernel.class, false);
-        infoFactory.setConstructor(new String[]{"kernel"});
+        infoFactory.addAttribute("bundle", Bundle.class, false);
+        infoFactory.setConstructor(new String[]{"kernel", "bundle"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
     public static GBeanInfo getGBeanInfo() {
         return GBEAN_INFO;
     }
+
+    @Override
+    public void doFail() {
+    }
+
+    @Override
+    public void doStart() throws Exception {
+        bundle.getBundleContext().registerService(Main.class.getName(), this, new Hashtable());
+    }
+
+    @Override
+    public void doStop() throws Exception {
+    }
     
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/EmbeddedDaemon.java Fri Oct 30 15:33:15 2009
@@ -20,6 +20,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Hashtable;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
@@ -30,6 +31,7 @@
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
@@ -38,24 +40,27 @@
 import org.apache.geronimo.kernel.config.LifecycleMonitor;
 import org.apache.geronimo.kernel.config.PersistentConfigurationList;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.util.Main;
+import org.apache.geronimo.main.Main;
 import org.apache.geronimo.system.serverinfo.DirectoryUtils;
+import org.osgi.framework.Bundle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev:385659 $ $Date: 2007-03-07 14:40:07 +1100 (Wed, 07 Mar 2007) $
  */
-public class EmbeddedDaemon implements Main {
+public class EmbeddedDaemon implements Main, GBeanLifecycle {
     private static final Logger log = LoggerFactory.getLogger(EmbeddedDaemon.class);
 
     protected final Kernel kernel;
+    private Bundle bundle;
     private StartupMonitor monitor;
     private LifecycleMonitor lifecycleMonitor;
     private List<Artifact> configs = new ArrayList<Artifact>();
 
-    public EmbeddedDaemon(Kernel kernel) {
+    public EmbeddedDaemon(Kernel kernel, Bundle bundle) {
         this.kernel = kernel;
+        this.bundle = bundle;
     }
 
     public int execute(Object opaque) {
@@ -63,6 +68,7 @@
             throw new IllegalArgumentException("Argument type is [" + opaque.getClass() + "]; expected [" + DaemonCLParser.class + "]");
         }
         DaemonCLParser parser = (DaemonCLParser) opaque;
+
         initializeMonitor(parser);
         initializeOverride(parser);
 
@@ -70,12 +76,12 @@
 
         System.out.println("Booting Geronimo Kernel (in Java " + System.getProperty("java.version") + ")...");
         System.out.flush();
-
+        
         // Perform initialization tasks common with the various Geronimo environments
-        GeronimoEnvironment.init();
+        //GeronimoEnvironment.init();
 
         monitor.systemStarting(start);
-        return doStartup();
+        return doStartup();       
     }
 
     protected void initializeOverride(DaemonCLParser parser) {
@@ -111,13 +117,15 @@
                 return 1;
             }
 
+            /*
             // Determine the geronimo installation directory
             File geronimoInstallDirectory = DirectoryUtils.getGeronimoInstallDirectory();
             if (geronimoInstallDirectory == null) {
                 System.err.println("Could not determine geronimo installation directory");
                 return 1;
             }
-
+            */
+            
             int exitCode = initializeKernel();
             if (0 != exitCode) {
                 return exitCode;
@@ -148,7 +156,7 @@
             try {
                 ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
                 try {
-                    List<Artifact> unloadedConfigs = new ArrayList(configs);
+                    List<Artifact> unloadedConfigs = new ArrayList<Artifact>(configs);
                     int unloadedConfigsCount;
                     do {
                         unloadedConfigsCount = unloadedConfigs.size();
@@ -156,6 +164,7 @@
                         for (Artifact configID : sorted) {
                             monitor.moduleLoading(configID);
                             configurationManager.loadConfiguration(configID, lifecycleMonitor);
+                            unloadedConfigs.remove(configID);
                             monitor.moduleLoaded(configID);
                             monitor.moduleStarting(configID);
                             configurationManager.startConfiguration(configID, lifecycleMonitor);
@@ -194,6 +203,7 @@
             monitor.startupFinished();
             monitor = null;
 
+            /*
             // capture this thread until the kernel is ready to exit
             while (kernel.isRunning()) {
                 try {
@@ -204,6 +214,7 @@
                     // continue
                 }
             }
+            */
         } catch (Exception e) {
             if (monitor != null) {
                 monitor.serverStartFailed(e);
@@ -232,7 +243,8 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EmbeddedDaemon.class, "EmbeddedDaemon");
         infoFactory.addAttribute("kernel", Kernel.class, false);
-        infoFactory.setConstructor(new String[]{"kernel"});
+        infoFactory.addAttribute("bundle", Bundle.class, false);
+        infoFactory.setConstructor(new String[]{"kernel", "bundle"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
@@ -240,4 +252,18 @@
         return GBEAN_INFO;
     }
 
+    @Override
+    public void doFail() {
+    }
+
+    @Override
+    public void doStart() throws Exception {
+        bundle.getBundleContext().registerService(Main.class.getName(), this, new Hashtable());
+    }
+
+    @Override
+    public void doStop() throws Exception {
+
+    }
+
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/osgi/BootActivator.java Fri Oct 30 15:33:15 2009
@@ -87,6 +87,7 @@
                 in.close();
             }
 
+            /*
             List<Artifact> configs = new ArrayList<Artifact>();
             AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
 
@@ -157,6 +158,7 @@
 
             // Startup sequence is finished
             monitor.startupFinished();
+            */
         } else {
             configurationActivator = new ConfigurationActivator();
             configurationActivator.start(bundleContext);

Modified: geronimo/server/trunk/framework/modules/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/pom.xml (original)
+++ geronimo/server/trunk/framework/modules/pom.xml Fri Oct 30 15:33:15 2009
@@ -56,6 +56,7 @@
                 <!-- needed for car-maven-plugin -->
                 <module>testsupport-common</module>
                 <module>geronimo-common</module>
+                <module>geronimo-main</module>
                 <module>geronimo-system</module>
                 <!--<module>geronimo-logging</module>-->
                 <module>geronimo-rmi-loader</module>

Modified: geronimo/server/trunk/framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/pom.xml?rev=831332&r1=831331&r2=831332&view=diff
==============================================================================
--- geronimo/server/trunk/framework/pom.xml (original)
+++ geronimo/server/trunk/framework/pom.xml Fri Oct 30 15:33:15 2009
@@ -42,50 +42,55 @@
             <dependency>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>org.osgi.core</artifactId>
-                <version>1.5.0-SNAPSHOT</version>
+                <version>1.4.0</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>
-                <artifactId>org.apache.felix.framework</artifactId>
-                <version>2.1.0-SNAPSHOT</version>
+                <artifactId>org.osgi.compendium</artifactId>
+                <version>1.2.0</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.apache.felix</groupId>
-                        <artifactId>org.osgi.compendium</artifactId>
+                        <artifactId>org.osgi.foundation</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.felix</groupId>
+                        <artifactId>javax.servlet</artifactId>
                     </exclusion>
                 </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>
-                <artifactId>org.apache.felix.configadmin</artifactId>
-                <version>1.0.10</version>
+                <artifactId>org.apache.felix.framework</artifactId>
+                <version>2.1.0-SNAPSHOT</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.apache.felix</groupId>
                         <artifactId>org.osgi.compendium</artifactId>
                     </exclusion>
-                    <exclusion>
-                        <groupId>org.apache.felix</groupId>
-                        <artifactId>org.osgi.core</artifactId>
-                    </exclusion>
                 </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>
-                <artifactId>org.osgi.compendium</artifactId>
-                <version>1.5.0-SNAPSHOT</version>
+                <artifactId>org.apache.felix.configadmin</artifactId>
+                <version>1.0.10</version>
                 <exclusions>
                     <exclusion>
                         <groupId>org.apache.felix</groupId>
-                        <artifactId>org.osgi.foundation</artifactId>
+                        <artifactId>org.osgi.compendium</artifactId>
                     </exclusion>
                     <exclusion>
                         <groupId>org.apache.felix</groupId>
-                        <artifactId>javax.servlet</artifactId>
+                        <artifactId>org.osgi.core</artifactId>
                     </exclusion>
                 </exclusions>
             </dependency>
             <dependency>
+                <groupId>org.apache.felix.karaf</groupId>
+                <artifactId>org.apache.felix.karaf.main</artifactId>
+                <version>1.1.0-SNAPSHOT</version>
+            </dependency>    
+            <dependency>
                 <groupId>org.ops4j.pax.exam</groupId>
                 <artifactId>pax-exam</artifactId>
                 <version>1.0.0</version>



Mime
View raw message