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 2006/12/31 23:39:01 UTC
svn commit: r491507 - in
/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server:
TuscanyServer.java TuscanyServerMBean.java
Author: meerajk
Date: Sun Dec 31 14:39:01 2006
New Revision: 491507
URL: http://svn.apache.org/viewvc?view=rev&rev=491507
Log:
Added managementDomain for the runtime as part of the
management interface for starting the runtime.
Modified:
incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServer.java
incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServerMBean.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=491507&r1=491506&r2=491507
==============================================================================
--- 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 Dec 31 14:39:01 2006
@@ -62,24 +62,22 @@
* <code>tuscany.adminPort</tuscany>.If not specified the default port
* that is used is <code>1099</code>
*
- *
- *
* @version $Rev$ $Date$
*
*/
public class TuscanyServer implements TuscanyServerMBean {
/** Agent */
- private Agent agent;
+ private final Agent agent;
/** Install directory */
- private File installDirectory;
+ private final File installDirectory;
/** Base Url */
- private URL baseUrl;
+ private final URL baseUrl;
/** Started runtimes. */
- private Map<String, TuscanyRuntime> bootedRuntimes = new ConcurrentHashMap<String, TuscanyRuntime>();
+ private final Map<String, TuscanyRuntime> bootedRuntimes = new ConcurrentHashMap<String, TuscanyRuntime>();
/**
*
@@ -96,31 +94,32 @@
*/
private TuscanyServer() throws MalformedURLException {
installDirectory = DirectoryHelper.getInstallDirectory();
- baseUrl = installDirectory.toURI().toURL();
+ baseUrl = installDirectory.toURI().toURL();
+ agent = RmiAgent.getInstance();
}
/**
* @see org.apache.tuscany.standalone.server.TuscanyServerMBean#startRuntime(java.lang.String, boolean)
*/
- public void startRuntime(String bootPath, boolean online) {
+ public final void startRuntime(final String bootPath, final boolean online, final String managementDomain) {
try {
- File bootDirectory = DirectoryHelper.getBootDirectory(installDirectory, bootPath);
+ final File bootDirectory = DirectoryHelper.getBootDirectory(installDirectory, bootPath);
- StandaloneRuntimeInfo runtimeInfo = new StandaloneRuntimeInfoImpl(baseUrl, installDirectory, installDirectory, online);
+ final StandaloneRuntimeInfo runtimeInfo = new StandaloneRuntimeInfoImpl(baseUrl, installDirectory, installDirectory, online);
- ClassLoader hostClassLoader = ClassLoader.getSystemClassLoader();
- ClassLoader bootClassLoader = getTuscanyClassLoader(bootDirectory);
+ final ClassLoader hostClassLoader = ClassLoader.getSystemClassLoader();
+ final ClassLoader bootClassLoader = getTuscanyClassLoader(bootDirectory);
- URL systemScdl = getSystemScdl(bootClassLoader);
+ final URL systemScdl = getSystemScdl(bootClassLoader);
if(systemScdl == null) {
throw new TuscanyServerException("Unable to find system scdl");
}
- String className = System.getProperty("tuscany.launcherClass",
+ final String className = System.getProperty("tuscany.launcherClass",
"org.apache.tuscany.runtime.standalone.host.StandaloneRuntimeImpl");
- TuscanyRuntime runtime = (TuscanyRuntime) Beans.instantiate(bootClassLoader, className);
+ final TuscanyRuntime runtime = (TuscanyRuntime) Beans.instantiate(bootClassLoader, className);
runtime.setMonitorFactory(runtime.createDefaultMonitorFactory());
runtime.setSystemScdl(systemScdl);
runtime.setHostClassLoader(hostClassLoader);
@@ -145,7 +144,7 @@
/**
* @see org.apache.tuscany.standalone.server.TuscanyServerMBean#shutdownRuntime(java.lang.String)
*/
- public void shutdownRuntime(String bootPath) {
+ public final void shutdownRuntime(String bootPath) {
try {
TuscanyRuntime runtime = bootedRuntimes.get(bootPath);
@@ -164,7 +163,7 @@
* Starts the server.
*
*/
- public void shutdown() {
+ public final void shutdown() {
for(String bootPath : bootedRuntimes.keySet()) {
shutdownRuntime(bootPath);
@@ -199,8 +198,7 @@
* Starts the server and starts the JMX agent.
*
*/
- private void start() {
- agent = RmiAgent.getInstance();
+ private void start() {
agent.start();
agent.register(this, "tuscany:type=server,name=tuscanyServer");
}
Modified: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServerMBean.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServerMBean.java?view=diff&rev=491507&r1=491506&r2=491507
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServerMBean.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/TuscanyServerMBean.java Sun Dec 31 14:39:01 2006
@@ -31,8 +31,9 @@
*
* @param bootPath Bootpath for the runtime.
* @param online Whether the runtime will resolve dependencies on the fly.
+ * @param managementDomain Management domain for the runtime.
*/
- public void startRuntime(String bootPath, boolean online);
+ public void startRuntime(String bootPath, boolean online, String managementDomain);
/**
* Shuts down a runtime specified by the bootpath.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org