karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3147] Cleanup management.boot dependency (doesn't exist anymore)
Date Sun, 10 May 2015 08:31:43 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x fb5c29f17 -> 820df78cc


[KARAF-3147] Cleanup management.boot dependency (doesn't exist anymore)


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/820df78c
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/820df78c
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/820df78c

Branch: refs/heads/karaf-3.0.x
Commit: 820df78cc2c729220fea10dd833500e842fa8b73
Parents: fb5c29f
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sun May 10 10:31:13 2015 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sun May 10 10:31:13 2015 +0200

----------------------------------------------------------------------
 .../resources/etc/config.properties             |   4 +-
 .../core/internal/InstanceServiceImpl.java      |   2 -
 management/server/pom.xml                       |   5 -
 .../karaf/management/KarafMBeanServerGuard.java |   1 -
 .../internal/JMXSecurityMBeanImpl.java          |   1 -
 .../internal/JMXSecurityMBeanImplTestCase.java  | 213 ++++++++-----------
 pom.xml                                         |   5 -
 .../wrapper/internal/windows/karaf-wrapper.conf |  10 +-
 .../internal/windows64/karaf-wrapper.conf       |  10 +-
 9 files changed, 95 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
b/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
index a2c38b5..2cf400a 100644
--- a/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/etc/config.properties
@@ -150,13 +150,13 @@ org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.ja
 # in order to use Karaf with jvisualvm, the org.osgi.framework.bootdelegation property has
to contain the org.netbeans.lib.profiler.server package
 # and, so, it should look like:
 #
-# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,org.apache.karaf.management.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,org.netbeans.lib.profiler.server
+# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,org.netbeans.lib.profiler.server
 #
 # YourKit support
 # in order to use Karaf with YourKit, the org.osgi.framework.bootdelegation property has
to contain the com.yourkit.* packages
 # and, so, it should look like:
 #
-# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,org.apache.karaf.management.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,com.yourkit.*
+# org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,com.yourkit.*
 #
 
 #

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
----------------------------------------------------------------------
diff --git a/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
b/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index 724a625..eff6423 100644
--- a/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -438,14 +438,12 @@ public class InstanceServiceImpl implements InstanceService {
                         + "\" " + opts
                         + " " + karafOpts
                         + " -Djava.util.logging.config.file=\"" + new File(location, "etc/java.util.logging.properties").getCanonicalPath()
+ "\""
-                        + " -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder"
                         + " -Djava.endorsed.dirs=\"" + new File(new File(new File(System.getProperty("java.home"),
"jre"), "lib"), "endorsed") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"),
"lib"), "endorsed") + System.getProperty("path.separator") + new File(libDir, "endorsed").getCanonicalPath()
+ "\""
                         + " -Djava.ext.dirs=\"" + new File(new File(new File(System.getProperty("java.home"),
"jre"), "lib"), "ext") + System.getProperty("path.separator") + new File(new File(System.getProperty("java.home"),
"lib"), "ext") + System.getProperty("path.separator") + new File(libDir, "ext").getCanonicalPath()
+ "\""
                         + " -Dkaraf.home=\"" + System.getProperty("karaf.home") + "\""
                         + " -Dkaraf.base=\"" + new File(location).getCanonicalPath() + "\""
                         + " -Dkaraf.data=\"" + new File(new File(location).getCanonicalPath(),
"data") + "\""
                         + " -Dkaraf.etc=\"" + new File(new File(location).getCanonicalPath(),
"etc") + "\""
-                        + " -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder"
                         + " -Dkaraf.startLocalConsole=false"
                         + " -Dkaraf.startRemoteShell=true"
                         + " -classpath \"" + classpath.toString() + "\""

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/management/server/pom.xml
----------------------------------------------------------------------
diff --git a/management/server/pom.xml b/management/server/pom.xml
index 2515618..9dbc0bd 100644
--- a/management/server/pom.xml
+++ b/management/server/pom.xml
@@ -60,11 +60,6 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.karaf.management</groupId>
-            <artifactId>org.apache.karaf.management.boot</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.karaf.service</groupId>
             <artifactId>org.apache.karaf.service.guard</artifactId>
             <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
b/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
index 98635ae..4c94370 100644
--- a/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
+++ b/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
@@ -17,7 +17,6 @@
 package org.apache.karaf.management;
 
 import org.apache.karaf.jaas.boot.principal.RolePrincipal;
-import org.apache.karaf.management.boot.KarafMBeanServerBuilder;
 import org.apache.karaf.service.guard.tools.ACLConfigurationParser;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.service.cm.Configuration;

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/management/server/src/main/java/org/apache/karaf/management/internal/JMXSecurityMBeanImpl.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/JMXSecurityMBeanImpl.java
b/management/server/src/main/java/org/apache/karaf/management/internal/JMXSecurityMBeanImpl.java
index 4e4a721..031fbdf 100644
--- a/management/server/src/main/java/org/apache/karaf/management/internal/JMXSecurityMBeanImpl.java
+++ b/management/server/src/main/java/org/apache/karaf/management/internal/JMXSecurityMBeanImpl.java
@@ -18,7 +18,6 @@ package org.apache.karaf.management.internal;
 
 import org.apache.karaf.management.JMXSecurityMBean;
 import org.apache.karaf.management.KarafMBeanServerGuard;
-import org.apache.karaf.management.boot.KarafMBeanServerBuilder;
 
 import javax.management.MBeanServer;
 import javax.management.NotCompliantMBeanException;

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/management/server/src/test/java/org/apache/karaf/management/internal/JMXSecurityMBeanImplTestCase.java
----------------------------------------------------------------------
diff --git a/management/server/src/test/java/org/apache/karaf/management/internal/JMXSecurityMBeanImplTestCase.java
b/management/server/src/test/java/org/apache/karaf/management/internal/JMXSecurityMBeanImplTestCase.java
index c22a4bf..40d62ea 100644
--- a/management/server/src/test/java/org/apache/karaf/management/internal/JMXSecurityMBeanImplTestCase.java
+++ b/management/server/src/test/java/org/apache/karaf/management/internal/JMXSecurityMBeanImplTestCase.java
@@ -18,7 +18,6 @@ package org.apache.karaf.management.internal;
 
 import junit.framework.TestCase;
 import org.apache.karaf.management.KarafMBeanServerGuard;
-import org.apache.karaf.management.boot.KarafMBeanServerBuilder;
 import org.easymock.EasyMock;
 
 import javax.management.MBeanServer;
@@ -41,49 +40,36 @@ public class JMXSecurityMBeanImplTestCase extends TestCase {
     }
 
     public void testCanInvokeMBean() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
-            EasyMock.replay(mbs);
+        MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
+        EasyMock.replay(mbs);
 
-            String objectName = "foo.bar.testing:type=SomeMBean";
-            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
-            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(true);
-            EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
+        String objectName = "foo.bar.testing:type=SomeMBean";
+        KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
+        EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(true);
+        EasyMock.replay(testGuard);
 
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            mb.setMBeanServer(mbs);
-            mb.setGuard(testGuard);
-            assertTrue(mb.canInvoke(objectName));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        mb.setMBeanServer(mbs);
+        mb.setGuard(testGuard);
+        assertTrue(mb.canInvoke(objectName));
     }
 
     public void testCanInvokeMBean2() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
