You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/03/11 12:06:00 UTC

svn commit: r516886 - /incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java

Author: meerajk
Date: Sun Mar 11 04:05:59 2007
New Revision: 516886

URL: http://svn.apache.org/viewvc?view=rev&rev=516886
Log:
Added code to start profiles specified in the cli on server startup.

Modified:
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java

Modified: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java?view=diff&rev=516886&r1=516885&r2=516886
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java Sun Mar 11 04:05:59 2007
@@ -35,6 +35,7 @@
 import org.apache.tuscany.host.runtime.ShutdownException;
 import org.apache.tuscany.host.runtime.TuscanyRuntime;
 import org.apache.tuscany.runtime.standalone.DirectoryHelper;
+import org.apache.tuscany.runtime.standalone.StandaloneRuntime;
 import org.apache.tuscany.runtime.standalone.StandaloneRuntimeInfo;
 import org.apache.tuscany.runtime.standalone.StandaloneRuntimeInfoImpl;
 import org.apache.tuscany.service.management.jmx.JmxManagementService;
@@ -90,7 +91,13 @@
      * @param args Commandline arguments.
      */
     public static void main(String[] args) throws Exception {
-        new TuscanyServer().start();
+        TuscanyServer server = new TuscanyServer();
+        server.start();
+        
+        // Start any runtimes specified in the cli
+        for(String profile : args) {
+            server.startRuntime(profile);
+        }
     }
 
     /**
@@ -118,7 +125,7 @@
             final MBeanServer mBeanServer = agent.getMBeanServer();            
             final StandaloneRuntimeInfo runtimeInfo = createRuntimeInfo(profileName);
             final ManagementService<?> managementService = new JmxManagementService(mBeanServer, profileName);
-            final TuscanyRuntime runtime = createRuntime(bootDirectory, runtimeInfo);
+            final TuscanyRuntime<?> runtime = createRuntime(bootDirectory, runtimeInfo);
             runtime.setManagementService(managementService);
             runtime.initialize();
 
@@ -226,7 +233,7 @@
         final String className =
             runtimeInfo.getProperty("tuscany.launcherClass",
                                "org.apache.tuscany.runtime.standalone.host.StandaloneRuntimeImpl");
-        final TuscanyRuntime runtime = (TuscanyRuntime) Beans.instantiate(bootClassLoader, className);
+        final StandaloneRuntime runtime = (StandaloneRuntime) Beans.instantiate(bootClassLoader, className);
         runtime.setSystemScdl(systemScdl);
         runtime.setHostClassLoader(hostClassLoader);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org