[jboss-cvs] Picketbox SVN: r45 - in trunk/security-jboss-sx/jbosssx/src: test/java/org/jboss/test/authentication/jaas and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 24 22:24:29 EST 2010


Author: anil.saldhana at jboss.com
Date: 2010-02-24 22:24:29 -0500 (Wed, 24 Feb 2010)
New Revision: 45

Modified:
   trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/util/MBeanServerLocator.java
   trunk/security-jboss-sx/jbosssx/src/test/java/org/jboss/test/authentication/jaas/LdapLoginModuleDecodeActionUnitTestCase.java
Log:
set jboss mbeanserver

Modified: trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/util/MBeanServerLocator.java
===================================================================
--- trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/util/MBeanServerLocator.java	2010-02-23 02:01:59 UTC (rev 44)
+++ trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/util/MBeanServerLocator.java	2010-02-25 03:24:29 UTC (rev 45)
@@ -116,7 +116,7 @@
          MBeanServer server = (MBeanServer) i.next();
          String domain = server.getDefaultDomain();
          if (domain != null && (domain.equals("jboss") || domain.equals("DefaultDomain")))
-         {
+         { 
             return server;
          }
       }

Modified: trunk/security-jboss-sx/jbosssx/src/test/java/org/jboss/test/authentication/jaas/LdapLoginModuleDecodeActionUnitTestCase.java
===================================================================
--- trunk/security-jboss-sx/jbosssx/src/test/java/org/jboss/test/authentication/jaas/LdapLoginModuleDecodeActionUnitTestCase.java	2010-02-23 02:01:59 UTC (rev 44)
+++ trunk/security-jboss-sx/jbosssx/src/test/java/org/jboss/test/authentication/jaas/LdapLoginModuleDecodeActionUnitTestCase.java	2010-02-25 03:24:29 UTC (rev 45)
@@ -34,6 +34,7 @@
 
 import org.jboss.security.auth.callback.AppCallbackHandler;
 import org.jboss.security.auth.spi.LdapLoginModule;
+import org.jboss.security.util.MBeanServerLocator;
 import org.jboss.test.security.ldap.OpenDSUnitTestCase;
 
 /**
@@ -50,6 +51,7 @@
    }
 
 
+   @SuppressWarnings("deprecation")
    @Override
    protected void setUp() throws Exception
    {
@@ -95,11 +97,11 @@
       
       //Setup MBeanServer
       MBeanServer jbossMBeanServer = MBeanServerFactory.createMBeanServer("jboss");
+      MBeanServerLocator.setJBoss(jbossMBeanServer); 
       try
       {
          Test test = new Test();
-         jbossMBeanServer.registerMBean(test, new ObjectName(oname));
-         //jbossMBeanServer.createMBean(Test.class.getName(), new ObjectName(oname), getClass().getClassLoader()); 
+         jbossMBeanServer.registerMBean(test, new ObjectName(oname)); 
       }
       catch(Exception e)
       {




More information about the jboss-cvs-commits mailing list