-            EasyMock.replay(mbs);
+        MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
+        EasyMock.replay(mbs);
 
-            String objectName = "foo.bar.testing:type=SomeMBean";
-            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
-            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(false);
-            EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
+        String objectName = "foo.bar.testing:type=SomeMBean";
+        KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
+        EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andReturn(false);
+        EasyMock.replay(testGuard);
 
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            mb.setMBeanServer(mbs);
-            mb.setGuard(testGuard);
-            assertFalse(mb.canInvoke(objectName));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        mb.setMBeanServer(mbs);
+        mb.setGuard(testGuard);
+        assertFalse(mb.canInvoke(objectName));
     }
 
     public void testCanInvokeMBeanThrowsException() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
         try {
             MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
             EasyMock.replay(mbs);
@@ -92,7 +78,6 @@ public class JMXSecurityMBeanImplTestCase extends TestCase {
             KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
             EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName))).andThrow(new
IOException());
             EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
 
             JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
             mb.setMBeanServer(mbs);
@@ -101,51 +86,37 @@ public class JMXSecurityMBeanImplTestCase extends TestCase {
             fail("Should have thrown an exception");
         } catch (IOException ioe) {
             // good!
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
         }
     }
 
     public void testCanInvokeMBeanNoGuard() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            assertTrue(mb.canInvoke("foo.bar.testing:type=SomeMBean"));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        assertTrue(mb.canInvoke("foo.bar.testing:type=SomeMBean"));
     }
 
     public void testCanInvokeMethod() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
