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/28 01:44:05 UTC

svn commit: r490616 - in /incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx: ./ instrument/ instrument/runtime/

Author: meerajk
Date: Wed Dec 27 16:44:04 2006
New Revision: 490616

URL: http://svn.apache.org/viewvc?view=rev&rev=490616
Log:
Added management interface for runtime.

Added:
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java   (with props)
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java   (with props)
Modified:
    incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/AbstractAgent.java

Modified: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/AbstractAgent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/AbstractAgent.java?view=diff&rev=490616&r1=490615&r2=490616
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/AbstractAgent.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/AbstractAgent.java Wed Dec 27 16:44:04 2006
@@ -62,7 +62,7 @@
     public final void register(Object instance, String name) throws ManagementException {
         
         try {
-            mBeanServer.registerMBean(instance, new ObjectName(DOMAIN + ":name=" + name));
+            mBeanServer.registerMBean(instance, new ObjectName(name));
         } catch (Exception ex) {
             throw new ManagementException(ex);
         }

Added: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java?view=auto&rev=490616
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java (added)
+++ incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java Wed Dec 27 16:44:04 2006
@@ -0,0 +1,58 @@
+/*
+ * 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.tuscany.standalone.server.management.jmx.instrument.runtime;
+
+import org.apache.tuscany.host.runtime.InitializationException;
+import org.apache.tuscany.host.runtime.ShutdownException;
+import org.apache.tuscany.host.runtime.TuscanyRuntime;
+
+/**
+ * @version $Revision$ $Date$
+ *
+ */
+public class Runtime implements RuntimeMbean {
+    
+    /**
+     * Delegate runtime.
+     */
+    private TuscanyRuntime delegate;
+    
+    /**
+     * Initializes the delegate.
+     * @param delegate Delegate MBean.
+     */
+    public Runtime(TuscanyRuntime delegate) {
+        this.delegate = delegate;
+    }
+
+    /**
+     * @see org.apache.tuscany.host.runtime.TuscanyRuntime#destroy()
+     */
+    public void destroy() throws ShutdownException {
+        delegate.destroy();
+    }
+
+    /**
+     * @see org.apache.tuscany.host.runtime.TuscanyRuntime#initialize()
+     */
+    public void initialize() throws InitializationException {
+        delegate.initialize();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/Runtime.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java?view=auto&rev=490616
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java (added)
+++ incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java Wed Dec 27 16:44:04 2006
@@ -0,0 +1,45 @@
+/*
+ * 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.tuscany.standalone.server.management.jmx.instrument.runtime;
+
+import org.apache.tuscany.host.runtime.InitializationException;
+import org.apache.tuscany.host.runtime.ShutdownException;
+
+/**
+ * 
+ * @version $Revision$ $Date$
+ *
+ */
+public interface RuntimeMbean {
+
+    /**
+     * Initialize a runtime.
+     *
+     * @throws InitializationException if there is an error initializing the runtime
+     */
+    void initialize() throws InitializationException;
+
+    /**
+     * Destroy the runtime. Any further invocations should result in an error.
+     *
+     * @throws ShutdownException if there is an error destroying the runtime
+     */
+    void destroy() throws ShutdownException;
+
+}

Propchange: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/runtime/standalone/server.start/src/main/java/org/apache/tuscany/standalone/server/management/jmx/instrument/runtime/RuntimeMbean.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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