geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r884915 - in /geronimo/sandbox/rex: org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/ org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/
Date Fri, 27 Nov 2009 17:22:10 GMT
Author: gawor
Date: Fri Nov 27 17:22:08 2009
New Revision: 884915

URL: http://svn.apache.org/viewvc?rev=884915&view=rev
Log:
a few fixes. getting some data in jconsole

Modified:
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintMetadata.java
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintState.java
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/Item.java

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintMetadata.java?rev=884915&r1=884914&r2=884915&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintMetadata.java
(original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintMetadata.java
Fri Nov 27 17:22:08 2009
@@ -1,6 +1,7 @@
 package org.apache.geronimo.blueprint.jmx.impl;
 
 import java.io.IOException;
+import java.util.Set;
 
 import javax.management.openmbean.CompositeData;
 
@@ -60,7 +61,8 @@
 
     public String[] getComponentIds(long containerServiceId) {
         BlueprintContainer container = getBlueprintContainer(containerServiceId);
-        return (String[]) container.getComponentIds().toArray();
+        Set<String> componentIds = container.getComponentIds();
+        return (String[]) componentIds.toArray(new String [componentIds.size()]);
     }
 
     /*

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintState.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintState.java?rev=884915&r1=884914&r2=884915&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintState.java
(original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/BlueprintState.java
Fri Nov 27 17:22:08 2009
@@ -31,7 +31,7 @@
     }
 
     public synchronized long[] getBlueprintBundleIds() throws IOException {
-        Long[] bundleIdKeys = (Long[]) dataMap.keySet().toArray();
+        Long[] bundleIdKeys = (Long[]) dataMap.keySet().toArray(new Long [] {});
         long[] bundleIds = new long[bundleIdKeys.length];
         for (int i = 0; i < bundleIdKeys.length; i++) {
             bundleIds[i] = bundleIdKeys[i].longValue();

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java?rev=884915&r1=884914&r2=884915&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java
(original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/BlueprintStateMBean.java
Fri Nov 27 17:22:08 2009
@@ -137,7 +137,7 @@
      */
     CompositeType   OSGI_BLUEPRINT_EVENT_TYPE   = Item.compositeType(
                                                     "OSGI_BLUEPRINT_EVENT", 
-                                                    "", 
+                                                    "Blueprint event", 
                                                     BUNDLE_ID_ITEM,
                                                     EXTENDER_BUNDLE_ID_ITEM,
                                                     EVENT_TYPE_ITEM,

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/Item.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/Item.java?rev=884915&r1=884914&r2=884915&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/Item.java
(original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx/src/main/java/org/apache/geronimo/blueprint/jmx/Item.java
Fri Nov 27 17:22:08 2009
@@ -130,10 +130,12 @@
         String descriptions[] = new String[all.size()];
         OpenType<?> types[] = new OpenType<?>[all.size()];
 
-        for (int n = 0; n < types.length; n++) {
-            names[n] = items[n].name;
-            descriptions[n] = items[n].description;
-            types[n] = items[n].type;
+        int n = 0;
+        for (Item item : all) {
+            names[n] = item.name;
+            descriptions[n] = item.description;
+            types[n] = item.type;
+            n++;
         }
 
         try {



Mime
View raw message