-            EasyMock.replay(mbs);
+        MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
+        EasyMock.replay(mbs);
 
-            String objectName = "foo.bar.testing:type=SomeMBean";
-            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
-            String[] la = new String[]{"long"};
-            String[] sa = new String[]{"java.lang.String"};
-            String[] sa2 = new String[]{"java.lang.String", "java.lang.String"};
-            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod",
la)).andReturn(true);
-            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod",
sa)).andReturn(true);
-            EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "otherMethod",
sa2)).andReturn(false);
-            EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
+        String objectName = "foo.bar.testing:type=SomeMBean";
+        KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
+        String[] la = new String[]{"long"};
+        String[] sa = new String[]{"java.lang.String"};
+        String[] sa2 = new String[]{"java.lang.String", "java.lang.String"};
+        EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod",
la)).andReturn(true);
+        EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod",
sa)).andReturn(true);
+        EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "otherMethod",
sa2)).andReturn(false);
+        EasyMock.replay(testGuard);
 
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            mb.setMBeanServer(mbs);
-            mb.setGuard(testGuard);
-            assertTrue(mb.canInvoke(objectName, "testMethod", la));
-            assertTrue(mb.canInvoke(objectName, "testMethod", sa));
-            assertFalse(mb.canInvoke(objectName, "otherMethod", sa2));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        mb.setMBeanServer(mbs);
+        mb.setGuard(testGuard);
+        assertTrue(mb.canInvoke(objectName, "testMethod", la));
+        assertTrue(mb.canInvoke(objectName, "testMethod", sa));
+        assertFalse(mb.canInvoke(objectName, "otherMethod", sa2));
     }
 
     public void testCanInvokeMethodException() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
         try {
             MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
             EasyMock.replay(mbs);
@@ -155,7 +126,6 @@ public class JMXSecurityMBeanImplTestCase extends TestCase {
             String[] ea = new String[]{};
             EasyMock.expect(testGuard.canInvoke(mbs, new ObjectName(objectName), "testMethod",
ea)).andThrow(new IOException());
             EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
 
             JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
             mb.setMBeanServer(mbs);
@@ -164,74 +134,61 @@ public class JMXSecurityMBeanImplTestCase extends TestCase {
             fail("Should have thrown an exception");
         } catch (IOException ioe) {
             // good
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
         }
     }
 
     public void testCanInvokeMethodNoGuard() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            assertTrue(mb.canInvoke("foo.bar.testing:type=SomeMBean", "someMethod", new String[]{}));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        assertTrue(mb.canInvoke("foo.bar.testing:type=SomeMBean", "someMethod", new String[]{}));
     }
 
     public void testCanInvokeBulk() throws Exception {
-        InvocationHandler prevGuard = KarafMBeanServerBuilder.getGuard();
-        try {
-            MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
-            EasyMock.replay(mbs);
+        MBeanServer mbs = EasyMock.createMock(MBeanServer.class);
+        EasyMock.replay(mbs);
 
-            KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
-            String objectName = "foo.bar.testing:type=SomeMBean";
-            final String[] la = new String[]{"long"};
-            final String[] sa = new String[]{"java.lang.String"};
-            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("testMethod"), EasyMock.aryEq(la))).andReturn(true).anyTimes();
-            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("testMethod"), EasyMock.aryEq(sa))).andReturn(false).anyTimes();
-            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("otherMethod"))).andReturn(true).anyTimes();
-            String objectName2 = "foo.bar.testing:type=SomeOtherMBean";
-            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName2)))).andReturn(true).anyTimes();
-            String objectName3 = "foo.bar.foo.testing:type=SomeOtherMBean";
-            EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName3)))).andReturn(false).anyTimes();
-            EasyMock.replay(testGuard);
-            KarafMBeanServerBuilder.setGuard(testGuard);
+        KarafMBeanServerGuard testGuard = EasyMock.createMock(KarafMBeanServerGuard.class);
+        String objectName = "foo.bar.testing:type=SomeMBean";
+        final String[] la = new String[]{"long"};
+        final String[] sa = new String[]{"java.lang.String"};
+        EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("testMethod"), EasyMock.aryEq(la))).andReturn(true).anyTimes();
+        EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("testMethod"), EasyMock.aryEq(sa))).andReturn(false).anyTimes();
+        EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName)),
EasyMock.eq("otherMethod"))).andReturn(true).anyTimes();
+        String objectName2 = "foo.bar.testing:type=SomeOtherMBean";
+        EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName2)))).andReturn(true).anyTimes();
+        String objectName3 = "foo.bar.foo.testing:type=SomeOtherMBean";
+        EasyMock.expect(testGuard.canInvoke(EasyMock.eq(mbs), EasyMock.eq(new ObjectName(objectName3)))).andReturn(false).anyTimes();
+        EasyMock.replay(testGuard);
 
