aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1209487 - in /aries/trunk/sandbox/jmx-next: jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java
Date Fri, 02 Dec 2011 14:03:57 GMT
Author: davidb
Date: Fri Dec  2 14:03:57 2011
New Revision: 1209487

URL: http://svn.apache.org/viewvc?rev=1209487&view=rev
Log:
Small fix to BundleRevisionStateMBean.getCurrrentRevisionDeclaredRequirements()

Modified:
    aries/trunk/sandbox/jmx-next/jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java
    aries/trunk/sandbox/jmx-next/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java

Modified: aries/trunk/sandbox/jmx-next/jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java
URL: http://svn.apache.org/viewvc/aries/trunk/sandbox/jmx-next/jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java?rev=1209487&r1=1209486&r2=1209487&view=diff
==============================================================================
--- aries/trunk/sandbox/jmx-next/jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java
(original)
+++ aries/trunk/sandbox/jmx-next/jmx-core/src/main/java/org/apache/aries/jmx/framework/BundleRevisionsState.java
Fri Dec  2 14:03:57 2011
@@ -51,9 +51,9 @@ public class BundleRevisionsState implem
      */
     public CompositeData[] getCurrentRevisionDeclaredRequirements(long bundleId, String namespace)
throws IOException {
         Bundle bundle = FrameworkUtils.resolveBundle(bundleContext, bundleId);
-        BundleWiring wiring = bundle.adapt(BundleWiring.class);
+        BundleRevision revision = bundle.adapt(BundleRevision.class);
 
-        BundleRequirementsData data = new BundleRequirementsData(wiring.getRequirements(namespace));
+        BundleRequirementsData data = new BundleRequirementsData(revision.getDeclaredRequirements(namespace));
         return data.toCompositeData();
     }
 

Modified: aries/trunk/sandbox/jmx-next/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/sandbox/jmx-next/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java?rev=1209487&r1=1209486&r2=1209487&view=diff
==============================================================================
--- aries/trunk/sandbox/jmx-next/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java
(original)
+++ aries/trunk/sandbox/jmx-next/jmx-itests/src/test/java/org/apache/aries/jmx/framework/BundleRevisionsStateMBeanTest.java
Fri Dec  2 14:03:57 2011
@@ -43,9 +43,7 @@ import org.junit.Test;
 import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
-import org.ops4j.pax.exam.container.def.options.VMOption;
 import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.options.TimeoutOption;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.wiring.BundleCapability;
@@ -60,8 +58,8 @@ public class BundleRevisionsStateMBeanTe
     @Configuration
     public static Option[] configuration() {
         return testOptions(
-            new VMOption( "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
),
-            new TimeoutOption( 0 ),
+            // new VMOption( "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
),
+            // new TimeoutOption( 0 ),
 
             PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),
             CoreOptions.equinox().version("3.7.0.v20110613"),
@@ -124,9 +122,9 @@ public class BundleRevisionsStateMBeanTe
         BundleRevisionsStateMBean brsMBean = getMBean(BundleRevisionsStateMBean.OBJECTNAME,
BundleRevisionsStateMBean.class);
 
         Bundle a = context().getBundleByName("org.apache.aries.jmx.test.bundlea");
-        BundleWiring bw = a.adapt(BundleWiring.class);
+        BundleRevision br = a.adapt(BundleRevision.class);
 
-        List<BundleRequirement> requirements = bw.getRequirements(BundleRevision.PACKAGE_NAMESPACE);
+        List<BundleRequirement> requirements = br.getDeclaredRequirements(BundleRevision.PACKAGE_NAMESPACE);
         CompositeData[] jmxRequirements = brsMBean.getCurrentRevisionDeclaredRequirements(a.getBundleId(),
BundleRevisionsStateMBean.PACKAGE_NAMESPACE);
         Assert.assertEquals(requirements.size(), jmxRequirements.length);
 



Mime
View raw message