activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [02/27] activemq-6 git commit: ACTIVEMQ6-67 - cleaned up configuration
Date Thu, 15 Jan 2015 17:19:04 GMT
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java
index 01815e7..3d303b7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerStartStopTest.java
@@ -28,11 +28,13 @@ import java.util.Set;
 import org.apache.activemq.api.core.TransportConfiguration;
 import org.apache.activemq.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.api.jms.JMSFactoryType;
+import org.apache.activemq.core.config.FileDeploymentManager;
 import org.apache.activemq.core.config.impl.FileConfiguration;
 import org.apache.activemq.core.server.ActiveMQServer;
 import org.apache.activemq.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.jms.server.JMSServerManager;
+import org.apache.activemq.jms.server.config.impl.FileJMSConfiguration;
 import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
 import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
 import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
@@ -196,9 +198,12 @@ public class JMSServerStartStopTest extends UnitTestCase
 
    private void start() throws Exception
    {
-      FileConfiguration fc = new FileConfiguration("server-start-stop-config1.xml");
-
-      fc.start();
+      FileConfiguration fc = new FileConfiguration();
+      FileJMSConfiguration fileConfiguration = new FileJMSConfiguration();
+      FileDeploymentManager deploymentManager = new FileDeploymentManager("server-start-stop-config1.xml");
+      deploymentManager.addDeployable(fc);
+      deploymentManager.addDeployable(fileConfiguration);
+      deploymentManager.readConfiguration();
 
       fc.setJournalDirectory(getJournalDir());
       fc.setBindingsDirectory(getBindingsDir());
@@ -208,7 +213,7 @@ public class JMSServerStartStopTest extends UnitTestCase
 
       ActiveMQServer liveServer = addServer(new ActiveMQServerImpl(fc, sm));
 
-      liveJMSServer = new JMSServerManagerImpl(liveServer, "server-start-stop-jms-config1.xml");
+      liveJMSServer = new JMSServerManagerImpl(liveServer, fileConfiguration);
       addActiveMQComponent(liveJMSServer);
       liveJMSServer.setRegistry(null);
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
index 0957a31..81ac3cf 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
@@ -16,18 +16,14 @@
  */
 package org.apache.activemq.tests.integration.jms.server.config;
 
+import org.apache.activemq.core.config.FileDeploymentManager;
+import org.apache.activemq.jms.server.config.impl.FileJMSConfiguration;
 import org.junit.Test;
 
-import java.io.InputStream;
-import java.net.URL;
-
 import org.apache.activemq.api.core.TransportConfiguration;
 import org.apache.activemq.core.config.Configuration;
-import org.apache.activemq.jms.server.JMSServerConfigParser;
-import org.apache.activemq.jms.server.config.JMSConfiguration;
 import org.apache.activemq.jms.server.config.JMSQueueConfiguration;
 import org.apache.activemq.jms.server.config.TopicConfiguration;
-import org.apache.activemq.jms.server.impl.JMSServerConfigParserImpl;
 import org.apache.activemq.tests.util.ServiceTestBase;
 
 /**
@@ -58,15 +54,12 @@ public class JMSServerConfigParserTest extends ServiceTestBase
          // anything so the parsing will work
          .addConnectorConfiguration("netty", new TransportConfiguration());
 
-      JMSServerConfigParser parser = new JMSServerConfigParserImpl();
-
       String conf = "activemq-jms-for-JMSServerDeployerTest.xml";
-      URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf);
-
-      InputStream stream = confURL.openStream();
 
-      JMSConfiguration jmsconfig = parser.parseConfiguration(stream);
-      stream.close();
+      FileJMSConfiguration jmsconfig = new FileJMSConfiguration();
+      FileDeploymentManager deploymentManager = new FileDeploymentManager(conf);
+      deploymentManager.addDeployable(jmsconfig);
+      deploymentManager.readConfiguration();
 
       assertEquals(1, jmsconfig.getQueueConfigurations().size());
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
index 4f94ee4..52711fc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
@@ -1322,8 +1322,7 @@ public class JMSQueueControlTest extends ManagementTestBase
       super.setUp();
 
       Configuration conf = createBasicConfig()
-         .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY))
-         .setFileDeploymentEnabled(false);
+         .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY));
       server = createServer(this.getName().contains("WithRealData"), conf, mbeanServer);
 
       serverManager = new JMSServerManagerImpl(server);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
index 411ad86..09978fe 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
@@ -98,12 +98,12 @@ public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManag
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
       ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl)server.getSecurityManager();
-      securityManager.addUser(validAdminUser, validAdminPassword);
-      securityManager.addUser(invalidAdminUser, invalidAdminPassword);
+      securityManager.getConfiguration().addUser(validAdminUser, validAdminPassword);
+      securityManager.getConfiguration().addUser(invalidAdminUser, invalidAdminPassword);
 
-      securityManager.addRole(validAdminUser, "admin");
-      securityManager.addRole(validAdminUser, "guest");
-      securityManager.addRole(invalidAdminUser, "guest");
+      securityManager.getConfiguration().addRole(validAdminUser, "admin");
+      securityManager.getConfiguration().addRole(validAdminUser, "guest");
+      securityManager.getConfiguration().addRole(invalidAdminUser, "guest");
 
       Set<Role> adminRole = securityRepository.getMatch(ActiveMQDefaultConfiguration.getDefaultManagementAddress().toString());
       adminRole.add(new Role("admin", true, true, true, true, true, true, true));

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java
index ba8509b..27acad0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/SecurityNotificationTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.tests.integration.management;
 import org.apache.activemq.api.core.ActiveMQException;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.junit.Before;
 import org.junit.After;
 
@@ -45,7 +46,6 @@ import org.apache.activemq.core.security.CheckType;
 import org.apache.activemq.core.security.Role;
 import org.apache.activemq.core.server.ActiveMQServer;
 import org.apache.activemq.core.server.ActiveMQServers;
-import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
 import org.apache.activemq.tests.util.RandomUtil;
 import org.apache.activemq.tests.util.UnitTestCase;
 
@@ -112,8 +112,8 @@ public class SecurityNotificationTest extends UnitTestCase
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       server.getSecurityRepository().addMatch(address.toString(), roles);
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addRole("guest", "roleCanNotCreateQueue");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addRole("guest", "roleCanNotCreateQueue");
 
       SecurityNotificationTest.flush(notifConsumer);
 
@@ -162,10 +162,10 @@ public class SecurityNotificationTest extends UnitTestCase
 
       notifQueue = RandomUtil.randomSimpleString();
 
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("admin", "admin");
-      securityManager.addUser("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("admin", "admin");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
 
       Role role = new Role("notif", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
@@ -173,7 +173,7 @@ public class SecurityNotificationTest extends UnitTestCase
       server.getSecurityRepository().addMatch(ActiveMQDefaultConfiguration.getDefaultManagementNotificationAddress().toString(),
                                               roles);
 
-      securityManager.addRole("admin", "notif");
+      securityManager.getConfiguration().addRole("admin", "notif");
 
       ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY));
       ClientSessionFactory sf = createSessionFactory(locator);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java
index 95f29e2..6cd907f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/openwire/OpenWireTestBase.java
@@ -39,6 +39,7 @@ import org.apache.activemq.core.settings.impl.AddressSettings;
 import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration;
 import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
 import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.tests.integration.management.ManagementControlHelper;
 import org.apache.activemq.tests.unit.util.InVMNamingContext;
 import org.apache.activemq.tests.util.ServiceTestBase;
@@ -88,24 +89,25 @@ public class OpenWireTestBase extends ServiceTestBase
 
       if (enableSecurity)
       {
-         server.getSecurityManager().addRole("openwireSender", "sender");
-         server.getSecurityManager().addUser("openwireSender", "SeNdEr");
+         ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+         securityManager.getConfiguration().addRole("openwireSender", "sender");
+         securityManager.getConfiguration().addUser("openwireSender", "SeNdEr");
          //sender cannot receive
          Role senderRole = new Role("sender", true, false, false, false, true, true, false);
 
-         server.getSecurityManager().addRole("openwireReceiver", "receiver");
-         server.getSecurityManager().addUser("openwireReceiver", "ReCeIvEr");
+         securityManager.getConfiguration().addRole("openwireReceiver", "receiver");
+         securityManager.getConfiguration().addUser("openwireReceiver", "ReCeIvEr");
          //receiver cannot send
          Role receiverRole = new Role("receiver", false, true, false, false, true, true, false);
 
-         server.getSecurityManager().addRole("openwireGuest", "guest");
-         server.getSecurityManager().addUser("openwireGuest", "GuEsT");
+         securityManager.getConfiguration().addRole("openwireGuest", "guest");
+         securityManager.getConfiguration().addUser("openwireGuest", "GuEsT");
 
          //guest cannot do anything
          Role guestRole = new Role("guest", false, false, false, false, false, false, false);
 
-         server.getSecurityManager().addRole("openwireDestinationManager", "manager");
-         server.getSecurityManager().addUser("openwireDestinationManager", "DeStInAtIoN");
+         securityManager.getConfiguration().addRole("openwireDestinationManager", "manager");
+         securityManager.getConfiguration().addUser("openwireDestinationManager", "DeStInAtIoN");
 
          //guest cannot do anything
          Role destRole = new Role("manager", false, false, false, false, true, true, false);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
index a8f9236..68e93a9 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
@@ -25,6 +25,7 @@ import org.apache.activemq.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.core.security.Role;
 import org.apache.activemq.ra.ActiveMQResourceAdapter;
 import org.apache.activemq.ra.inflow.ActiveMQActivationSpec;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.junit.Test;
 
 /**
@@ -67,8 +68,9 @@ public class ActiveMQMessageHandlerSecurityTest extends ActiveMQRATestBase
    @Test
    public void testSimpleMessageReceivedOnQueueWithSecuritySucceeds() throws Exception
    {
-      server.getSecurityManager().addUser("testuser", "testpassword");
-      server.getSecurityManager().addRole("testuser", "arole");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("testuser", "testpassword");
+      securityManager.getConfiguration().addRole("testuser", "arole");
       Role role = new Role("arole", false, true, false, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java
index 785cadb..b33e43d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRAClusteredTestBase.java
@@ -85,7 +85,6 @@ public class ActiveMQRAClusteredTestBase extends ActiveMQRATestBase
       }
 
       ConfigurationImpl configuration = createBasicConfig(-1)
-         .setFileDeploymentEnabled(false)
          .setJMXManagementEnabled(false)
          .clearAcceptorConfigurations()
          .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY, invmMap))

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java
index 92c350c..86d4ed0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/JMSContextTest.java
@@ -29,6 +29,7 @@ import org.apache.activemq.ra.ActiveMQRAConnectionFactoryImpl;
 import org.apache.activemq.ra.ActiveMQRAConnectionManager;
 import org.apache.activemq.ra.ActiveMQRAManagedConnectionFactory;
 import org.apache.activemq.ra.ActiveMQResourceAdapter;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.tests.integration.jms.bridge.TransactionManagerLocatorImpl;
 import org.junit.After;
 import org.junit.Before;
@@ -51,11 +52,12 @@ public class JMSContextTest extends ActiveMQRATestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      server.getSecurityManager().addUser("testuser", "testpassword");
-      server.getSecurityManager().addUser("guest", "guest");
-      server.getSecurityManager().setDefaultUser("guest");
-      server.getSecurityManager().addRole("testuser", "arole");
-      server.getSecurityManager().addRole("guest", "arole");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("testuser", "testpassword");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
+      securityManager.getConfiguration().addRole("testuser", "arole");
+      securityManager.getConfiguration().addRole("guest", "arole");
       Role role = new Role("arole", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java
index be4746b..8fb25bd 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTest.java
@@ -55,6 +55,7 @@ import org.apache.activemq.ra.ActiveMQRASession;
 import org.apache.activemq.ra.ActiveMQResourceAdapter;
 import org.apache.activemq.service.extensions.xa.ActiveMQXAResourceWrapper;
 import org.apache.activemq.service.extensions.xa.ActiveMQXAResourceWrapperImpl;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.utils.UUIDGenerator;
 import org.apache.activemq.utils.VersionLoader;
 import org.junit.After;
@@ -85,11 +86,12 @@ public class OutgoingConnectionTest extends ActiveMQRATestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      server.getSecurityManager().addUser("testuser", "testpassword");
-      server.getSecurityManager().addUser("guest", "guest");
-      server.getSecurityManager().setDefaultUser("guest");
-      server.getSecurityManager().addRole("testuser", "arole");
-      server.getSecurityManager().addRole("guest", "arole");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("testuser", "testpassword");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
+      securityManager.getConfiguration().addRole("testuser", "arole");
+      securityManager.getConfiguration().addRole("guest", "arole");
       Role role = new Role("arole", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTestJTA.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTestJTA.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTestJTA.java
index c1f5798..2d11968 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTestJTA.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/OutgoingConnectionTestJTA.java
@@ -37,6 +37,7 @@ import org.apache.activemq.ra.ActiveMQRAConnectionFactoryImpl;
 import org.apache.activemq.ra.ActiveMQRAConnectionManager;
 import org.apache.activemq.ra.ActiveMQRAManagedConnectionFactory;
 import org.apache.activemq.ra.ActiveMQResourceAdapter;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.tests.integration.jms.bridge.TransactionManagerLocatorImpl;
 import org.junit.After;
 import org.junit.Before;
@@ -70,11 +71,11 @@ public class OutgoingConnectionTestJTA extends ActiveMQRATestBase
    public void setUp() throws Exception
    {
       super.setUp();
-      server.getSecurityManager().addUser("testuser", "testpassword");
-      server.getSecurityManager().addUser("guest", "guest");
-      server.getSecurityManager().setDefaultUser("guest");
-      server.getSecurityManager().addRole("testuser", "arole");
-      server.getSecurityManager().addRole("guest", "arole");
+      ((ActiveMQSecurityManagerImpl)server.getSecurityManager()).getConfiguration().addUser("testuser", "testpassword");
+      ((ActiveMQSecurityManagerImpl)server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
+      ((ActiveMQSecurityManagerImpl)server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
+      ((ActiveMQSecurityManagerImpl)server.getSecurityManager()).getConfiguration().addRole("testuser", "arole");
+      ((ActiveMQSecurityManagerImpl)server.getSecurityManager()).getConfiguration().addRole("guest", "arole");
       Role role = new Role("arole", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java
index edef2c8..99b12c8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/security/SecurityTest.java
@@ -46,7 +46,7 @@ import org.apache.activemq.core.security.Role;
 import org.apache.activemq.core.server.ActiveMQServer;
 import org.apache.activemq.core.server.Queue;
 import org.apache.activemq.core.settings.HierarchicalRepository;
-import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.spi.core.security.JAASSecurityManager;
 import org.apache.activemq.tests.util.CreateMessage;
 import org.apache.activemq.tests.util.ServiceTestBase;
@@ -85,9 +85,9 @@ public class SecurityTest extends ServiceTestBase
    public void testCreateSessionWithNullUserPass() throws Exception
    {
       ActiveMQServer server = createServer();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       server.start();
       ClientSessionFactory cf = createSessionFactory(locator);
 
@@ -140,8 +140,8 @@ public class SecurityTest extends ServiceTestBase
    public void testCreateSessionWithCorrectUserWrongPass() throws Exception
    {
       ActiveMQServer server = createServer();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("newuser", "apass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("newuser", "apass");
       server.start();
       ClientSessionFactory cf = createSessionFactory(locator);
 
@@ -164,8 +164,8 @@ public class SecurityTest extends ServiceTestBase
    public void testCreateSessionWithCorrectUserCorrectPass() throws Exception
    {
       ActiveMQServer server = createServer();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("newuser", "apass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("newuser", "apass");
       server.start();
       ClientSessionFactory cf = createSessionFactory(locator);
 
@@ -187,13 +187,13 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
@@ -207,13 +207,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       try
@@ -238,13 +238,13 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, true, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
@@ -258,13 +258,13 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
@@ -291,13 +291,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, true, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false);
@@ -311,13 +311,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       try
@@ -342,13 +342,13 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, true, true, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false);
@@ -362,13 +362,13 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, true, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, false);
@@ -397,9 +397,9 @@ public class SecurityTest extends ServiceTestBase
 
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
 
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
 
-      securityManager.addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("auser", "pass");
 
       Role role = new Role("arole", true, true, true, false, false, false, false);
 
@@ -409,7 +409,7 @@ public class SecurityTest extends ServiceTestBase
 
       securityRepository.addMatch(SecurityTest.addressA, roles);
 
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
 
       locator.setBlockOnNonDurableSend(true);
 
@@ -462,13 +462,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       locator.setBlockOnNonDurableSend(true);
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -496,13 +496,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(SecurityTest.addressA, SecurityTest.queueA, true);
@@ -520,18 +520,18 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
-      securityManager.addUser("guest", "guest");
-      securityManager.addRole("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       Role role = new Role("arole", false, true, false, false, false, false, false);
       Role sendRole = new Role("guest", true, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(sendRole);
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession senSession = cf.createSession(false, true, true);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -549,18 +549,18 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer();
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
-      securityManager.addUser("guest", "guest");
-      securityManager.addRole("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       Role sendRole = new Role("guest", true, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(sendRole);
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession senSession = cf.createSession(false, true, true);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -592,11 +592,11 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer(false, configuration);
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
-      securityManager.addUser("guest", "guest");
-      securityManager.addRole("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       Role sendRole = new Role("guest", true, false, true, false, false, false, false);
       Role receiveRole = new Role("receiver", false, true, false, false, false, false, false);
@@ -605,7 +605,7 @@ public class SecurityTest extends ServiceTestBase
       roles.add(role);
       roles.add(receiveRole);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession senSession = cf.createSession(false, true, true);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -625,12 +625,12 @@ public class SecurityTest extends ServiceTestBase
          fail("Invalid Exception type:" + e.getType());
       }
 
-      securityManager.addRole("auser", "receiver");
+      securityManager.getConfiguration().addRole("auser", "receiver");
 
       session.createConsumer(SecurityTest.queueA);
 
       // Removing the Role... the check should be cached, so the next createConsumer shouldn't fail
-      securityManager.removeRole("auser", "receiver");
+      securityManager.getConfiguration().removeRole("auser", "receiver");
 
       session.createConsumer(SecurityTest.queueA);
 
@@ -649,11 +649,11 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
-      securityManager.addUser("guest", "guest");
-      securityManager.addRole("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       Role sendRole = new Role("guest", true, false, true, false, false, false, false);
       Role receiveRole = new Role("receiver", false, true, false, false, false, false, false);
@@ -662,7 +662,7 @@ public class SecurityTest extends ServiceTestBase
       roles.add(role);
       roles.add(receiveRole);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession senSession = cf.createSession(false, true, true);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -682,14 +682,14 @@ public class SecurityTest extends ServiceTestBase
          fail("Invalid Exception type:" + e.getType());
       }
 
-      securityManager.addRole("auser", "receiver");
+      securityManager.getConfiguration().addRole("auser", "receiver");
 
       session.createConsumer(SecurityTest.queueA);
 
       // Removing the Role... the check should be cached... but we used
       // setSecurityInvalidationInterval(0), so the
       // next createConsumer should fail
-      securityManager.removeRole("auser", "receiver");
+      securityManager.getConfiguration().removeRole("auser", "receiver");
 
       try
       {
@@ -718,11 +718,11 @@ public class SecurityTest extends ServiceTestBase
       ActiveMQServer server = createServer(false, configuration);
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
-      securityManager.addUser("guest", "guest");
-      securityManager.addRole("guest", "guest");
-      securityManager.setDefaultUser("guest");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
       Role role = new Role("arole", false, false, false, false, false, false, false);
       System.out.println("guest:" + role);
       Role sendRole = new Role("guest", true, false, true, false, false, false, false);
@@ -734,7 +734,7 @@ public class SecurityTest extends ServiceTestBase
       roles.add(role);
       roles.add(receiveRole);
       securityRepository.addMatch(SecurityTest.addressA, roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
 
       ClientSession senSession = cf.createSession(false, true, true);
@@ -755,14 +755,14 @@ public class SecurityTest extends ServiceTestBase
          fail("Invalid Exception type:" + e.getType());
       }
 
-      securityManager.addRole("auser", "receiver");
+      securityManager.getConfiguration().addRole("auser", "receiver");
 
       session.createConsumer(SecurityTest.queueA);
 
       // Removing the Role... the check should be cached... but we used
       // setSecurityInvalidationInterval(0), so the
       // next createConsumer should fail
-      securityManager.removeRole("auser", "guest");
+      securityManager.getConfiguration().removeRole("auser", "guest");
 
       ClientSession sendingSession = cf.createSession("auser", "pass", false, false, false, false, 0);
       ClientProducer prod = sendingSession.createProducer(SecurityTest.addressA);
@@ -818,13 +818,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, false, false, false, false, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(configuration.getManagementAddress().toString(), roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       locator.setBlockOnNonDurableSend(true);
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
@@ -840,13 +840,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(configuration.getManagementAddress().toString(), roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(configuration.getManagementAddress().toString(), SecurityTest.queueA, true);
@@ -875,13 +875,13 @@ public class SecurityTest extends ServiceTestBase
 
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("auser", "pass");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("auser", "pass");
       Role role = new Role("arole", false, false, true, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       securityRepository.addMatch(configuration.getManagementAddress().toString(), roles);
-      securityManager.addRole("auser", "arole");
+      securityManager.getConfiguration().addRole("auser", "arole");
       ClientSessionFactory cf = createSessionFactory(locator);
       ClientSession session = cf.createSession("auser", "pass", false, true, true, false, -1);
       session.createQueue(configuration.getManagementAddress().toString(), SecurityTest.queueA, true);
@@ -978,21 +978,21 @@ public class SecurityTest extends ServiceTestBase
    {
       ActiveMQServer server = createServer();
       server.start();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("all", "all");
-      securityManager.addUser("bill", "activemq");
-      securityManager.addUser("andrew", "activemq1");
-      securityManager.addUser("frank", "activemq2");
-      securityManager.addUser("sam", "activemq3");
-      securityManager.addRole("all", "all");
-      securityManager.addRole("bill", "user");
-      securityManager.addRole("andrew", "europe-user");
-      securityManager.addRole("andrew", "user");
-      securityManager.addRole("frank", "us-user");
-      securityManager.addRole("frank", "news-user");
-      securityManager.addRole("frank", "user");
-      securityManager.addRole("sam", "news-user");
-      securityManager.addRole("sam", "user");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("all", "all");
+      securityManager.getConfiguration().addUser("bill", "activemq");
+      securityManager.getConfiguration().addUser("andrew", "activemq1");
+      securityManager.getConfiguration().addUser("frank", "activemq2");
+      securityManager.getConfiguration().addUser("sam", "activemq3");
+      securityManager.getConfiguration().addRole("all", "all");
+      securityManager.getConfiguration().addRole("bill", "user");
+      securityManager.getConfiguration().addRole("andrew", "europe-user");
+      securityManager.getConfiguration().addRole("andrew", "user");
+      securityManager.getConfiguration().addRole("frank", "us-user");
+      securityManager.getConfiguration().addRole("frank", "news-user");
+      securityManager.getConfiguration().addRole("frank", "user");
+      securityManager.getConfiguration().addRole("sam", "news-user");
+      securityManager.getConfiguration().addRole("sam", "user");
       Role all = new Role("all", true, true, true, true, true, true, true);
       HierarchicalRepository<Set<Role>> repository = server.getSecurityRepository();
       Set<Role> add = new HashSet<Role>();
@@ -1117,21 +1117,21 @@ public class SecurityTest extends ServiceTestBase
    {
       ActiveMQServer server = createServer();
       server.start();
-      ActiveMQSecurityManager securityManager = server.getSecurityManager();
-      securityManager.addUser("all", "all");
-      securityManager.addUser("bill", "activemq");
-      securityManager.addUser("andrew", "activemq1");
-      securityManager.addUser("frank", "activemq2");
-      securityManager.addUser("sam", "activemq3");
-      securityManager.addRole("all", "all");
-      securityManager.addRole("bill", "user");
-      securityManager.addRole("andrew", "europe-user");
-      securityManager.addRole("andrew", "user");
-      securityManager.addRole("frank", "us-user");
-      securityManager.addRole("frank", "news-user");
-      securityManager.addRole("frank", "user");
-      securityManager.addRole("sam", "news-user");
-      securityManager.addRole("sam", "user");
+      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      securityManager.getConfiguration().addUser("all", "all");
+      securityManager.getConfiguration().addUser("bill", "activemq");
+      securityManager.getConfiguration().addUser("andrew", "activemq1");
+      securityManager.getConfiguration().addUser("frank", "activemq2");
+      securityManager.getConfiguration().addUser("sam", "activemq3");
+      securityManager.getConfiguration().addRole("all", "all");
+      securityManager.getConfiguration().addRole("bill", "user");
+      securityManager.getConfiguration().addRole("andrew", "europe-user");
+      securityManager.getConfiguration().addRole("andrew", "user");
+      securityManager.getConfiguration().addRole("frank", "us-user");
+      securityManager.getConfiguration().addRole("frank", "news-user");
+      securityManager.getConfiguration().addRole("frank", "user");
+      securityManager.getConfiguration().addRole("sam", "news-user");
+      securityManager.getConfiguration().addRole("sam", "user");
       Role all = new Role("all", true, true, true, true, true, true, true);
       HierarchicalRepository<Set<Role>> repository = server.getSecurityRepository();
       Set<Role> add = new HashSet<Role>();

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
index 99c5665..cff7331 100644
--- a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
+++ b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
@@ -16,10 +16,11 @@
 -->
 <configuration xmlns="urn:activemq"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq ../../src/schemas/activemq-jms.xsd ">
+            xsi:schemaLocation="urn:activemq ../../src/schemas/activemq-server.xsd ">
+   <jms xmlns="urn:activemq:jms">
+      <queue name="fullConfigurationQueue"/>
 
-   <queue name="fullConfigurationQueue"/>
-
-   <topic name="fullConfigurationTopic"/>
+      <topic name="fullConfigurationTopic"/>
+   </jms>
 
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
deleted file mode 100644
index 99c5665..0000000
--- a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq ../../src/schemas/activemq-jms.xsd ">
-
-   <queue name="fullConfigurationQueue"/>
-
-   <topic name="fullConfigurationTopic"/>
-
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/server-start-stop-config1.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/server-start-stop-config1.xml b/tests/integration-tests/src/test/resources/server-start-stop-config1.xml
index 028c86c..3a48c1e 100644
--- a/tests/integration-tests/src/test/resources/server-start-stop-config1.xml
+++ b/tests/integration-tests/src/test/resources/server-start-stop-config1.xml
@@ -16,34 +16,39 @@
 -->
 <configuration xmlns="urn:activemq"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
-
-   <connectors>
-      <connector name="netty-connector">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
-      </connector>
-   </connectors>
-   
-   <journal-directory>/tmp/activemq-unit-test/start-stop-data</journal-directory>
-   
-   <acceptors>
-      <acceptor name="netty-acceptor">
-         <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
-      </acceptor>
-   </acceptors>
-
-   <security-enabled>false</security-enabled>
-   
-   <queues>
-	   <queue name="myQueue">
-	   	<address>myAddress</address>
-	   </queue>
-	   
-	   <!--  temporary fix until I investigate the cause of a failure
-	   <queue name="jms.queue.myJMSQueue">
-	   	<address>jms.queue.myJMSAddress</address>
-	   </queue>
-	    -->
-   </queues>
+            xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
+   <jms xmlns="urn:activemq:jms">
+      <queue name="myJMSQueue"/>
+   </jms>
+   <core xmlns="urn:activemq:core">
+
+      <connectors>
+         <connector name="netty-connector">
+            <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+         </connector>
+      </connectors>
+
+      <journal-directory>/tmp/activemq-unit-test/start-stop-data</journal-directory>
+
+      <acceptors>
+         <acceptor name="netty-acceptor">
+            <factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+         </acceptor>
+      </acceptors>
+
+      <security-enabled>false</security-enabled>
+
+      <queues>
+         <queue name="myQueue">
+            <address>myAddress</address>
+         </queue>
+
+         <!--  temporary fix until I investigate the cause of a failure
+         <queue name="jms.queue.myJMSQueue">
+            <address>jms.queue.myJMSAddress</address>
+         </queue>
+          -->
+      </queues>
+   </core>
 
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml b/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
deleted file mode 100644
index 7c84896..0000000
--- a/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-   
-   <queue name="myJMSQueue"/>
-
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/spring-activemq-config.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/spring-activemq-config.xml b/tests/integration-tests/src/test/resources/spring-activemq-config.xml
index 11f87d2..f4cd771 100644
--- a/tests/integration-tests/src/test/resources/spring-activemq-config.xml
+++ b/tests/integration-tests/src/test/resources/spring-activemq-config.xml
@@ -18,33 +18,40 @@
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
 
-    <persistence-enabled>false</persistence-enabled>
-    <security-enabled>false</security-enabled>
-    <!-- Connectors -->
-
-    <connectors>
-        <connector name="in-vm">
-            <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
-        </connector>
-    </connectors>
-
-    <acceptors>
-        <acceptor name="in-vm">
-            <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
-        </acceptor>
-    </acceptors>
-
-    <!-- Other config -->
-     <!--
-    <security-settings>
-        <security-setting match="#">
-            <permission type="createDurableQueue" roles="guest"/>
-            <permission type="deleteDurableQueue" roles="guest"/>
-            <permission type="createNonDurableQueue" roles="guest"/>
-            <permission type="deleteNonDurableQueue" roles="guest"/>
-            <permission type="consume" roles="guest"/>
-            <permission type="send" roles="guest"/>
-        </security-setting>
-    </security-settings>  -->
+   <jms xmlns="urn:activemq:jms">
+      <!--the queue used by the example-->
+         <queue name="exampleQueue"/>
+   </jms>
+   <core xmlns="urn:activemq:core">
+
+       <persistence-enabled>false</persistence-enabled>
+       <security-enabled>false</security-enabled>
+       <!-- Connectors -->
+
+       <connectors>
+           <connector name="in-vm">
+               <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+           </connector>
+       </connectors>
+
+       <acceptors>
+           <acceptor name="in-vm">
+               <factory-class>org.apache.activemq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+           </acceptor>
+       </acceptors>
+
+       <!-- Other config -->
+        <!--
+       <security-settings>
+           <security-setting match="#">
+               <permission type="createDurableQueue" roles="guest"/>
+               <permission type="deleteDurableQueue" roles="guest"/>
+               <permission type="createNonDurableQueue" roles="guest"/>
+               <permission type="deleteNonDurableQueue" roles="guest"/>
+               <permission type="consume" roles="guest"/>
+               <permission type="send" roles="guest"/>
+           </security-setting>
+       </security-settings>  -->
+   </core>
 
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/spring-activemq-jms.xml b/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
deleted file mode 100644
index b6016bf..0000000
--- a/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq"
-               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-    <!--the queue used by the example-->
-    <queue name="exampleQueue"/>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/integration-tests/src/test/resources/spring-jms-beans.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/spring-jms-beans.xml b/tests/integration-tests/src/test/resources/spring-jms-beans.xml
index e538a8c..f92a69f 100644
--- a/tests/integration-tests/src/test/resources/spring-jms-beans.xml
+++ b/tests/integration-tests/src/test/resources/spring-jms-beans.xml
@@ -22,7 +22,6 @@
 
    <bean id="EmbeddedJms" class="org.apache.activemq.integration.spring.SpringJmsBootstrap" init-method="start">
        <property name="configResourcePath" value="spring-activemq-config.xml"/>
-       <property name="jmsConfigResourcePath" value="spring-activemq-jms.xml"/>
    </bean>
 
    <bean id="connectionFactory" class="org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory">

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
index 21bd249..a03d457 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
@@ -36,6 +36,7 @@ import org.apache.activemq.api.core.management.ResourceNames;
 import org.apache.activemq.api.jms.JMSFactoryType;
 import org.apache.activemq.api.jms.management.JMSQueueControl;
 import org.apache.activemq.api.jms.management.TopicControl;
+import org.apache.activemq.core.config.FileDeploymentManager;
 import org.apache.activemq.core.config.impl.FileConfiguration;
 import org.apache.activemq.core.registry.JndiBindingRegistry;
 import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
@@ -117,12 +118,16 @@ public class LocalTestServer implements Server, Runnable
       javax.management.MBeanServer beanServer = java.lang.management.ManagementFactory.getPlatformMBeanServer();
       FileConfiguration fileConfiguration = new FileConfiguration();
       ActiveMQSecurityManagerImpl securityManager = new ActiveMQSecurityManagerImpl();
+      securityManager.getConfiguration().addUser("guest", "guest");
+      securityManager.getConfiguration().setDefaultUser("guest");
+      securityManager.getConfiguration().addRole("guest", "guest");
       ActiveMQServerImpl activeMQServer = new ActiveMQServerImpl(fileConfiguration, beanServer, securityManager);
       jmsServerManager = new JMSServerManagerImpl(activeMQServer);
       System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID());
       jmsServerManager.setRegistry(new JndiBindingRegistry(getInitialContext()));
 
-      fileConfiguration.start();
+      FileDeploymentManager deploymentManager = new FileDeploymentManager();
+      deploymentManager.addDeployable(fileConfiguration).readConfiguration();
       jmsServerManager.start();
       started = true;
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/jms-tests/src/test/resources/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/activemq-configuration.xml b/tests/jms-tests/src/test/resources/activemq-configuration.xml
index 6a15332..3cf56e4 100644
--- a/tests/jms-tests/src/test/resources/activemq-configuration.xml
+++ b/tests/jms-tests/src/test/resources/activemq-configuration.xml
@@ -16,7 +16,11 @@
 -->
 <configuration xmlns="urn:activemq"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq ../../../src/schema/activemq-configuration.xsd">
+            xsi:schemaLocation="urn:activemq ../../../src/schema/activemq-server.xsd">
+   <jms xmlns="urn:activemq:jms">
+
+   </jms>
+   <core xmlns="urn:activemq:core">
 
       <!-- Connectors -->
       <connectors>
@@ -51,4 +55,16 @@
      <bindings-directory>target/data/binding</bindings-directory>
      <journal-directory>target/data/journal</journal-directory>
      <large-messages-directory>target/data/largemessages</large-messages-directory>
+
+     <security-settings>
+         <security-setting match="#">
+            <permission type="createDurableQueue" roles="guest,def"/>
+            <permission type="deleteDurableQueue" roles="guest,def"/>
+            <permission type="createNonDurableQueue" roles="guest,def"/>
+            <permission type="deleteNonDurableQueue" roles="guest,def"/>
+            <permission type="consume" roles="guest,def"/>
+            <permission type="send" roles="guest,def"/>
+         </security-setting>
+     </security-settings>
+   </core>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/jms-tests/src/test/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/activemq-jms.xml b/tests/jms-tests/src/test/resources/activemq-jms.xml
deleted file mode 100644
index 3b7ef17..0000000
--- a/tests/jms-tests/src/test/resources/activemq-jms.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
-</configuration>
-

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/jms-tests/src/test/resources/activemq-queues.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/activemq-queues.xml b/tests/jms-tests/src/test/resources/activemq-queues.xml
deleted file mode 100644
index c5539f3..0000000
--- a/tests/jms-tests/src/test/resources/activemq-queues.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-            xsi:schemaLocation="urn:activemq ../../../src/schemas/activemq-configuration.xsd ">
-
-   <security-settings>
-      <security-setting match="#">
-         <permission type="createDurableQueue" roles="guest,def"/>
-         <permission type="deleteDurableQueue" roles="guest,def"/>
-         <permission type="createNonDurableQueue" roles="guest,def"/>
-         <permission type="deleteNonDurableQueue" roles="guest,def"/>
-         <permission type="consume" roles="guest,def"/>
-         <permission type="send" roles="guest,def"/>
-      </security-setting>
-   </security-settings>
-   
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/jms-tests/src/test/resources/activemq-users.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/activemq-users.xml b/tests/jms-tests/src/test/resources/activemq-users.xml
deleted file mode 100644
index 05049f7..0000000
--- a/tests/jms-tests/src/test/resources/activemq-users.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  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.
--->
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:activemq /schema/activemq-users.xsd">
-   <!-- the default user.  this is used where username is null-->
-   <defaultuser name="guest" password="guest">
-      <role name="guest"/>
-   </defaultuser>
-   <!--<user name="admin" password="admin">
-      <role name="admin"/>
-   </user>-->
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
index 3a8b2fb..5ea74f3 100644
--- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
@@ -50,8 +50,7 @@ public class SpawnedJMSServer
       {
          Configuration conf = new ConfigurationImpl()
             .addAcceptorConfiguration(new TransportConfiguration(NettyAcceptorFactory.class.getName()))
-            .setSecurityEnabled(false)
-            .setFileDeploymentEnabled(false);
+            .setSecurityEnabled(false);
 
          conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NettyConnectorFactory.class.getName()));
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
index 4aa27e7..d2755ed 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
@@ -619,7 +619,6 @@ public class JMSBridgeImplTest extends UnitTestCase
       super.setUp();
 
       Configuration config = createBasicConfig()
-         .setFileDeploymentEnabled(false)
          .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
       InVMNamingContext context = new InVMNamingContext();
       jmsServer = new JMSServerManagerImpl(ActiveMQServers.newActiveMQServer(config, false));

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/4b63891a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java
index 400731f..283ca64 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/core/config/impl/ConfigurationValidationTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.tests.unit.core.config.impl;
 
+import org.apache.activemq.core.config.FileDeploymentManager;
 import org.junit.Test;
 
 import org.junit.Assert;
@@ -54,7 +55,7 @@ public class ConfigurationValidationTest extends UnitTestCase
    @Test
    public void testMinimalConfiguration() throws Exception
    {
-      String xml = "<configuration xmlns='urn:activemq'>" + "</configuration>";
+      String xml = "<core xmlns='urn:activemq:core'>" + "</core>";
       Element element = XMLUtil.stringToElement(xml);
       Assert.assertNotNull(element);
       XMLUtil.validate(element, "schema/activemq-configuration.xsd");
@@ -63,8 +64,10 @@ public class ConfigurationValidationTest extends UnitTestCase
    @Test
    public void testFullConfiguration() throws Exception
    {
-      FileConfiguration fc = new FileConfiguration("ConfigurationTest-full-config.xml");
-      fc.start();
+      FileConfiguration fc = new FileConfiguration();
+      FileDeploymentManager deploymentManager = new FileDeploymentManager("ConfigurationTest-full-config.xml");
+      deploymentManager.addDeployable(fc);
+      deploymentManager.readConfiguration();
 
       Assert.assertEquals(true, fc.isPersistDeliveryCountBeforeDelivery());
    }


Mime
View raw message