-            JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
-            mb.setMBeanServer(mbs);
-            mb.setGuard(testGuard);
-            Map<String, List<String>> query = new HashMap<String, List<String>>();
-            query.put(objectName, Arrays.asList("otherMethod", "testMethod(long)", "testMethod(java.lang.String)"));
-            query.put(objectName2, Collections.<String>emptyList());
-            query.put(objectName3, Collections.<String>emptyList());
-            TabularData result = mb.canInvoke(query);
-            assertEquals(5, result.size());
-
-            CompositeData cd = result.get(new Object[]{objectName, "testMethod(long)"});
-            assertEquals(objectName, cd.get("ObjectName"));
-            assertEquals("testMethod(long)", cd.get("Method"));
-            assertEquals(true, cd.get("CanInvoke"));
-            CompositeData cd2 = result.get(new Object[]{objectName, "testMethod(java.lang.String)"});
-            assertEquals(objectName, cd2.get("ObjectName"));
-            assertEquals("testMethod(java.lang.String)", cd2.get("Method"));
-            assertEquals(false, cd2.get("CanInvoke"));
-            CompositeData cd3 = result.get(new Object[]{objectName, "otherMethod"});
-            assertEquals(objectName, cd3.get("ObjectName"));
-            assertEquals("otherMethod", cd3.get("Method"));
-            assertEquals(true, cd3.get("CanInvoke"));
-            CompositeData cd4 = result.get(new Object[]{objectName2, ""});
-            assertEquals(objectName2, cd4.get("ObjectName"));
-            assertEquals("", cd4.get("Method"));
-            assertEquals(true, cd4.get("CanInvoke"));
-            CompositeData cd5 = result.get(new Object[]{objectName3, ""});
-            assertEquals(objectName3, cd5.get("ObjectName"));
-            assertEquals("", cd5.get("Method"));
-            assertEquals(false, cd5.get("CanInvoke"));
-        } finally {
-            KarafMBeanServerBuilder.setGuard(prevGuard);
-        }
+        JMXSecurityMBeanImpl mb = new JMXSecurityMBeanImpl();
+        mb.setMBeanServer(mbs);
+        mb.setGuard(testGuard);
+        Map<String, List<String>> query = new HashMap<String, List<String>>();
+        query.put(objectName, Arrays.asList("otherMethod", "testMethod(long)", "testMethod(java.lang.String)"));
+        query.put(objectName2, Collections.<String>emptyList());
+        query.put(objectName3, Collections.<String>emptyList());
+        TabularData result = mb.canInvoke(query);
+        assertEquals(5, result.size());
+
+        CompositeData cd = result.get(new Object[]{objectName, "testMethod(long)"});
+        assertEquals(objectName, cd.get("ObjectName"));
+        assertEquals("testMethod(long)", cd.get("Method"));
+        assertEquals(true, cd.get("CanInvoke"));
+        CompositeData cd2 = result.get(new Object[]{objectName, "testMethod(java.lang.String)"});
+        assertEquals(objectName, cd2.get("ObjectName"));
+        assertEquals("testMethod(java.lang.String)", cd2.get("Method"));
+        assertEquals(false, cd2.get("CanInvoke"));
+        CompositeData cd3 = result.get(new Object[]{objectName, "otherMethod"});
+        assertEquals(objectName, cd3.get("ObjectName"));
+        assertEquals("otherMethod", cd3.get("Method"));
+        assertEquals(true, cd3.get("CanInvoke"));
+        CompositeData cd4 = result.get(new Object[]{objectName2, ""});
+        assertEquals(objectName2, cd4.get("ObjectName"));
+        assertEquals("", cd4.get("Method"));
+        assertEquals(true, cd4.get("CanInvoke"));
+        CompositeData cd5 = result.get(new Object[]{objectName3, ""});
+        assertEquals(objectName3, cd5.get("ObjectName"));
+        assertEquals("", cd5.get("Method"));
+        assertEquals(false, cd5.get("CanInvoke"));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0bf891e..7a5a108 100644
--- a/pom.xml
+++ b/pom.xml
@@ -533,11 +533,6 @@
 
             <dependency>
                 <groupId>org.apache.karaf.management</groupId>
-                <artifactId>org.apache.karaf.management.boot</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.karaf.management</groupId>
                 <artifactId>org.apache.karaf.management.server</artifactId>
                 <version>${project.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows/karaf-wrapper.conf
----------------------------------------------------------------------
diff --git a/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows/karaf-wrapper.conf
b/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows/karaf-wrapper.conf
index def40f7..72dca3c 100644
--- a/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows/karaf-wrapper.conf
+++ b/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows/karaf-wrapper.conf
@@ -30,7 +30,6 @@ wrapper.java.command=%JAVA_HOME%/bin/java
 wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
 wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
 wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
-wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jmx-boot.jar
 wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-jaas-boot.jar
 wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-wrapper-main.jar
 wrapper.java.classpath.6=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
@@ -46,11 +45,10 @@ wrapper.java.additional.2=-Dkaraf.base="%KARAF_BASE%"
 wrapper.java.additional.3=-Dkaraf.data="%KARAF_DATA%"
 wrapper.java.additional.4=-Dkaraf.etc="%KARAF_ETC%"
 wrapper.java.additional.5=-Dcom.sun.management.jmxremote
-wrapper.java.additional.6=-Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder
-wrapper.java.additional.7=-Dkaraf.startLocalConsole=false
-wrapper.java.additional.8=-Dkaraf.startRemoteShell=true
-wrapper.java.additional.9=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
-wrapper.java.additional.10=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
+wrapper.java.additional.6=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.7=-Dkaraf.startRemoteShell=true
+wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
+wrapper.java.additional.9=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
 
 # Uncomment to enable jmx
 #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616

http://git-wip-us.apache.org/repos/asf/karaf/blob/820df78c/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows64/karaf-wrapper.conf
----------------------------------------------------------------------
diff --git a/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows64/karaf-wrapper.conf
b/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows64/karaf-wrapper.conf
index def40f7..72dca3c 100644
--- a/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows64/karaf-wrapper.conf
+++ b/wrapper/core/src/main/resources/org/apache/karaf/wrapper/internal/windows64/karaf-wrapper.conf
@@ -30,7 +30,6 @@ wrapper.java.command=%JAVA_HOME%/bin/java
 wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
 wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
 wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
-wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jmx-boot.jar
 wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-jaas-boot.jar
 wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-wrapper-main.jar
 wrapper.java.classpath.6=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
@@ -46,11 +45,10 @@ wrapper.java.additional.2=-Dkaraf.base="%KARAF_BASE%"
 wrapper.java.additional.3=-Dkaraf.data="%KARAF_DATA%"
 wrapper.java.additional.4=-Dkaraf.etc="%KARAF_ETC%"
 wrapper.java.additional.5=-Dcom.sun.management.jmxremote
-wrapper.java.additional.6=-Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder
-wrapper.java.additional.7=-Dkaraf.startLocalConsole=false
-wrapper.java.additional.8=-Dkaraf.startRemoteShell=true
-wrapper.java.additional.9=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
-wrapper.java.additional.10=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
+wrapper.java.additional.6=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.7=-Dkaraf.startRemoteShell=true
+wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
+wrapper.java.additional.9=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"
 
 # Uncomment to enable jmx
 #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616


Mime
View raw message