[jboss-cvs] JBoss Messaging SVN: r6383 - in trunk: AS/config and 72 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 9 14:09:21 EDT 2009
Author: timfox
Date: 2009-04-09 14:09:20 -0400 (Thu, 09 Apr 2009)
New Revision: 6383
Added:
trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicUserCredentialsDeployer.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java
Removed:
trunk/examples/jms/src/
trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicSecurityDeployer.java
trunk/src/main/org/jboss/messaging/core/security/JBMUpdateableSecurityManager.java
trunk/tests/jms-tests/config/connection-factory-http.xml
trunk/tests/jms-tests/config/database-clearer.xml
trunk/tests/jms-tests/config/datasource.xml
trunk/tests/jms-tests/config/poison.xml
trunk/tests/jms-tests/config/transaction-manager.xml
trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicSecurityDeployerTest.java
Modified:
trunk/.classpath
trunk/AS/config/jbm-jboss-beans.xml
trunk/build-messaging.xml
trunk/docs/userguide/en/modules/configuration.xml
trunk/examples/jms/browser/server0/jbm-configuration.xml
trunk/examples/jms/browser/server0/jbm-standalone-beans.xml
trunk/examples/jms/clustered-durable-subscription/server0/jbm-standalone-beans.xml
trunk/examples/jms/clustered-durable-subscription/server1/jbm-standalone-beans.xml
trunk/examples/jms/clustered-queue/server0/jbm-standalone-beans.xml
trunk/examples/jms/clustered-queue/server1/jbm-standalone-beans.xml
trunk/examples/jms/clustered-topic/server0/jbm-standalone-beans.xml
trunk/examples/jms/clustered-topic/server1/jbm-standalone-beans.xml
trunk/examples/jms/common/config/jbm-example-beans.xml
trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
trunk/examples/jms/dead-letter/server0/jbm-standalone-beans.xml
trunk/examples/jms/durable-subscription/server0/jbm-standalone-beans.xml
trunk/examples/jms/expiry/server0/jbm-standalone-beans.xml
trunk/examples/jms/http-transport/server0/jbm-standalone-beans.xml
trunk/examples/jms/jmx/server0/jbm-standalone-beans.xml
trunk/examples/jms/large-message/server0/jbm-standalone-beans.xml
trunk/examples/jms/management/server0/jbm-standalone-beans.xml
trunk/examples/jms/message-priority/server0/jbm-standalone-beans.xml
trunk/examples/jms/paging/server0/jbm-standalone-beans.xml
trunk/examples/jms/queue-requestor/server0/jbm-standalone-beans.xml
trunk/examples/jms/queue-selector/server0/jbm-standalone-beans.xml
trunk/examples/jms/queue/server0/jbm-standalone-beans.xml
trunk/examples/jms/request-reply/server0/jbm-standalone-beans.xml
trunk/examples/jms/scheduled-message/server0/jbm-standalone-beans.xml
trunk/examples/jms/temp-queue/server0/jbm-standalone-beans.xml
trunk/examples/jms/topic-selector-example1/server0/jbm-standalone-beans.xml
trunk/examples/jms/topic-selector-example2/server0/jbm-standalone-beans.xml
trunk/examples/jms/topic/server0/jbm-standalone-beans.xml
trunk/examples/jms/transactional/server0/jbm-standalone-beans.xml
trunk/src/config/jbm-cluster-standalone-beans.xml
trunk/src/config/jbm-standalone-beans.xml
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java
trunk/src/main/org/jboss/messaging/core/config/Configuration.java
trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
trunk/src/main/org/jboss/messaging/core/deployers/DeploymentManager.java
trunk/src/main/org/jboss/messaging/core/deployers/impl/FileDeploymentManager.java
trunk/src/main/org/jboss/messaging/core/deployers/impl/SecurityDeployer.java
trunk/src/main/org/jboss/messaging/core/deployers/impl/XmlDeployer.java
trunk/src/main/org/jboss/messaging/core/management/ManagementService.java
trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java
trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
trunk/src/main/org/jboss/messaging/core/security/JBMSecurityManager.java
trunk/src/main/org/jboss/messaging/core/security/impl/JBMSecurityManagerImpl.java
trunk/src/main/org/jboss/messaging/core/server/Messaging.java
trunk/src/main/org/jboss/messaging/core/server/MessagingServer.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
trunk/src/main/org/jboss/messaging/integration/security/JAASSecurityManager.java
trunk/src/main/org/jboss/messaging/integration/security/JBossASSecurityManager.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
trunk/src/schemas/jbm-configuration.xsd
trunk/tests/config/ConfigurationTest-config.xml
trunk/tests/config/ConfigurationTest-full-config.xml
trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
trunk/tests/joram-tests/src/org/jboss/test/jms/SpawnedJMSServer.java
trunk/tests/src/org/jboss/messaging/tests/integration/DuplicateDetectionTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/String64KLimitTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientConsumerCloseTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientProducerCloseTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientRequestorTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionCloseTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/CoreClientTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/DeadLetterAddressTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/ExpiryAddressTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/HeuristicXATest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/MessageGroupingTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/MessagePriorityTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/WildCardRoutingTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/bridge/BridgeTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ActivationTimeoutTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailBackupServerTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverExpiredMessageTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverManagementTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverNoSessionsFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverPreAcknowledgeTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverScheduledMessageTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureListenerOnFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureOnCreateConnectionTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/NettyMultiThreadRandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/PagingFailoverMultiThreadTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/RandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectWithBackupTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReplicateConnectionFailureTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleAutomaticFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleManualFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SplitBrainTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/management/ReplicationAwareTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/divert/DivertTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/management/ReplicationAwareJMSQueueControlWrapperTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/consumer/ConsumerTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSQueueControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControl2Test.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlUsingJMSTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/TopicControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/AcceptorControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/BridgeControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/BroadcastGroupControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/ClusterConnectionControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/DiscoveryGroupControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/DivertControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/MessagingServerControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/NotificationTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/QueueControlTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityNotificationTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/paging/PageCrashTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/security/NettySecurityClientTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/security/SecurityTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/server/ExpiryRunnerTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/server/LVQTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/server/PredefinedQueueTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FakeDeploymentManager.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/jms/misc/ManifestTest.java
trunk/tests/src/org/jboss/messaging/tests/util/ServiceTestBase.java
Log:
refactored bean dependencies
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/.classpath 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/.svn/**/*" kind="src" path="src/main"/>
+<<<<<<< .mine
+ <classpathentry kind="src" path="tests/jms-tests/config"/>
+=======
<classpathentry kind="src" path="examples/jms/message-priority/src"/>
+>>>>>>> .r6382
<classpathentry kind="src" path="examples/jms/queue-selector/src"/>
<classpathentry kind="src" path="build/src"/>
<classpathentry kind="src" path="tests/config"/>
@@ -15,6 +19,7 @@
<classpathentry kind="src" path="src/schemas"/>
<classpathentry kind="src" path="tests/joram-tests/src"/>
<classpathentry kind="src" path="tests/joram-tests/config"/>
+ <classpathentry kind="src" path="examples/jms/automatic-failover/src"/>
<classpathentry kind="src" path="examples/jms/clustered-queue/src"/>
<classpathentry kind="src" path="examples/jms/clustered-topic/src"/>
<classpathentry kind="src" path="examples/jms/clustered-durable-subscription/src"/>
@@ -60,7 +65,6 @@
<classpathentry kind="lib" path="thirdparty/jboss/jboss-javaee/lib/jboss-javaee.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss/jbosssx-client/lib/jbosssx-client.jar"/>
<classpathentry kind="lib" path="thirdparty/easymock/lib/easymock.jar" sourcepath="thirdparty/easymock/lib/src.zip"/>
- <classpathentry kind="lib" path="tests/jms-tests/config"/>
<classpathentry kind="lib" path="thirdparty/easymock-classextension/lib/easymockclassextension.jar"/>
<classpathentry kind="lib" path="thirdparty/cglib/lib/cglib.jar"/>
<classpathentry kind="lib" path="tests/tmpfiles"/>
Modified: trunk/AS/config/jbm-jboss-beans.xml
===================================================================
--- trunk/AS/config/jbm-jboss-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/AS/config/jbm-jboss-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -2,152 +2,57 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+ <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
- <bean name="JBMDeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
+ <!-- JNDI server. Disable this if you don't want JNDI -->
+ <bean name="JNDIServer" class="org.jnp.server.Main">
+ <property name="namingInfo">
+ <inject bean="Naming"/>
+ </property>
+ <property name="port">1099</property>
+ <property name="bindAddress">localhost</property>
+ <property name="rmiPort">1098</property>
+ <property name="rmiBindAddress">localhost</property>
</bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.integration.security.JBossASSecurityManager">
<depends>JBossSecurityJNDIContextEstablishment</depends>
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <!-- <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
- <parameter>false</parameter>
- </constructor>
- </bean>
-
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="messagingServer">
- <inject bean="MessagingServer"/>
- </property>
- </bean>-->
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
<parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="JBMDeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="JBMDeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="JBMDeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="JBMDeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
- </parameter>
+ <inject bean="MessagingServer"/>
+ </parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
</deployment>
\ No newline at end of file
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/build-messaging.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -242,9 +242,6 @@
<path refid="jboss.jboss.reflect.classpath"/>
<path refid="jboss.jboss.common.logging.spi.classpath"/>
<path refid="jboss.jboss.mdr.classpath"/>
- <!--<path refid="jboss.profiler.jvmti.classpath"/>-->
- <!--<path refid="jboss.test14.classpath"/>-->
- <!--<path refid="jboss.jboss.retro.classpath"/>-->
<path refid="easymock.easymock.classpath"/>
<path refid="easymock.classextension.classpath"/>
<path location="${build.jars.dir}/${jms.jar.name}"/>
@@ -264,9 +261,6 @@
<path refid="jboss.jboss.reflect.classpath"/>
<path refid="jboss.jboss.common.logging.spi.classpath"/>
<path refid="jboss.jboss.mdr.classpath"/>
- <!--<path refid="jboss.test14.classpath"/>-->
- <!--<path refid="jboss.jboss.retro.classpath"/>-->
- <!--<path refid="apache.ant.classpath"/>-->
<path refid="easymock.easymock.classpath"/>
<path location="${build.jars.dir}/${core.jar.name}"/>
<path location="${build.jars.dir}/${jms.jar.name}"/>
@@ -354,6 +348,7 @@
<path refid="jboss.jbossxb.classpath"/>
<path refid="apache.xerces.classpath"/>
<path refid="apache.logging.classpath"/>
+ <path refid="jboss.jnpserver.classpath"/>
</path>
<path id="joram.test.execution.classpath">
Modified: trunk/docs/userguide/en/modules/configuration.xml
===================================================================
--- trunk/docs/userguide/en/modules/configuration.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/docs/userguide/en/modules/configuration.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -752,7 +752,7 @@
<programlisting>
<![CDATA[
<bean name="SecurityManagerDeployer"
- class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ class="org.jboss.messaging.core.deployers.impl.BasicUserCredentialsDeployer">
<property name="jbmSecurityManager">
<inject bean="JBMSecurityManager"/>
</property>
Modified: trunk/examples/jms/browser/server0/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/browser/server0/jbm-configuration.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/browser/server0/jbm-configuration.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
<configuration>
-
+
<!-- Connectors -->
<connector name="netty-connector">
Modified: trunk/examples/jms/browser/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/browser/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/browser/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,45 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
+ <inject bean="MBeanServer"/>
</parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
+ <parameter>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
+ <!-- The JMS server -->
<bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
+ <constructor>
<parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
+ <inject bean="MessagingServer"/>
</parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
</constructor>
</bean>
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="ManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-durable-subscription/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-durable-subscription/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-durable-subscription/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-durable-subscription/server1/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-durable-subscription/server1/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-durable-subscription/server1/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">2098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-queue/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-queue/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-queue/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,45 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
+ <inject bean="MBeanServer"/>
</parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
+ <parameter>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
+ <!-- The JMS server -->
<bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
+ <constructor>
<parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
+ <inject bean="MessagingServer"/>
</parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
</constructor>
</bean>
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="ManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-queue/server1/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-queue/server1/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-queue/server1/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">2098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-topic/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-topic/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-topic/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/clustered-topic/server1/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/clustered-topic/server1/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/clustered-topic/server1/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,45 @@
<property name="rmiPort">2098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
+
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/common/config/jbm-example-beans.xml
===================================================================
--- trunk/examples/jms/common/config/jbm-example-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/common/config/jbm-example-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -29,7 +29,7 @@
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicUserCredentialsDeployer">
<constructor>
<parameter>
<inject bean="DeploymentManager"/>
Modified: trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -105,10 +105,17 @@
run(null, args);
}
- protected void killServer(int id)
+ protected void killServer(int id) throws Exception
{
+ System.out.println("Killing server " + id);
+
servers[id].destroy();
+
+ int exitValue = servers[id].waitFor();
+
+ log.info("Process exited with value " + exitValue);
}
+
protected InitialContext getContext(int serverId) throws Exception
{
String jndiFilename = "server" + serverId + "/client-jndi.properties";
@@ -164,8 +171,14 @@
{
for (Process server : servers)
{
- server.getInputStream().close();
- server.getErrorStream().close();
+ if (server.getInputStream() != null)
+ {
+ server.getInputStream().close();
+ }
+ if (server.getErrorStream() != null)
+ {
+ server.getErrorStream().close();
+ }
server.destroy();
}
}
Modified: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -71,7 +71,7 @@
String classPath = System.getProperty("java.class.path");
String pathSeparater = System.getProperty("path.separator");
classPath = classPath + pathSeparater + ".";
- System.out.println("classPath = " + classPath);
+ //System.out.println("classPath = " + classPath);
// I guess it'd be simpler to check if the OS is Windows...
if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").equals("Mac OS X"))
{
Modified: trunk/examples/jms/dead-letter/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/dead-letter/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/dead-letter/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,45 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
+ <inject bean="MBeanServer"/>
</parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
+ <parameter>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
+ <!-- The JMS server -->
<bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
+ <constructor>
<parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
+ <inject bean="MessagingServer"/>
+ </parameter>
</constructor>
</bean>
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="ManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
</deployment>
\ No newline at end of file
Modified: trunk/examples/jms/durable-subscription/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/durable-subscription/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/durable-subscription/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,45 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
+ <inject bean="MBeanServer"/>
</parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
+ <parameter>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
+ <!-- The JMS server -->
<bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
+ <constructor>
<parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
+ <inject bean="MessagingServer"/>
</parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
</constructor>
</bean>
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="ManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+</deployment>
Modified: trunk/examples/jms/expiry/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/expiry/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/expiry/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/http-transport/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/http-transport/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/http-transport/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/jmx/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/jmx/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/jmx/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/large-message/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/large-message/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/large-message/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/management/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/management/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/management/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/message-priority/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/message-priority/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/message-priority/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,161 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="postOffice"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="storageManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/paging/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/paging/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/paging/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/queue/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/queue/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/queue/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/queue-requestor/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/queue-requestor/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/queue-requestor/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/queue-selector/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/queue-selector/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/queue-selector/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/request-reply/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/request-reply/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/request-reply/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/scheduled-message/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/scheduled-message/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/scheduled-message/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/temp-queue/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/temp-queue/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/temp-queue/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/topic/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/topic/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/topic/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/topic-selector-example1/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/topic-selector-example1/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/topic-selector-example1/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/topic-selector-example2/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/topic-selector-example2/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/topic-selector-example2/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/examples/jms/transactional/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/transactional/server0/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/examples/jms/transactional/server0/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,152 +14,44 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
+
+ <!-- The core configuration -->
<bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
+ <!-- The security manager -->
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
- <constructor>
<parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
<inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="ManagementService"/>
+ <inject bean="MessagingServer"/>
</parameter>
</constructor>
</bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
-</deployment>
\ No newline at end of file
+
+</deployment>
Modified: trunk/src/config/jbm-cluster-standalone-beans.xml
===================================================================
--- trunk/src/config/jbm-cluster-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/config/jbm-cluster-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -31,7 +31,7 @@
<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
+ <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicUserCredentialsDeployer">
<constructor>
<parameter>
<inject bean="DeploymentManager"/>
Modified: trunk/src/config/jbm-standalone-beans.xml
===================================================================
--- trunk/src/config/jbm-standalone-beans.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/config/jbm-standalone-beans.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -14,159 +14,50 @@
<property name="rmiPort">1098</property>
<property name="rmiBindAddress">localhost</property>
</bean>
-
- <bean name="DeploymentManager" class="org.jboss.messaging.core.deployers.impl.FileDeploymentManager">
- <constructor>
- <!-- The scan time in milliseconds -->
- <parameter>5000</parameter>
- </constructor>
- </bean>
- <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="java.lang.management.ManagementFactory"
+ factoryMethod="getPlatformMBeanServer"/>
+ </bean>
- <!--<bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBossASSecurityManager"/>-->
-
- <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration">
+ <start ignored="true"/>
+ <stop ignored="true"/>
</bean>
- <bean name="BasicSecurityDeployer" class="org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer">
- <constructor>
- <parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- </constructor>
- <property name="jbmSecurityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <!--<property name="configFileNames">
- <array elementClass="java.lang.String">
- <value>jbm-security.xml</value>
- </array>
- </property>-->
- </bean>
-
- <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
- <depends>AddressSettingsDeployer</depends>
- <depends>QueueDeployer</depends>
-
- <property name="storageManager">
- <inject bean="StorageManager"/>
- </property>
- <property name="remotingService">
- <inject bean="RemotingService"/>
- </property>
- <property name="configuration">
- <inject bean="Configuration"/>
- </property>
- <property name="securityManager">
- <inject bean="JBMSecurityManager"/>
- </property>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
- </bean>
-
- <bean name="StorageManager" class="org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager">
- <constructor>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="RemotingService" class="org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl">
+ <!-- The security manager -->
+ <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
<start ignored="true"/>
<stop ignored="true"/>
- <constructor>
- <parameter>
- <inject bean="Configuration"/>
- </parameter>
- </constructor>
- <property name="managementService">
- <inject bean="ManagementService"/>
- </property>
</bean>
-
- <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
- <constructor>
- <parameter>
- <inject bean="MessagingServer" property="serverManagement"/>
- </parameter>
- <parameter>
- <inject bean="JMSManagementService"/>
- </parameter>
- </constructor>
- </bean>
- <bean name="JMSServerDeployer" class="org.jboss.messaging.jms.server.impl.JMSServerDeployer">
+ <!-- The core server -->
+ <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl">
<constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- <property name="jmsServerManager">
- <inject bean="JMSServerManager"/>
- </property>
- </bean>
-
- <bean name="AddressSettingsDeployer" class="org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer">
- <constructor>
<parameter>
- <inject bean="DeploymentManager"/>
+ <inject bean="MBeanServer"/>
</parameter>
<parameter>
- <inject bean="MessagingServer" property="addressSettingsRepository" state="Configured"/>
- </parameter>
- </constructor>
+ <inject bean="JBMSecurityManager"/>
+ </parameter>
+ </constructor>
</bean>
-
- <bean name="QueueDeployer" class="org.jboss.messaging.core.deployers.impl.QueueDeployer">
- <constructor>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
<inject bean="Configuration"/>
</parameter>
- </constructor>
- </bean>
-
- <bean name="SecurityDeployer" class="org.jboss.messaging.core.deployers.impl.SecurityDeployer">
- <constructor>
<parameter>
- <inject bean="DeploymentManager"/>
- </parameter>
- <parameter>
- <inject bean="MessagingServer" property="securityRepository"/>
- </parameter>
+ <inject bean="MessagingServer"/>
+ </parameter>
</constructor>
</bean>
- <bean name="ManagementService" class="org.jboss.messaging.core.management.impl.ManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="MBeanServer"/>
- </parameter>
- <parameter>
- <inject bean="Configuration" property="JMXManagementEnabled" />
- </parameter>
- </constructor>
- </bean>
-
- <bean name="JMSManagementService" class="org.jboss.messaging.jms.server.management.impl.JMSManagementServiceImpl">
- <constructor>
- <parameter>
- <inject bean="ManagementService"/>
- </parameter>
- </constructor>
- </bean>
-
- <bean name="MBeanServer" class="javax.management.MBeanServer">
- <constructor factoryClass="java.lang.management.ManagementFactory"
- factoryMethod="getPlatformMBeanServer"/>
- </bean>
-
</deployment>
\ No newline at end of file
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -87,7 +87,6 @@
import org.jboss.messaging.utils.OrderedExecutorFactory;
import org.jboss.messaging.utils.SimpleIDGenerator;
import org.jboss.messaging.utils.SimpleString;
-import org.jboss.messaging.utils.TokenBucketLimiter;
import org.jboss.messaging.utils.TokenBucketLimiterImpl;
/*
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -465,7 +465,7 @@
{
return false;
}
-
+
if (connectionID != null && !connections.containsKey(connectionID))
{
// We already failed over/reconnected - probably the first failure came in, all the connections were failed
@@ -508,9 +508,9 @@
// It should then return its connections, with channel 1 lock still held
// It can then release the channel 1 lock, and retry (which will cause locking on failoverLock
// until failover is complete
-
+
boolean attemptFailover = (backupConnectorFactory) != null && (failoverOnServerShutdown || me.getCode() != MessagingException.SERVER_DISCONNECTED);
-
+
boolean done = false;
if (attemptFailover || reconnectAttempts != 0)
@@ -579,8 +579,15 @@
backupConnectorFactory = null;
backupTransportParams = null;
+
+ log.info("************ ATTEMPTING FAILOVER");
done = reattachSessions(reconnectAttempts == -1 ? -1 : reconnectAttempts + 1);
+
+ if (done)
+ {
+ log.info("************* FAILED OVER OK");
+ }
}
else if (reconnectAttempts != 0)
{
Modified: trunk/src/main/org/jboss/messaging/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -59,6 +59,18 @@
boolean isBackup();
void setBackup(boolean backup);
+
+ boolean isEnableFileDeployment();
+
+ void setEnableFileDeployment(boolean enable);
+
+ boolean isEnablePersistence();
+
+ void setEnablePersistence(boolean enable);
+
+ long getFileDeployerScanPeriod();
+
+ void setFileDeployerScanPeriod(long period);
long getQueueActivationTimeout();
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -42,11 +42,17 @@
private static final long serialVersionUID = 4077088945050267843L;
public static final boolean DEFAULT_CLUSTERED = false;
-
+
public static final boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false;
public static final boolean DEFAULT_BACKUP = false;
+ public static final boolean DEFAULT_ENABLE_FILE_DEPLOYMENT = false;
+
+ public static final boolean DEFAULT_ENABLE_PERSISTENCE = true;
+
+ public static final long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000;
+
public static final long DEFAULT_QUEUE_ACTIVATION_TIMEOUT = 30000;
public static final int DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE = 30;
@@ -136,7 +142,13 @@
protected boolean clustered = DEFAULT_CLUSTERED;
protected boolean backup = DEFAULT_BACKUP;
-
+
+ protected boolean enableFileDeployment = DEFAULT_ENABLE_FILE_DEPLOYMENT;
+
+ protected boolean enablePersistence = DEFAULT_ENABLE_PERSISTENCE;
+
+ protected long fileDeploymentScanPeriod = DEFAULT_FILE_DEPLOYER_SCAN_PERIOD;
+
protected boolean persistDeliveryCountBeforeDelivery = DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY;
protected long queueActivationTimeout = DEFAULT_QUEUE_ACTIVATION_TIMEOUT;
@@ -232,24 +244,24 @@
protected String managementClusterPassword = DEFAULT_MANAGEMENT_CLUSTER_PASSWORD;
protected long managementRequestTimeout = DEFAULT_MANAGEMENT_REQUEST_TIMEOUT;
-
+
// MessagingComponent implementation ----------------------------------------------
-
+
public void start() throws Exception
- {
+ {
}
-
+
public void stop() throws Exception
- {
+ {
}
-
+
public boolean isStarted()
{
return true;
}
-
+
// Public -------------------------------------------------------------------------
-
+
public boolean isClustered()
{
return clustered;
@@ -265,6 +277,36 @@
return backup;
}
+ public boolean isEnableFileDeployment()
+ {
+ return enableFileDeployment;
+ }
+
+ public void setEnableFileDeployment(final boolean enable)
+ {
+ enableFileDeployment = enable;
+ }
+
+ public boolean isEnablePersistence()
+ {
+ return this.enablePersistence;
+ }
+
+ public void setEnablePersistence(boolean enable)
+ {
+ this.enablePersistence = enable;
+ }
+
+ public long getFileDeployerScanPeriod()
+ {
+ return fileDeploymentScanPeriod;
+ }
+
+ public void setFileDeployerScanPeriod(final long period)
+ {
+ fileDeploymentScanPeriod = period;
+ }
+
/**
* @return the persistDeliveryCountBeforeDelivery
*/
@@ -632,7 +674,7 @@
}
public void setSecurityEnabled(final boolean enabled)
- {
+ {
securityEnabled = enabled;
}
@@ -755,7 +797,7 @@
return cother.isClustered() == isClustered() && cother.isCreateBindingsDir() == isCreateBindingsDir() &&
cother.isCreateJournalDir() == isCreateJournalDir() &&
cother.isJournalSyncNonTransactional() == isJournalSyncNonTransactional() &&
- cother.isJournalSyncTransactional() == isJournalSyncTransactional() &&
+ cother.isJournalSyncTransactional() == isJournalSyncTransactional() &&
cother.isSecurityEnabled() == isSecurityEnabled() &&
cother.isWildcardRoutingEnabled() == isWildcardRoutingEnabled() &&
cother.getLargeMessagesDirectory().equals(getLargeMessagesDirectory()) &&
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -95,6 +95,11 @@
clustered = getBoolean(e, "clustered", clustered);
backup = getBoolean(e, "backup", backup);
+
+ //Defaults to true when using FileConfiguration
+ enableFileDeployment = getBoolean(e, "enable-file-deployment", true);
+
+ enablePersistence = getBoolean(e, "enable-persistence", enablePersistence);
persistDeliveryCountBeforeDelivery = getBoolean(e, "persist-delivery-count-before-delivery", persistDeliveryCountBeforeDelivery);
Modified: trunk/src/main/org/jboss/messaging/core/deployers/DeploymentManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/DeploymentManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/deployers/DeploymentManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -22,13 +22,15 @@
package org.jboss.messaging.core.deployers;
+import org.jboss.messaging.core.server.MessagingComponent;
+
/**
* This class manages any configuration files available. It will notify any deployers registered with it on changes.
*
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
*/
-public interface DeploymentManager
+public interface DeploymentManager extends MessagingComponent
{
/**
* registers a deployable object which will handle the deployment of URL's
Deleted: trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicSecurityDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicSecurityDeployer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicSecurityDeployer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.messaging.core.deployers.impl;
-
-import org.jboss.messaging.core.deployers.DeploymentManager;
-import org.jboss.messaging.core.security.JBMUpdateableSecurityManager;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- *
- * deployer for adding security loaded from the file "jbm-security.xml"
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class BasicSecurityDeployer extends XmlDeployer
-{
- private JBMUpdateableSecurityManager jbmSecurityManager;
- private static final String PASSWORD_ATTRIBUTE = "password";
- private static final String ROLES_NODE = "role";
- private static final String ROLE_ATTR_NAME = "name";
-
- private static final String DEFAULT_USER = "defaultuser";
-
- private static final String USER = "user";
-
- public BasicSecurityDeployer(final DeploymentManager deploymentManager)
- {
- super(deploymentManager);
- }
-
- public String[] getElementTagName()
- {
- return new String[]{DEFAULT_USER, USER};
- }
-
- @Override
- public void validate(Node rootNode) throws Exception
- {
- org.jboss.messaging.utils.XMLUtil.validate(rootNode, "jbm-security.xsd");
- }
-
- public void deploy(final Node node) throws Exception
- {
- String username = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
- String password = node.getAttributes().getNamedItem(PASSWORD_ATTRIBUTE).getNodeValue();
- //add the user
- jbmSecurityManager.addUser(username, password);
- String nodeName = node.getNodeName();
- if (DEFAULT_USER.equalsIgnoreCase(nodeName))
- {
- jbmSecurityManager.setDefaultUser(username);
- }
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++)
- {
- Node child = children.item(i);
- //and add any roles
- if (ROLES_NODE.equalsIgnoreCase(child.getNodeName()))
- {
- String role = child.getAttributes().getNamedItem(ROLE_ATTR_NAME).getNodeValue();
- jbmSecurityManager.addRole(username, role);
- }
- }
- }
-
- public void undeploy(final Node node) throws Exception
- {
- String username = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
- jbmSecurityManager.removeUser(username);
- }
-
- public String[] getDefaultConfigFileNames()
- {
- return new String[] {"jbm-security.xml"};
- }
-
- public void setJbmSecurityManager(final JBMUpdateableSecurityManager jbmSecurityManager)
- {
- this.jbmSecurityManager = jbmSecurityManager;
- }
-}
Copied: trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicUserCredentialsDeployer.java (from rev 6356, trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicSecurityDeployer.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicUserCredentialsDeployer.java (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/deployers/impl/BasicUserCredentialsDeployer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.messaging.core.deployers.impl;
+
+import org.jboss.messaging.core.deployers.DeploymentManager;
+import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.core.security.JBMSecurityManager;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ * deployer for adding security loaded from the file "jbm-security.xml"
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ */
+public class BasicUserCredentialsDeployer extends XmlDeployer
+{
+ private static final Logger log = Logger.getLogger(BasicUserCredentialsDeployer.class);
+
+ private final JBMSecurityManager jbmSecurityManager;
+
+ private static final String PASSWORD_ATTRIBUTE = "password";
+
+ private static final String ROLES_NODE = "role";
+
+ private static final String ROLE_ATTR_NAME = "name";
+
+ private static final String DEFAULT_USER = "defaultuser";
+
+ private static final String USER = "user";
+
+ public BasicUserCredentialsDeployer(final DeploymentManager deploymentManager,
+ final JBMSecurityManager jbmSecurityManager)
+ {
+ super(deploymentManager);
+
+ this.jbmSecurityManager = jbmSecurityManager;
+ }
+
+ public String[] getElementTagName()
+ {
+ return new String[] { DEFAULT_USER, USER };
+ }
+
+ @Override
+ public void validate(Node rootNode) throws Exception
+ {
+ org.jboss.messaging.utils.XMLUtil.validate(rootNode, "jbm-security.xsd");
+ }
+
+ public void deploy(final Node node) throws Exception
+ {
+ String username = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
+ String password = node.getAttributes().getNamedItem(PASSWORD_ATTRIBUTE).getNodeValue();
+
+ // add the user
+ jbmSecurityManager.addUser(username, password);
+ String nodeName = node.getNodeName();
+ if (DEFAULT_USER.equalsIgnoreCase(nodeName))
+ {
+ jbmSecurityManager.setDefaultUser(username);
+ }
+ NodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ Node child = children.item(i);
+ // and add any roles
+ if (ROLES_NODE.equalsIgnoreCase(child.getNodeName()))
+ {
+ String role = child.getAttributes().getNamedItem(ROLE_ATTR_NAME).getNodeValue();
+ jbmSecurityManager.addRole(username, role);
+ }
+ }
+ }
+
+ public void undeploy(final Node node) throws Exception
+ {
+ String username = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
+ jbmSecurityManager.removeUser(username);
+ }
+
+ public String[] getDefaultConfigFileNames()
+ {
+ return new String[] { "jbm-security.xml" };
+ }
+}
Modified: trunk/src/main/org/jboss/messaging/core/deployers/impl/FileDeploymentManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/impl/FileDeploymentManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/deployers/impl/FileDeploymentManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -18,7 +18,7 @@
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ */
package org.jboss.messaging.core.deployers.impl;
@@ -31,11 +31,13 @@
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.jboss.messaging.core.deployers.Deployer;
import org.jboss.messaging.core.deployers.DeploymentManager;
import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.utils.Pair;
/**
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
@@ -44,34 +46,39 @@
public class FileDeploymentManager implements Runnable, DeploymentManager
{
private static final Logger log = Logger.getLogger(FileDeploymentManager.class);
-
+
private final List<Deployer> deployers = new ArrayList<Deployer>();
-
- private final Map<URL, DeployInfo> deployed = new HashMap<URL, DeployInfo>();
+ private final Map<Pair<URL, Deployer>, DeployInfo> deployed = new HashMap<Pair<URL, Deployer>, DeployInfo>();
+
private ScheduledExecutorService scheduler;
-
+
private boolean started;
-
+
private final long period;
-
+
+ private ScheduledFuture<?> future;
+
public FileDeploymentManager(final long period)
{
this.period = period;
}
-
+
public synchronized void start() throws Exception
{
if (started)
{
return;
}
-
+
+ started = true;
+
+ // We run once first synchronously to make sure any already registered deployers get deployed
+ run();
+
scheduler = Executors.newSingleThreadScheduledExecutor();
- scheduler.scheduleWithFixedDelay(this, period, period, TimeUnit.MILLISECONDS);
-
- started = true;
+ future = scheduler.scheduleWithFixedDelay(this, period, period, TimeUnit.MILLISECONDS);
}
public synchronized void stop()
@@ -80,15 +87,26 @@
{
return;
}
-
+
+ started = false;
+
+ if (future != null)
+ {
+ future.cancel(false);
+
+ future = null;
+ }
+
scheduler.shutdown();
+
scheduler = null;
- deployers.clear();
- deployed.clear();
-
- started = false;
}
+ public synchronized boolean isStarted()
+ {
+ return started;
+ }
+
/**
* registers a Deployer object which will handle the deployment of URL's
*
@@ -96,57 +114,52 @@
* @throws Exception .
*/
public synchronized void registerDeployer(final Deployer deployer) throws Exception
- {
- if (!started)
- {
- throw new IllegalStateException("Service is not started");
- }
-
+ {
if (!deployers.contains(deployer))
{
deployers.add(deployer);
-
- String[] filenames = deployer.getConfigFileNames();
-
- for (String filename : filenames)
+
+ if (started)
{
- log.debug("the filename is " + filename);
+ String[] filenames = deployer.getConfigFileNames();
- log.debug(System.getProperty("java.class.path"));
+ for (String filename : filenames)
+ {
+ log.debug("the filename is " + filename);
- Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(filename);
+ log.debug(System.getProperty("java.class.path"));
- while (urls.hasMoreElements())
- {
- URL url = urls.nextElement();
+ Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(filename);
- log.debug("Got url " + url);
+ while (urls.hasMoreElements())
+ {
+ URL url = urls.nextElement();
- try
- {
- log.debug("Deploying " + deployer + " with url " + url);
- deployer.deploy(url);
+ log.debug("Got url " + url);
+
+ try
+ {
+ log.debug("Deploying " + deployer + " with url " + url);
+ deployer.deploy(url);
+ }
+ catch (Exception e)
+ {
+ log.error("Error deploying " + url, e);
+ }
+
+ Pair<URL, Deployer> pair = new Pair<URL, Deployer>(url, deployer);
+
+ deployed.put(pair, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
}
- catch (Exception e)
- {
- log.error("Error deploying " + url, e);
- }
-
- deployed.put(url, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
}
}
- }
-
+ }
+
log.debug("Done register");
}
public synchronized void unregisterDeployer(final Deployer deployer) throws Exception
{
- if (!started)
- {
- throw new IllegalStateException("Service is not started");
- }
-
if (deployers.remove(deployer))
{
String[] filenames = deployer.getConfigFileNames();
@@ -157,8 +170,10 @@
{
URL url = urls.nextElement();
- deployed.remove(url);
- }
+ Pair<URL, Deployer> pair = new Pair<URL, Deployer>(url, deployer);
+
+ deployed.remove(pair);
+ }
}
}
}
@@ -170,36 +185,38 @@
{
if (!started)
{
- throw new IllegalStateException("Service is not started");
+ return;
}
-
+
try
{
for (Deployer deployer : deployers)
- {
+ {
String[] filenames = deployer.getConfigFileNames();
-
+
for (String filename : filenames)
{
Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(filename);
-
+
+ boolean hasUrl = false;
while (urls.hasMoreElements())
{
+ hasUrl = true;
URL url = urls.nextElement();
+
+ Pair<URL, Deployer> pair = new Pair<URL, Deployer>(url, deployer);
- DeployInfo info = deployed.get(url);
+ DeployInfo info = deployed.get(pair);
long newLastModified = new File(url.getFile()).lastModified();
if (info == null)
- {
+ {
try
{
- log.debug("Deploying " + deployer + " with url " + url);
-
deployer.deploy(url);
- deployed.put(url, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
+ deployed.put(pair, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
}
catch (Exception e)
{
@@ -207,34 +224,34 @@
}
}
else if (newLastModified > info.lastModified)
- {
+ {
try
{
- log.debug("Redeploying " + deployer + " with url " + url);
-
deployer.redeploy(url);
- deployed.put(url, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
+ deployed.put(pair, new DeployInfo(deployer, new File(url.getFile()).lastModified()));
}
catch (Exception e)
{
log.error("Error redeploying " + url, e);
}
}
- }
+ }
}
}
-
- for (Map.Entry<URL, DeployInfo> entry : deployed.entrySet())
+
+ for (Map.Entry<Pair<URL, Deployer>, DeployInfo> entry : deployed.entrySet())
{
- if (!new File(entry.getKey().getFile()).exists())
+ Pair<URL, Deployer> pair = entry.getKey();
+
+ if (!new File(pair.a.getFile()).exists())
{
try
{
Deployer deployer = entry.getValue().deployer;
log.debug("Undeploying " + deployer + " with url" + entry.getKey());
- deployer.undeploy(entry.getKey());
-
+ deployer.undeploy(entry.getKey().a);
+
deployed.remove(entry.getKey());
}
catch (Exception e)
@@ -254,19 +271,20 @@
{
return deployers;
}
-
- public synchronized Map<URL, DeployInfo> getDeployed()
+
+ public synchronized Map<Pair<URL, Deployer>, DeployInfo> getDeployed()
{
return deployed;
}
-
+
// Inner classes -------------------------------------------------------------------------------------------
-
+
public static class DeployInfo
{
public Deployer deployer;
+
public long lastModified;
-
+
DeployInfo(final Deployer deployer, final long lastModified)
{
this.deployer = deployer;
@@ -274,4 +292,3 @@
}
}
}
-
Modified: trunk/src/main/org/jboss/messaging/core/deployers/impl/SecurityDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/impl/SecurityDeployer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/deployers/impl/SecurityDeployer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -22,17 +22,18 @@
package org.jboss.messaging.core.deployers.impl;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
import org.jboss.messaging.core.deployers.DeploymentManager;
+import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.security.Role;
import org.jboss.messaging.core.settings.HierarchicalRepository;
import org.jboss.messaging.utils.XMLUtil;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Set;
-
/**
* Deploys the security settings into a security repository and adds them to the security store.
*
@@ -40,7 +41,8 @@
*/
public class SecurityDeployer extends XmlDeployer
{
-
+ private static final Logger log = Logger.getLogger(SecurityDeployer.class);
+
private static final String PERMISSION_ELEMENT_NAME = "permission";
private static final String TYPE_ATTR_NAME = "type";
private static final String ROLES_ATTR_NAME = "roles";
@@ -59,12 +61,13 @@
/**
* The repository to add to
*/
- private HierarchicalRepository<Set<Role>> securityRepository;
+ private final HierarchicalRepository<Set<Role>> securityRepository;
public SecurityDeployer(final DeploymentManager deploymentManager, final HierarchicalRepository<Set<Role>> securityRepository)
{
super(deploymentManager);
- this.securityRepository = securityRepository;
+
+ this.securityRepository = securityRepository;
}
/**
Modified: trunk/src/main/org/jboss/messaging/core/deployers/impl/XmlDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/deployers/impl/XmlDeployer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/deployers/impl/XmlDeployer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -103,14 +103,12 @@
//if this has never been deployed deploy
Map<String, Node> map = configuration.get(url);
if (map == null || (map != null && map.get(name) == null))
- {
- log.info(new StringBuilder(name).append(" doesn't exist deploying"));
+ {
deploy(node);
}
//or if it has changed redeploy
else if (hasNodeChanged(url, node, name))
- {
- log.info(new StringBuilder(name).append(" has changed redeploying"));
+ {
undeploy(node);
deploy(node);
addToConfiguration(url, name, node);
@@ -179,8 +177,7 @@
log.error("key attribute missing for configuration " + node);
continue;
}
- String name = keyNode.getNodeValue();
- log.info(new StringBuilder("deploying ").append(name));
+ String name = keyNode.getNodeValue();
try
{
deploy(node);
@@ -211,7 +208,7 @@
{
return;
}
-
+
deploymentManager.registerDeployer(this);
started = true;
Modified: trunk/src/main/org/jboss/messaging/core/management/ManagementService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/ManagementService.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/management/ManagementService.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -34,6 +34,7 @@
import org.jboss.messaging.core.config.cluster.ClusterConnectionConfiguration;
import org.jboss.messaging.core.config.cluster.DiscoveryGroupConfiguration;
import org.jboss.messaging.core.config.cluster.DivertConfiguration;
+import org.jboss.messaging.core.management.impl.MessagingServerControl;
import org.jboss.messaging.core.messagecounter.MessageCounterManager;
import org.jboss.messaging.core.persistence.StorageManager;
import org.jboss.messaging.core.postoffice.PostOffice;
@@ -63,13 +64,13 @@
public interface ManagementService extends NotificationService, MessagingComponent
{
// Configuration
-
+
MessageCounterManager getMessageCounterManager();
String getClusterPassword();
void setClusterPassword(String clusterPassword);
-
+
SimpleString getManagementAddress();
void setManagementAddress(SimpleString managementAddress);
@@ -83,18 +84,18 @@
ReplicationOperationInvoker getReplicationOperationInvoker();
// Resource Registration
-
- MessagingServerControlMBean registerServer(PostOffice postOffice,
- StorageManager storageManager,
- Configuration configuration,
- HierarchicalRepository<AddressSettings> addressSettingsRepository,
- HierarchicalRepository<Set<Role>> securityRepository,
- ResourceManager resourceManager,
- RemotingService remotingService,
- MessagingServer messagingServer,
- QueueFactory queueFactory,
- boolean backup) throws Exception;
+ MessagingServerControl registerServer(PostOffice postOffice,
+ StorageManager storageManager,
+ Configuration configuration,
+ HierarchicalRepository<AddressSettings> addressSettingsRepository,
+ HierarchicalRepository<Set<Role>> securityRepository,
+ ResourceManager resourceManager,
+ RemotingService remotingService,
+ MessagingServer messagingServer,
+ QueueFactory queueFactory,
+ boolean backup) throws Exception;
+
void unregisterServer() throws Exception;
void registerInJMX(ObjectName objectName, Object managedResource) throws Exception;
@@ -102,7 +103,7 @@
void unregisterFromJMX(final ObjectName objectName) throws Exception;
void registerInRegistry(String resourceName, Object managedResource);
-
+
void unregisterFromRegistry(final String resourceName);
void registerAddress(SimpleString address) throws Exception;
@@ -132,12 +133,12 @@
void registerBridge(Bridge bridge, BridgeConfiguration configuration) throws Exception;
void unregisterBridge(String name) throws Exception;
-
+
void registerCluster(ClusterConnection cluster, ClusterConnectionConfiguration configuration) throws Exception;
-
+
void unregisterCluster(String name) throws Exception;
Object getResource(String resourceName);
- ServerMessage handleMessage(ServerMessage message);
+ ServerMessage handleMessage(ServerMessage message);
}
Modified: trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/ManagementServiceImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -57,7 +57,6 @@
import org.jboss.messaging.core.management.DiscoveryGroupControlMBean;
import org.jboss.messaging.core.management.DivertControlMBean;
import org.jboss.messaging.core.management.ManagementService;
-import org.jboss.messaging.core.management.MessagingServerControlMBean;
import org.jboss.messaging.core.management.Notification;
import org.jboss.messaging.core.management.NotificationListener;
import org.jboss.messaging.core.management.ObjectNames;
@@ -158,22 +157,22 @@
return messageCounterManager;
}
- public MessagingServerControlMBean registerServer(final PostOffice postOffice,
- final StorageManager storageManager,
- final Configuration configuration,
- final HierarchicalRepository<AddressSettings> addressSettingsRepository,
- final HierarchicalRepository<Set<Role>> securityRepository,
- final ResourceManager resourceManager,
- final RemotingService remotingService,
- final MessagingServer messagingServer,
- final QueueFactory queueFactory,
- final boolean backup) throws Exception
+ public MessagingServerControl registerServer(final PostOffice postOffice,
+ final StorageManager storageManager,
+ final Configuration configuration,
+ final HierarchicalRepository<AddressSettings> addressSettingsRepository,
+ final HierarchicalRepository<Set<Role>> securityRepository,
+ final ResourceManager resourceManager,
+ final RemotingService remotingService,
+ final MessagingServer messagingServer,
+ final QueueFactory queueFactory,
+ final boolean backup) throws Exception
{
this.postOffice = postOffice;
this.addressSettingsRepository = addressSettingsRepository;
this.securityRepository = securityRepository;
this.storageManager = storageManager;
-
+
managedServer = new MessagingServerControl(postOffice,
storageManager,
configuration,
@@ -196,8 +195,8 @@
ObjectName objectName = ObjectNames.getMessagingServerObjectName();
unregisterFromJMX(objectName);
unregisterFromRegistry(ResourceNames.CORE_SERVER);
- }
-
+ }
+
public synchronized void registerAddress(final SimpleString address) throws Exception
{
ObjectName objectName = ObjectNames.getAddressObjectName(address);
@@ -250,7 +249,7 @@
unregisterFromRegistry(ResourceNames.CORE_QUEUE + name);
messageCounterManager.unregisterMessageCounter(name.toString());
}
-
+
public synchronized void registerDivert(Divert divert, DivertConfiguration config) throws Exception
{
ObjectName objectName = ObjectNames.getDivertObjectName(divert.getUniqueName());
@@ -330,7 +329,7 @@
unregisterFromJMX(objectName);
unregisterFromRegistry(ResourceNames.CORE_BRIDGE + name);
}
-
+
public synchronized void registerCluster(final ClusterConnection cluster, final ClusterConnectionConfiguration configuration) throws Exception
{
ObjectName objectName = ObjectNames.getClusterConnectionObjectName(configuration.getName());
@@ -353,7 +352,7 @@
// as an ObjectMessage when using JMS to send management message
ServerMessageImpl reply = new ServerMessageImpl(message);
reply.setType(MessageImpl.OBJECT_TYPE);
-
+
SimpleString resourceName = (SimpleString)message.getProperty(ManagementHelper.HDR_RESOURCE_NAME);
if (log.isDebugEnabled())
{
@@ -380,7 +379,7 @@
ManagementHelper.storeResult(reply, result);
}
catch (Exception e)
- {
+ {
log.warn("exception while invoking " + operation + " on " + resourceName, e);
reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, false);
String exceptionMessage = e.getMessage();
@@ -391,7 +390,7 @@
if (e != null)
{
reply.putStringProperty(ManagementHelper.HDR_OPERATION_EXCEPTION,
- new SimpleString(exceptionMessage));
+ new SimpleString(exceptionMessage));
}
}
}
@@ -408,7 +407,7 @@
}
}
}
-
+
return reply;
}
@@ -548,9 +547,9 @@
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
-
+
public void sendNotification(final Notification notification) throws Exception
- {
+ {
if (managedServer != null && noticationsEnabled)
{
// This needs to be synchronized since we need to ensure notifications are processed in strict sequence
@@ -573,7 +572,7 @@
// Now send message
ServerMessage notificationMessage = new ServerMessageImpl(storageManager.generateUniqueID());
-
+
notificationMessage.setBody(ChannelBuffers.EMPTY_BUFFER);
// Notification messages are always durable so the user can choose whether to add a durable queue to consume
// them in
@@ -596,10 +595,10 @@
notifProps.putLongProperty(ManagementHelper.HDR_NOTIFICATION_TIMESTAMP, System.currentTimeMillis());
if (notification.getUID() != null)
- {
+ {
notifProps.putStringProperty(new SimpleString("foobar"), new SimpleString(notification.getUID()));
}
-
+
notificationMessage.putTypedProperties(notifProps);
postOffice.route(notificationMessage, null);
Modified: trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerControl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -278,6 +278,7 @@
public synchronized void createQueue(final String address, final String name, final String filterStr, final boolean durable) throws Exception
{
+ //FIXME - this should be using the createQueue method in MessagingServerImpl
SimpleString sAddress = new SimpleString(address);
SimpleString sName = new SimpleString(name);
SimpleString sFilter = filterStr == null || filterStr.length() == 0 ? null : new SimpleString(filterStr);
@@ -300,6 +301,8 @@
public synchronized void destroyQueue(final String name) throws Exception
{
+ //FIXME - there should be a destroyqueue method in MessagingServreImpl that does this to avoid
+ //duplicating functionality with ServerSessionImpl
SimpleString sName = new SimpleString(name);
Binding binding = postOffice.getBinding(sName);
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -616,7 +616,7 @@
break;
}
case DISCONNECT:
- {
+ {
packet = new PacketImpl(DISCONNECT);
break;
}
Modified: trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -217,7 +217,7 @@
}
for (RemotingConnection connection: connections.values())
- {
+ {
connection.getChannel(0, -1, false).sendAndFlush(new PacketImpl(DISCONNECT));
}
Modified: trunk/src/main/org/jboss/messaging/core/security/JBMSecurityManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/JBMSecurityManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/security/JBMSecurityManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -50,4 +50,36 @@
* @return true if the user is valid and they have the correct roles
*/
boolean validateUserAndRole(String user, String password, Set<Role> roles, CheckType checkType);
+
+ /**
+ * adds a new user
+ * @param user the user to add
+ * @param password theusers password
+ */
+ void addUser(String user, String password);
+
+ /**
+ * removes a user and any roles they may have.
+ * @param user the user to remove
+ */
+ void removeUser(String user);
+
+ /**
+ * adds a new role for a user.
+ * @param user the user
+ * @param role the role to add
+ */
+ void addRole(String user, String role);
+
+ /**
+ * removes a role from a user
+ * @param user the user
+ * @param role the role to remove
+ */
+ void removeRole(String user, String role);
+
+ /*
+ * set the default user for null users
+ */
+ void setDefaultUser(String username);
}
Deleted: trunk/src/main/org/jboss/messaging/core/security/JBMUpdateableSecurityManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/JBMUpdateableSecurityManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/security/JBMUpdateableSecurityManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.core.security;
-
-/**
- * extends JBMSecurityManager to allow the addition and removal of users and roles.
- *
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public interface JBMUpdateableSecurityManager extends JBMSecurityManager
-{
- /**
- * adds a new user
- * @param user the user to add
- * @param password theusers password
- */
- void addUser(String user, String password);
-
- /**
- * removes a user and any roles they may have.
- * @param user the user to remove
- */
- void removeUser(String user);
-
- /**
- * adds a new role for a user.
- * @param user the user
- * @param role the role to add
- */
- void addRole(String user, String role);
-
- /**
- * removes a role from a user
- * @param user the user
- * @param role the role to remove
- */
- void removeRole(String user, String role);
-
- /*
- * set the default user for null users
- */
- void setDefaultUser(String username);
-}
Modified: trunk/src/main/org/jboss/messaging/core/security/impl/JBMSecurityManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/impl/JBMSecurityManagerImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/security/impl/JBMSecurityManagerImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -18,28 +18,28 @@
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ */
package org.jboss.messaging.core.security.impl;
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.security.CheckType;
-import org.jboss.messaging.core.security.JBMUpdateableSecurityManager;
-import org.jboss.messaging.core.security.Role;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.core.security.CheckType;
+import org.jboss.messaging.core.security.JBMSecurityManager;
+import org.jboss.messaging.core.security.Role;
+
/**
* A basic implementation of the JBMUpdateableSecurityManager. This can be used within an appserver and be deployed by
- * BasicSecurityDeployer or used standalone or embedded.
+ * BasicUserCredentialsDeployer or used standalone or embedded.
*
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
*/
-public class JBMSecurityManagerImpl implements JBMUpdateableSecurityManager
+public class JBMSecurityManagerImpl implements JBMSecurityManager
{
private static final Logger log = Logger.getLogger(JBMSecurityManagerImpl.class);
@@ -59,49 +59,56 @@
*/
private Map<String, List<String>> roles = new HashMap<String, List<String>>();
-
// MessagingComponent implementation ------------------------------------------
-
+
public void start()
- {
+ {
}
-
+
public void stop()
- {
+ {
users.clear();
-
+
roles.clear();
-
+
defaultUser = null;
}
-
+
public boolean isStarted()
{
return true;
}
// Public ---------------------------------------------------------------------
-
+
public boolean validateUser(final String user, final String password)
{
- if(user == null && defaultUser == null)
+ if (user == null && defaultUser == null)
{
return false;
}
+
User theUser = users.get(user == null ? defaultUser : user);
- return theUser != null && theUser.isValid(user == null ? defaultUser : user, password == null ? defaultUser : password);
+ boolean ok = theUser != null && theUser.isValid(user == null ? defaultUser : user, password == null ? defaultUser
+ : password);
+ return ok;
}
- public boolean validateUserAndRole(final String user, final String password, final Set<Role> roles, final CheckType checkType)
- {
+ public boolean validateUserAndRole(final String user,
+ final String password,
+ final Set<Role> roles,
+ final CheckType checkType)
+ {
if (validateUser(user, password))
{
List<String> availableRoles = this.roles.get(user == null ? defaultUser : user);
- if(availableRoles == null)
- {
+
+ if (availableRoles == null)
+ {
return false;
}
+
for (String availableRole : availableRoles)
{
if (roles != null)
@@ -109,13 +116,14 @@
for (Role role : roles)
{
if (role.getName().equals(availableRole) && checkType.hasRole(role))
- {
+ {
return true;
}
}
}
}
}
+
return false;
}
@@ -167,6 +175,7 @@
static class User
{
final String user;
+
final String password;
User(final String user, final String password)
@@ -177,12 +186,15 @@
public boolean equals(Object o)
{
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
- User user1 = (User) o;
+ User user1 = (User)o;
- if (!user.equals(user1.user)) return false;
+ if (!user.equals(user1.user))
+ return false;
return true;
}
Modified: trunk/src/main/org/jboss/messaging/core/server/Messaging.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/Messaging.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/server/Messaging.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -27,15 +27,7 @@
import javax.management.MBeanServer;
import org.jboss.messaging.core.config.Configuration;
-import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.management.ManagementService;
-import org.jboss.messaging.core.management.impl.ManagementServiceImpl;
-import org.jboss.messaging.core.persistence.StorageManager;
-import org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager;
-import org.jboss.messaging.core.persistence.impl.nullpm.NullStorageManager;
-import org.jboss.messaging.core.remoting.server.RemotingService;
-import org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl;
import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl;
import org.jboss.messaging.core.server.impl.MessagingServerImpl;
@@ -53,144 +45,58 @@
{
private static final Logger log = Logger.getLogger(Messaging.class);
- public static MessagingServer newNullStorageMessagingServer()
+ public static MessagingServer newMessagingServer(final Configuration config, boolean enablePersistence)
{
- return newNullStorageMessagingServer(new ConfigurationImpl());
- }
-
- public static MessagingServer newNullStorageMessagingServer(final Configuration config)
- {
- StorageManager storageManager = new NullStorageManager();
-
- RemotingService remotingService = new RemotingServiceImpl(config);
-
JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
- ManagementService managementService = new ManagementServiceImpl(ManagementFactory.getPlatformMBeanServer(),
- config.isJMXManagementEnabled());
+ MessagingServer server = newMessagingServer(config,
+ ManagementFactory.getPlatformMBeanServer(),
+ securityManager,
+ enablePersistence);
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new MessagingServerImpl();
-
- server.setConfiguration(config);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
return server;
}
- public static MessagingServer newMessagingServer(final Configuration config, final StorageManager storageManager)
+ public static MessagingServer newMessagingServer(final Configuration config)
{
- RemotingService remotingService = new RemotingServiceImpl(config);
+ return newMessagingServer(config, true);
+ }
+ public static MessagingServer newMessagingServer(final Configuration config,
+ final MBeanServer mbeanServer,
+ final boolean enablePersistence)
+ {
JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
- ManagementService managementService = new ManagementServiceImpl(ManagementFactory.getPlatformMBeanServer(),
- config.isJMXManagementEnabled());
+ MessagingServer server = newMessagingServer(config, mbeanServer, securityManager, true);
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new MessagingServerImpl();
-
- server.setConfiguration(config);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
return server;
}
- public static MessagingServer newNullStorageMessagingServer(final Configuration config, final MBeanServer mbeanServer)
+ public static MessagingServer newMessagingServer(final Configuration config, final MBeanServer mbeanServer)
{
- StorageManager storageManager = new NullStorageManager();
-
- RemotingService remotingService = new RemotingServiceImpl(config);
-
- JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
-
- ManagementService managementService = new ManagementServiceImpl(mbeanServer, config.isJMXManagementEnabled());
-
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new MessagingServerImpl();
-
- server.setConfiguration(config);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
- return server;
+ return newMessagingServer(config, mbeanServer, true);
}
- public static MessagingServer newMessagingServer(final Configuration config)
+ public static MessagingServer newMessagingServer(final Configuration config,
+ final MBeanServer mbeanServer,
+ final JBMSecurityManager securityManager)
{
- StorageManager storageManager = new JournalStorageManager(config);
+ MessagingServer server = newMessagingServer(config, mbeanServer, securityManager, true);
- RemotingService remotingService = new RemotingServiceImpl(config);
-
- JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
-
- ManagementService managementService = new ManagementServiceImpl(ManagementFactory.getPlatformMBeanServer(),
- config.isJMXManagementEnabled());
-
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new MessagingServerImpl();
-
- server.setConfiguration(config);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
return server;
}
- public static MessagingServer newMessagingServer(final Configuration config, final MBeanServer mbeanService)
+ public static MessagingServer newMessagingServer(final Configuration config,
+ final MBeanServer mbeanServer,
+ final JBMSecurityManager securityManager,
+ final boolean enablePersistence)
{
- StorageManager storageManager = new JournalStorageManager(config);
+ config.setEnablePersistence(enablePersistence);
- RemotingService remotingService = new RemotingServiceImpl(config);
+ MessagingServer server = new MessagingServerImpl(config, mbeanServer, securityManager);
- JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
-
- ManagementService managementService = new ManagementServiceImpl(mbeanService, config.isJMXManagementEnabled());
-
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new MessagingServerImpl();
-
- server.setConfiguration(config);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
return server;
}
+
}
Modified: trunk/src/main/org/jboss/messaging/core/server/MessagingServer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/MessagingServer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/server/MessagingServer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -15,16 +15,18 @@
import java.util.List;
import java.util.Set;
+import javax.management.MBeanServer;
+
import org.jboss.messaging.core.config.Configuration;
+import org.jboss.messaging.core.deployers.DeploymentManager;
import org.jboss.messaging.core.management.ManagementService;
-import org.jboss.messaging.core.management.MessagingServerControlMBean;
+import org.jboss.messaging.core.management.impl.MessagingServerControl;
import org.jboss.messaging.core.persistence.StorageManager;
import org.jboss.messaging.core.postoffice.PostOffice;
import org.jboss.messaging.core.remoting.Channel;
import org.jboss.messaging.core.remoting.RemotingConnection;
import org.jboss.messaging.core.remoting.impl.wireformat.CreateSessionResponseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.ReattachSessionResponseMessage;
-import org.jboss.messaging.core.remoting.impl.wireformat.replication.ReplicateRedistributionMessage;
import org.jboss.messaging.core.remoting.server.RemotingService;
import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.Role;
@@ -46,28 +48,24 @@
*/
public interface MessagingServer extends MessagingComponent
{
- void setConfiguration(Configuration configuration);
-
Configuration getConfiguration();
- void setRemotingService(RemotingService remotingService);
-
RemotingService getRemotingService();
- void setStorageManager(StorageManager storageManager);
-
StorageManager getStorageManager();
+ ManagementService getManagementService();
+
JBMSecurityManager getSecurityManager();
- void setSecurityManager(JBMSecurityManager securityManager);
+ MBeanServer getMBeanServer();
- ManagementService getManagementService();
+ Version getVersion();
- void setManagementService(ManagementService managementService);
+ MessagingServerControl getMessagingServerControl();
+
+ DeploymentManager getDeploymentManager();
- Version getVersion();
-
ReattachSessionResponseMessage reattachSession(RemotingConnection connection, String name, int lastReceivedCommandID) throws Exception;
CreateSessionResponseMessage createSession(String name,
@@ -106,8 +104,6 @@
boolean isStarted();
- MessagingServerControlMBean getServerManagement();
-
HierarchicalRepository<Set<Role>> getSecurityRepository();
HierarchicalRepository<AddressSettings> getAddressSettingsRepository();
@@ -116,23 +112,27 @@
PostOffice getPostOffice();
+ QueueFactory getQueueFactory();
+
ResourceManager getResourceManager();
List<ServerSession> getSessions(String connectionID);
ClusterManager getClusterManager();
- QueueFactory getQueueFactory();
-
SimpleString getNodeID();
Channel getReplicatingChannel();
-
+
void initialiseBackup(UUID nodeID, long currentMessageID) throws Exception;
-
+
boolean isInitialised();
-
- Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) throws Exception;
-
+
+ Queue createQueue(SimpleString address,
+ SimpleString queueName,
+ SimpleString filter,
+ boolean durable,
+ boolean temporary) throws Exception;
+
void handleReplicateRedistribution(final SimpleString queueName, final long messageID) throws Exception;
}
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -26,22 +26,34 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import javax.management.MBeanServer;
+
import org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl;
import org.jboss.messaging.core.config.Configuration;
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.cluster.DivertConfiguration;
import org.jboss.messaging.core.config.cluster.QueueConfiguration;
+import org.jboss.messaging.core.deployers.Deployer;
+import org.jboss.messaging.core.deployers.DeploymentManager;
+import org.jboss.messaging.core.deployers.impl.AddressSettingsDeployer;
+import org.jboss.messaging.core.deployers.impl.BasicUserCredentialsDeployer;
+import org.jboss.messaging.core.deployers.impl.FileDeploymentManager;
+import org.jboss.messaging.core.deployers.impl.QueueDeployer;
+import org.jboss.messaging.core.deployers.impl.SecurityDeployer;
import org.jboss.messaging.core.exception.MessagingException;
import org.jboss.messaging.core.filter.Filter;
import org.jboss.messaging.core.filter.impl.FilterImpl;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.management.ManagementService;
-import org.jboss.messaging.core.management.MessagingServerControlMBean;
+import org.jboss.messaging.core.management.impl.ManagementServiceImpl;
+import org.jboss.messaging.core.management.impl.MessagingServerControl;
import org.jboss.messaging.core.paging.PagingManager;
import org.jboss.messaging.core.paging.impl.PagingManagerImpl;
import org.jboss.messaging.core.paging.impl.PagingStoreFactoryNIO;
import org.jboss.messaging.core.persistence.QueueBindingInfo;
import org.jboss.messaging.core.persistence.StorageManager;
+import org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager;
+import org.jboss.messaging.core.persistence.impl.nullpm.NullStorageManager;
import org.jboss.messaging.core.postoffice.Binding;
import org.jboss.messaging.core.postoffice.DuplicateIDCache;
import org.jboss.messaging.core.postoffice.PostOffice;
@@ -57,6 +69,7 @@
import org.jboss.messaging.core.remoting.impl.wireformat.ReattachSessionResponseMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.replication.ReplicateStartupInfoMessage;
import org.jboss.messaging.core.remoting.server.RemotingService;
+import org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl;
import org.jboss.messaging.core.remoting.spi.Connection;
import org.jboss.messaging.core.remoting.spi.ConnectionLifeCycleListener;
import org.jboss.messaging.core.remoting.spi.ConnectorFactory;
@@ -114,10 +127,14 @@
private final Version version;
+ private final JBMSecurityManager securityManager;
+
+ private final Configuration configuration;
+
+ private final MBeanServer mbeanServer;
+
private volatile boolean started;
- // wired components
-
private SecurityStore securityStore;
private final HierarchicalRepository<AddressSettings> addressSettingsRepository = new HierarchicalObjectRepository<AddressSettings>();
@@ -138,12 +155,28 @@
private ResourceManager resourceManager;
- private MessagingServerControlMBean serverManagement;
+ private MessagingServerControl messagingServerControl;
+ private ClusterManager clusterManager;
+
+ private StorageManager storageManager;
+
+ private RemotingService remotingService;
+
+ private ManagementService managementService;
+
+ private DeploymentManager deploymentManager;
+
+ private Deployer basicUserCredentialsDeployer;
+
+ private Deployer addressSettingsDeployer;
+
+ private Deployer queueDeployer;
+
+ private Deployer securityDeployer;
+
private final Map<String, ServerSession> sessions = new ConcurrentHashMap<String, ServerSession>();
- private ClusterManager clusterManager;
-
private ConnectorFactory backupConnectorFactory;
private Map<String, Object> backupConnectorParams;
@@ -158,26 +191,37 @@
private boolean initialised;
- // plugins
+ // Constructors
+ // ---------------------------------------------------------------------------------
- private StorageManager storageManager;
+ public MessagingServerImpl(final Configuration configuration,
+ final MBeanServer mbeanServer,
+ final JBMSecurityManager securityManager)
+ {
+ if (configuration == null)
+ {
+ throw new NullPointerException("Must inject Configuration into MessagingServer constructor");
+ }
- private RemotingService remotingService;
+ if (mbeanServer == null)
+ {
+ throw new NullPointerException("Must inject MBeanServer into MessagingServer constructor");
+ }
- private JBMSecurityManager securityManager;
+ if (securityManager == null)
+ {
+ throw new NullPointerException("Must inject SecurityManager into MessagingServer constructor");
+ }
- private Configuration configuration;
+ // We need to hard code the version information into a source file
- private ManagementService managementService;
+ version = VersionLoader.getVersion();
- // Constructors
- // ---------------------------------------------------------------------------------
+ this.configuration = configuration;
- public MessagingServerImpl()
- {
- // We need to hard code the version information into a source file
+ this.mbeanServer = mbeanServer;
- version = VersionLoader.getVersion();
+ this.securityManager = securityManager;
}
// lifecycle methods
@@ -189,50 +233,19 @@
executorFactory = new org.jboss.messaging.utils.OrderedExecutorFactory(asyncDeliveryPool);
- /*
- * The following components are pluggable on the messaging server: Configuration, StorageManager, RemotingService,
- * SecurityManager and ManagementRegistration They must already be injected by the time the messaging server
- * starts It's up to the user to make sure the pluggable components are started - their lifecycle will not be
- * controlled here
- */
-
- // We make sure the pluggable components have been injected
- if (configuration == null)
+ if (configuration.isEnablePersistence())
{
- throw new IllegalStateException("Must inject Configuration before starting MessagingServer");
+ storageManager = new JournalStorageManager(configuration);
}
-
- if (storageManager == null)
+ else
{
- throw new IllegalStateException("Must inject StorageManager before starting MessagingServer");
+ storageManager = new NullStorageManager();
}
- if (remotingService == null)
- {
- throw new IllegalStateException("Must inject RemotingService before starting MessagingServer");
- }
-
- if (securityManager == null)
- {
- throw new IllegalStateException("Must inject SecurityManager before starting MessagingServer");
- }
-
- if (managementService == null)
- {
- throw new IllegalStateException("Must inject ManagementRegistration before starting MessagingServer");
- }
-
- configuration.start();
-
storageManager.start();
securityManager.start();
- managementService.start();
-
- // The rest of the components are not pluggable and created and started
- // here
-
initialised = !configuration.isBackup();
securityStore = new SecurityStoreImpl(configuration.getSecurityInvalidationInterval(),
@@ -277,6 +290,8 @@
managementService.setClusterPassword(configuration.getManagementClusterPassword());
managementService.setManagementRequestTimeout(configuration.getManagementRequestTimeout());
+ managementService.start();
+
List<QueueBindingInfo> queueBindingInfos = new ArrayList<QueueBindingInfo>();
storageManager.loadBindingJournal(queueBindingInfos);
@@ -293,14 +308,14 @@
storageManager.setPersistentID(uuid);
}
-
- nodeID = new SimpleString(uuid.toString());
+
+ nodeID = new SimpleString(uuid.toString());
}
}
else
{
UUID currentUUID = storageManager.getPersistentID();
-
+
if (currentUUID != null)
{
if (!currentUUID.equals(uuid))
@@ -313,18 +328,18 @@
storageManager.setPersistentID(uuid);
}
}
-
- serverManagement = managementService.registerServer(postOffice,
- storageManager,
- configuration,
- addressSettingsRepository,
- securityRepository,
- resourceManager,
- remotingService,
- this,
- queueFactory,
- configuration.isBackup());
+ messagingServerControl = managementService.registerServer(postOffice,
+ storageManager,
+ configuration,
+ addressSettingsRepository,
+ securityRepository,
+ resourceManager,
+ remotingService,
+ this,
+ queueFactory,
+ configuration.isBackup());
+
Map<Long, Queue> queues = new HashMap<Long, Queue>();
for (QueueBindingInfo queueBindingInfo : queueBindingInfos)
@@ -440,8 +455,33 @@
// This is the last thing done at the start, after everything else is up and running
pagingManager.startGlobalDepage();
+ // Start the deployers
+ if (configuration.isEnableFileDeployment())
+ {
+ basicUserCredentialsDeployer = new BasicUserCredentialsDeployer(deploymentManager, securityManager);
+
+ addressSettingsDeployer = new AddressSettingsDeployer(deploymentManager, addressSettingsRepository);
+
+ queueDeployer = new QueueDeployer(deploymentManager, configuration);
+
+ securityDeployer = new SecurityDeployer(deploymentManager, securityRepository);
+
+ basicUserCredentialsDeployer.start();
+
+ addressSettingsDeployer.start();
+
+ queueDeployer.start();
+
+ securityDeployer.start();
+ }
+
if (!configuration.isBackup())
- {
+ {
+ if (deploymentManager != null)
+ {
+ deploymentManager.start();
+ }
+
// Once we ready we can start the remoting service so we can start accepting connections
remotingService.start();
}
@@ -456,8 +496,18 @@
return;
}
+ remotingService = new RemotingServiceImpl(configuration);
+
remotingService.setMessagingServer(this);
+ managementService = new ManagementServiceImpl(mbeanServer, configuration.isJMXManagementEnabled());
+
+ if (configuration.isEnableFileDeployment())
+ {
+ // We need to create it now but not start it
+ deploymentManager = new FileDeploymentManager(configuration.getFileDeployerScanPeriod());
+ }
+
if (configuration.isBackup())
{
remotingService.start();
@@ -477,7 +527,7 @@
{
return;
}
-
+
if (clusterManager != null)
{
clusterManager.stop();
@@ -485,13 +535,25 @@
remotingService.stop();
+ // Stop the deployers
+ if (configuration.isEnableFileDeployment())
+ {
+ basicUserCredentialsDeployer.stop();
+
+ addressSettingsDeployer.stop();
+
+ queueDeployer.stop();
+
+ securityDeployer.stop();
+
+ deploymentManager.stop();
+ }
+
managementService.stop();
storageManager.stop();
securityManager.stop();
-
- configuration.stop();
asyncDeliveryPool.shutdown();
@@ -533,7 +595,7 @@
scheduledExecutor.shutdown();
queueFactory = null;
resourceManager = null;
- serverManagement = null;
+ messagingServerControl = null;
sessions.clear();
@@ -546,30 +608,14 @@
// MessagingServer implementation
// -----------------------------------------------------------
- // The plugabble components
-
- public void setConfiguration(final Configuration configuration)
- {
- if (started)
- {
- throw new IllegalStateException("Cannot set configuration when started");
- }
-
- this.configuration = configuration;
- }
-
public Configuration getConfiguration()
{
return configuration;
}
- public void setRemotingService(final RemotingService remotingService)
+ public MBeanServer getMBeanServer()
{
- if (started)
- {
- throw new IllegalStateException("Cannot set remoting server when started");
- }
- this.remotingService = remotingService;
+ return mbeanServer;
}
public RemotingService getRemotingService()
@@ -577,61 +623,36 @@
return remotingService;
}
- public void setStorageManager(final StorageManager storageManager)
- {
- if (started)
- {
- throw new IllegalStateException("Cannot set storage manager when started");
- }
- this.storageManager = storageManager;
- }
-
public StorageManager getStorageManager()
{
return storageManager;
}
- public void setSecurityManager(final JBMSecurityManager securityManager)
- {
- if (started)
- {
- throw new IllegalStateException("Cannot set security Manager when started");
- }
-
- this.securityManager = securityManager;
- }
-
public JBMSecurityManager getSecurityManager()
{
return securityManager;
}
- public void setManagementService(final ManagementService managementService)
- {
- if (started)
- {
- throw new IllegalStateException("Cannot set management server when started");
- }
- this.managementService = managementService;
- }
-
public ManagementService getManagementService()
{
return managementService;
}
- // This is needed for the security deployer
public HierarchicalRepository<Set<Role>> getSecurityRepository()
{
return securityRepository;
}
- // This is needed for the queue settings deployer
public HierarchicalRepository<AddressSettings> getAddressSettingsRepository()
{
return addressSettingsRepository;
}
+ public DeploymentManager getDeploymentManager()
+ {
+ return deploymentManager;
+ }
+
public ResourceManager getResourceManager()
{
return resourceManager;
@@ -670,7 +691,7 @@
}
configuration.setBackup(false);
-
+
if (clusterManager != null)
{
clusterManager.activate();
@@ -857,9 +878,9 @@
this.uuid = theUUID;
this.nodeID = new SimpleString(uuid.toString());
-
+
doStart();
-
+
if (currentMessageID != this.storageManager.getCurrentUniqueID())
{
throw new IllegalStateException("Backup node current id sequence != live node current id sequence " + this.storageManager.getCurrentUniqueID() +
@@ -869,12 +890,19 @@
initialised = true;
+ // Now we can start the deploymentManager
+
+ if (deploymentManager != null)
+ {
+ deploymentManager.start();
+ }
+
log.info("Backup server is now operational");
}
}
public Channel getReplicatingChannel()
- {
+ {
synchronized (replicatingChannelLock)
{
if (replicatingChannel == null && backupConnectorFactory != null)
@@ -937,9 +965,9 @@
return replicatingChannel;
}
- public MessagingServerControlMBean getServerManagement()
+ public MessagingServerControl getMessagingServerControl()
{
- return serverManagement;
+ return messagingServerControl;
}
public int getConnectionCount()
@@ -984,8 +1012,6 @@
final Queue queue = queueFactory.createQueue(-1, address, queueName, filter, durable, temporary);
- // The unique name is given by the concatenation of the node id and the queue name - this is because it must be
- // unique *across the entire cluster*
binding = new LocalQueueBinding(address, queue, nodeID);
if (durable)
@@ -997,9 +1023,8 @@
return queue;
}
-
- public void handleReplicateRedistribution(final SimpleString queueName, final long messageID)
- throws Exception
+
+ public void handleReplicateRedistribution(final SimpleString queueName, final long messageID) throws Exception
{
Binding binding = postOffice.getBinding(queueName);
@@ -1009,18 +1034,18 @@
}
Queue queue = (Queue)binding.getBindable();
-
+
MessageReference reference = queue.removeFirstReference(messageID);
-
+
Transaction tx = new TransactionImpl(storageManager);
boolean routed = postOffice.redistribute(reference.getMessage(), queue.getName(), tx);
if (routed)
- {
+ {
queue.acknowledge(tx, reference);
- tx.commit();
+ tx.commit();
}
else
{
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -963,7 +963,7 @@
});
}
}
-
+
public void handleSend(final SessionSendMessage packet)
{
if (replicatingChannel == null)
Modified: trunk/src/main/org/jboss/messaging/integration/security/JAASSecurityManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/security/JAASSecurityManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/integration/security/JAASSecurityManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -131,7 +131,32 @@
}
return authenticated;
}
+
+ public void addRole(String user, String role)
+ {
+ // NO-OP
+ }
+ public void addUser(String user, String password)
+ {
+ // NO-OP
+ }
+
+ public void removeRole(String user, String role)
+ {
+ // NO-OP
+ }
+
+ public void removeUser(String user)
+ {
+ // NO-OP
+ }
+
+ public void setDefaultUser(String username)
+ {
+ // NO-OP
+ }
+
// MessagingComponent implementation -----------------------------
/**
@@ -176,7 +201,7 @@
Subject subject = new Subject();
- if(user != null)
+ if (user != null)
{
subject.getPrincipals().add(principal);
}
@@ -281,4 +306,6 @@
}
}
+
+
}
Modified: trunk/src/main/org/jboss/messaging/integration/security/JBossASSecurityManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/security/JBossASSecurityManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/integration/security/JBossASSecurityManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -120,7 +120,32 @@
}
return authenticated;
}
+
+ public void addRole(String user, String role)
+ {
+ // NO-OP
+ }
+ public void addUser(String user, String password)
+ {
+ // NO-OP
+ }
+
+ public void removeRole(String user, String role)
+ {
+ // NO-OP
+ }
+
+ public void removeUser(String user)
+ {
+ // NO-OP
+ }
+
+ public void setDefaultUser(String username)
+ {
+ // NO-OP
+ }
+
private Set<Principal> getRolePrincipals(final CheckType checkType, final Set<Role> roles)
{
Set<Principal> principals = new HashSet<Principal>();
Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -33,7 +33,7 @@
*/
public class JMSServerDeployer extends XmlDeployer
{
- Logger log = Logger.getLogger(JMSServerDeployer.class);
+ private static final Logger log = Logger.getLogger(JMSServerDeployer.class);
private final Configuration configuration;
@@ -99,17 +99,15 @@
private static final String DISCOVERY_INITIAL_WAIT_ELEMENT = "discovery-initial-wait";
- public JMSServerDeployer(final DeploymentManager deploymentManager, final Configuration config)
+ public JMSServerDeployer(final JMSServerManager jmsServerManager, final DeploymentManager deploymentManager, final Configuration config)
{
super(deploymentManager);
+
+ this.jmsServerManager = jmsServerManager;
this.configuration = config;
}
- public void setJmsServerManager(final JMSServerManager jmsServerManager)
- {
- this.jmsServerManager = jmsServerManager;
- }
/**
* the names of the elements to deploy
Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -24,22 +24,29 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import javax.management.NotificationBroadcasterSupport;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
+import org.jboss.messaging.core.config.Configuration;
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.config.cluster.DiscoveryGroupConfiguration;
+import org.jboss.messaging.core.deployers.Deployer;
+import org.jboss.messaging.core.deployers.DeploymentManager;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.management.MessagingServerControlMBean;
-import org.jboss.messaging.core.management.impl.MessagingServerControl;
-import org.jboss.messaging.core.messagecounter.impl.MessageCounterManagerImpl;
+import org.jboss.messaging.core.persistence.StorageManager;
+import org.jboss.messaging.core.postoffice.Binding;
+import org.jboss.messaging.core.postoffice.PostOffice;
import org.jboss.messaging.core.server.MessagingServer;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.settings.HierarchicalRepository;
+import org.jboss.messaging.core.settings.impl.AddressSettings;
import org.jboss.messaging.jms.JBossQueue;
import org.jboss.messaging.jms.JBossTopic;
import org.jboss.messaging.jms.client.JBossConnectionFactory;
@@ -54,11 +61,12 @@
*
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
* @author <a href="jmesnil at redhat.com">Jeff Mesnil</a>
+ * @author <a href="tim.fox at jboss.com">Tim Fox</a>
*/
public class JMSServerManagerImpl implements JMSServerManager
{
private static final Logger log = Logger.getLogger(JMSServerManagerImpl.class);
-
+
private static final String REJECT_FILTER = "__JBMX=-1";
/**
@@ -72,35 +80,28 @@
private final Map<String, List<String>> connectionFactoryBindings = new HashMap<String, List<String>>();
- private final MessagingServerControlMBean messagingServer;
+ private final MessagingServer server;
private final JMSManagementService managementService;
- public static JMSServerManagerImpl newJMSServerManagerImpl(final MessagingServer server) throws Exception
+ private Deployer jmsDeployer;
+
+ private boolean started;
+
+ public JMSServerManagerImpl(final MessagingServer server)
{
- MessagingServerControlMBean control = new MessagingServerControl(server.getPostOffice(),
- server.getStorageManager(),
- server.getConfiguration(),
- server.getResourceManager(),
- server.getRemotingService(),
- server,
- new MessageCounterManagerImpl(),
- new NotificationBroadcasterSupport(),
- server.getQueueFactory());
- JMSManagementService jmsManagementService = new JMSManagementServiceImpl(server.getManagementService());
- return new JMSServerManagerImpl(control,
- jmsManagementService);
+ this.server = server;
+
+ managementService = new JMSManagementServiceImpl(server.getManagementService());
}
- public JMSServerManagerImpl(final MessagingServerControlMBean server,
- final JMSManagementService managementService)
+ public synchronized void start() throws Exception
{
- messagingServer = server;
- this.managementService = managementService;
- }
+ if (started)
+ {
+ return;
+ }
- public void start() throws Exception
- {
try
{
context = new InitialContext();
@@ -110,35 +111,66 @@
log.error("Unable to create Initial Context", e);
}
managementService.registerJMSServer(this);
+
+ // The deployment manager is started in the core server - this is necessary since
+ // we can't start any deployments until backup server is initialised
+ DeploymentManager deploymentManager = server.getDeploymentManager();
+
+ log.info("deployment manager is " + deploymentManager);
+
+ jmsDeployer = new JMSServerDeployer(this, deploymentManager, server.getConfiguration());
+
+ jmsDeployer.start();
+ started = true;
}
-
+
// MessagingComponent implementation -----------------------------------
-
- public void stop()
- {
+
+ public synchronized void stop() throws Exception
+ {
+ if (!started)
+ {
+ return;
+ }
+ jmsDeployer.stop();
+ for (String destination : destinations.keySet())
+ {
+ undeployDestination(destination);
+ }
+ for (String connectionFactory : new HashSet<String>(connectionFactories.keySet()))
+ {
+ destroyConnectionFactory(connectionFactory);
+ }
+ destinations.clear();
+ connectionFactories.clear();
+ connectionFactoryBindings.clear();
+ context.close();
+ started = false;
}
-
+
public boolean isStarted()
{
- return messagingServer.isStarted();
+ return server.getMessagingServerControl().isStarted();
}
// JMSServerManager implementation -------------------------------
-
+
public void setContext(final Context context)
{
this.context = context;
}
-
+
public String getVersion()
{
- return messagingServer.getVersion();
+ checkInitialised();
+ return server.getMessagingServerControl().getVersion();
}
public synchronized boolean createQueue(final String queueName, final String jndiBinding) throws Exception
{
+ checkInitialised();
JBossQueue jBossQueue = new JBossQueue(queueName);
- messagingServer.createQueue(jBossQueue.getAddress(), jBossQueue.getAddress());
+ server.getMessagingServerControl().createQueue(jBossQueue.getAddress(), jBossQueue.getAddress());
boolean added = bindToJndi(jndiBinding, jBossQueue);
if (added)
{
@@ -151,10 +183,11 @@
public synchronized boolean createTopic(final String topicName, final String jndiBinding) throws Exception
{
+ checkInitialised();
JBossTopic jBossTopic = new JBossTopic(topicName);
//We create a dummy subscription on the topic, that never receives messages - this is so we can perform JMS checks when routing messages to a topic that
//does not exist - otherwise we would not be able to distinguish from a non existent topic and one with no subscriptions - core has no notion of a topic
- messagingServer.createQueue(jBossTopic.getAddress(), jBossTopic.getAddress(), REJECT_FILTER, true);
+ server.getMessagingServerControl().createQueue(jBossTopic.getAddress(), jBossTopic.getAddress(), REJECT_FILTER, true);
boolean added = bindToJndi(jndiBinding, jBossTopic);
if (added)
{
@@ -166,6 +199,7 @@
public synchronized boolean undeployDestination(final String name) throws Exception
{
+ checkInitialised();
List<String> jndiBindings = destinations.get(name);
if (jndiBindings == null || jndiBindings.size() == 0)
{
@@ -180,52 +214,55 @@
public synchronized boolean destroyQueue(final String name) throws Exception
{
+ checkInitialised();
undeployDestination(name);
destinations.remove(name);
managementService.unregisterQueue(name);
- messagingServer.destroyQueue(JBossQueue.createAddressFromName(name).toString());
+ server.getMessagingServerControl().destroyQueue(JBossQueue.createAddressFromName(name).toString());
return true;
}
public synchronized boolean destroyTopic(final String name) throws Exception
{
+ checkInitialised();
undeployDestination(name);
destinations.remove(name);
managementService.unregisterTopic(name);
- messagingServer.destroyQueue(JBossTopic.createAddressFromName(name).toString());
+ server.getMessagingServerControl().destroyQueue(JBossTopic.createAddressFromName(name).toString());
return true;
}
public synchronized boolean createConnectionFactory(final String name,
- final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
- final String connectionLoadBalancingPolicyClassName,
- final long pingPeriod,
- final long connectionTTL,
- final long callTimeout,
- final String clientID,
- final int dupsOKBatchSize,
- final int transactionBatchSize,
- final int consumerWindowSize,
- final int consumerMaxRate,
- final int sendWindowSize,
- final int producerMaxRate,
- final int minLargeMessageSize,
- final boolean blockOnAcknowledge,
- final boolean blockOnNonPersistentSend,
- final boolean blockOnPersistentSend,
- final boolean autoGroup,
- final int maxConnections,
- final boolean preAcknowledge,
- final long retryInterval,
- final double retryIntervalMultiplier,
- final int reconnectAttempts,
- final boolean failoverOnNodeShutdown,
- final List<String> jndiBindings) throws Exception
+ final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
+ final String connectionLoadBalancingPolicyClassName,
+ final long pingPeriod,
+ final long connectionTTL,
+ final long callTimeout,
+ final String clientID,
+ final int dupsOKBatchSize,
+ final int transactionBatchSize,
+ final int consumerWindowSize,
+ final int consumerMaxRate,
+ final int sendWindowSize,
+ final int producerMaxRate,
+ final int minLargeMessageSize,
+ final boolean blockOnAcknowledge,
+ final boolean blockOnNonPersistentSend,
+ final boolean blockOnPersistentSend,
+ final boolean autoGroup,
+ final int maxConnections,
+ final boolean preAcknowledge,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final int reconnectAttempts,
+ final boolean failoverOnNodeShutdown,
+ final List<String> jndiBindings) throws Exception
{
+ checkInitialised();
JBossConnectionFactory cf = connectionFactories.get(name);
if (cf == null)
{
@@ -247,9 +284,9 @@
blockOnPersistentSend,
autoGroup,
maxConnections,
- preAcknowledge,
+ preAcknowledge,
retryInterval,
- retryIntervalMultiplier,
+ retryIntervalMultiplier,
reconnectAttempts,
failoverOnNodeShutdown);
}
@@ -263,6 +300,7 @@
final List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
final List<String> jndiBindings) throws Exception
{
+ checkInitialised();
JBossConnectionFactory cf = connectionFactories.get(name);
if (cf == null)
{
@@ -273,19 +311,24 @@
return true;
}
-
+
public synchronized boolean createConnectionFactory(String name,
- List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
- boolean blockOnAcknowledge,
- boolean blockOnNonPersistentSend,
- boolean blockOnPersistentSend,
- boolean preAcknowledge,
- List<String> jndiBindings) throws Exception
+ List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs,
+ boolean blockOnAcknowledge,
+ boolean blockOnNonPersistentSend,
+ boolean blockOnPersistentSend,
+ boolean preAcknowledge,
+ List<String> jndiBindings) throws Exception
{
+ checkInitialised();
JBossConnectionFactory cf = connectionFactories.get(name);
if (cf == null)
{
- cf = new JBossConnectionFactory(connectorConfigs, blockOnAcknowledge, blockOnNonPersistentSend, blockOnPersistentSend, preAcknowledge);
+ cf = new JBossConnectionFactory(connectorConfigs,
+ blockOnAcknowledge,
+ blockOnNonPersistentSend,
+ blockOnPersistentSend,
+ preAcknowledge);
}
bindConnectionFactory(cf, name, jndiBindings);
@@ -294,32 +337,33 @@
}
public synchronized boolean createConnectionFactory(final String name,
- final DiscoveryGroupConfiguration discoveryGroupConfig,
- final long discoveryInitialWait,
- final String connectionLoadBalancingPolicyClassName,
- final long pingPeriod,
- final long connectionTTL,
- final long callTimeout,
- final String clientID,
- final int dupsOKBatchSize,
- final int transactionBatchSize,
- final int consumerWindowSize,
- final int consumerMaxRate,
- final int sendWindowSize,
- final int producerMaxRate,
- final int minLargeMessageSize,
- final boolean blockOnAcknowledge,
- final boolean blockOnNonPersistentSend,
- final boolean blockOnPersistentSend,
- final boolean autoGroup,
- final int maxConnections,
- final boolean preAcknowledge,
- final long retryInterval,
- final double retryIntervalMultiplier,
- final int reconnectAttempts,
- final boolean failoverOnNodeShutdown,
- final List<String> jndiBindings) throws Exception
+ final DiscoveryGroupConfiguration discoveryGroupConfig,
+ final long discoveryInitialWait,
+ final String connectionLoadBalancingPolicyClassName,
+ final long pingPeriod,
+ final long connectionTTL,
+ final long callTimeout,
+ final String clientID,
+ final int dupsOKBatchSize,
+ final int transactionBatchSize,
+ final int consumerWindowSize,
+ final int consumerMaxRate,
+ final int sendWindowSize,
+ final int producerMaxRate,
+ final int minLargeMessageSize,
+ final boolean blockOnAcknowledge,
+ final boolean blockOnNonPersistentSend,
+ final boolean blockOnPersistentSend,
+ final boolean autoGroup,
+ final int maxConnections,
+ final boolean preAcknowledge,
+ final long retryInterval,
+ final double retryIntervalMultiplier,
+ final int reconnectAttempts,
+ final boolean failoverOnNodeShutdown,
+ final List<String> jndiBindings) throws Exception
{
+ checkInitialised();
JBossConnectionFactory cf = connectionFactories.get(name);
if (cf == null)
{
@@ -344,9 +388,9 @@
blockOnPersistentSend,
autoGroup,
maxConnections,
- preAcknowledge,
+ preAcknowledge,
retryInterval,
- retryIntervalMultiplier,
+ retryIntervalMultiplier,
reconnectAttempts,
failoverOnNodeShutdown);
}
@@ -358,6 +402,7 @@
public synchronized boolean destroyConnectionFactory(final String name) throws Exception
{
+ checkInitialised();
List<String> jndiBindings = connectionFactoryBindings.get(name);
if (jndiBindings == null || jndiBindings.size() == 0)
{
@@ -371,7 +416,7 @@
}
catch (NameNotFoundException e)
{
- //this is ok.
+ // this is ok.
}
}
connectionFactoryBindings.remove(name);
@@ -384,33 +429,45 @@
public String[] listRemoteAddresses() throws Exception
{
- return messagingServer.listRemoteAddresses();
+ checkInitialised();
+ return server.getMessagingServerControl().listRemoteAddresses();
}
public String[] listRemoteAddresses(final String ipAddress) throws Exception
{
- return messagingServer.listRemoteAddresses(ipAddress);
+ checkInitialised();
+ return server.getMessagingServerControl().listRemoteAddresses(ipAddress);
}
public boolean closeConnectionsForAddress(final String ipAddress) throws Exception
{
- return messagingServer.closeConnectionsForAddress(ipAddress);
+ checkInitialised();
+ return server.getMessagingServerControl().closeConnectionsForAddress(ipAddress);
}
public String[] listConnectionIDs() throws Exception
{
- return messagingServer.listConnectionIDs();
+ return server.getMessagingServerControl().listConnectionIDs();
}
public String[] listSessions(final String connectionID) throws Exception
{
- return messagingServer.listSessions(connectionID);
+ checkInitialised();
+ return server.getMessagingServerControl().listSessions(connectionID);
}
// Public --------------------------------------------------------
// Private -------------------------------------------------------
+ private void checkInitialised()
+ {
+ if (!server.isInitialised())
+ {
+ throw new IllegalStateException("Cannot access JMS Server, core server is not yet initialised");
+ }
+ }
+
private void bindConnectionFactory(final JBossConnectionFactory cf,
final String name,
final List<String> jndiBindings) throws Exception
Modified: trunk/src/schemas/jbm-configuration.xsd
===================================================================
--- trunk/src/schemas/jbm-configuration.xsd 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/src/schemas/jbm-configuration.xsd 2009-04-09 18:09:20 UTC (rev 6383)
@@ -24,6 +24,10 @@
<xsd:sequence>
<xsd:element ref="clustered" maxOccurs="1"
minOccurs="0" />
+ <xsd:element ref="enable-file-deployment" maxOccurs="1"
+ minOccurs="0" />
+ <xsd:element ref="enable-persistence" maxOccurs="1"
+ minOccurs="0" />
<xsd:element name="scheduled-max-pool-size"
type="xsd:int" maxOccurs="1" minOccurs="0">
<xsd:annotation>
@@ -180,6 +184,10 @@
</xsd:element>
<xsd:element name="clustered" type="xsd:boolean"></xsd:element>
+
+ <xsd:element name="enable-file-deployment" type="xsd:boolean"></xsd:element>
+
+ <xsd:element name="enable-persistence" type="xsd:boolean"></xsd:element>
<xsd:element name="local-bind-address" type="xsd:string"></xsd:element>
Modified: trunk/tests/config/ConfigurationTest-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-config.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/config/ConfigurationTest-config.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,6 +1,7 @@
<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:messaging ../../src/schemas/jbm-configuration.xsd ">
<configuration>
<clustered>true</clustered>
+ <enable-file-deployment>true</enable-file-deployment>
<scheduled-max-pool-size>12345</scheduled-max-pool-size>
<security-enabled>false</security-enabled>
<security-invalidation-interval>5423</security-invalidation-interval>
Modified: trunk/tests/config/ConfigurationTest-full-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-full-config.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/config/ConfigurationTest-full-config.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,6 +1,7 @@
<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:messaging ../../src/schemas/jbm-configuration.xsd ">
<configuration>
<clustered>true</clustered>
+ <enable-file-deployment>true</enable-file-deployment>
<scheduled-max-pool-size>12345</scheduled-max-pool-size>
<security-enabled>false</security-enabled>
<security-invalidation-interval>5423</security-invalidation-interval>
Deleted: trunk/tests/jms-tests/config/connection-factory-http.xml
===================================================================
--- trunk/tests/jms-tests/config/connection-factory-http.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/config/connection-factory-http.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Messaging Connection Factories deployment descriptor for HTTP.
-
- $Id$
- -->
-
-<server>
-
-
- <mbean code="org.jboss.messaging.jms.server.connectionfactory.ConnectionFactory"
- name="jboss.messaging.destination:service=HTTPConnectionFactory"
- xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=http</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
-
- <attribute name="JNDIBindings">
- <bindings>
- <binding>/HTTPConnectionFactory</binding>
- <binding>/HTTPXAConnectionFactory</binding>
- <binding>java:/HTTPConnectionFactory</binding>
- <binding>java:/HTTPXAConnectionFactory</binding>
- </bindings>
- </attribute>
-
- <attribute name="SupportsFailover">true</attribute>
- <attribute name="SupportsLoadBalancing">true</attribute>
- </mbean>
-
-</server>
\ No newline at end of file
Deleted: trunk/tests/jms-tests/config/database-clearer.xml
===================================================================
--- trunk/tests/jms-tests/config/database-clearer.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/config/database-clearer.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="DatabaseClearer" class="org.jboss.test.messaging.tools.container.DatabaseClearer">
- <property name="dataSource"><inject bean="jbm:DataSource"/></property>
- <property name="transactionManager"><inject bean="jbm:TransactionManager"/></property>
- </bean>
-</deployment>
\ No newline at end of file
Deleted: trunk/tests/jms-tests/config/datasource.xml
===================================================================
--- trunk/tests/jms-tests/config/datasource.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/config/datasource.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <!--<bean name="jboss.jca:name=DefaultDS,service=DataSourceBinding" class="org.hsqldb.jdbc.jdbcDataSource">
- <property name="database">jdbc:hsqldb:file:myHSQLDBInstance</property>
- <property name="user">sa</property>
- </bean>-->
- <bean name="jbm:DataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
- <property name="url">jdbc:mysql://localhost/messaging</property>
- <property name="user">sa</property>
- </bean>
-</deployment>
\ No newline at end of file
Deleted: trunk/tests/jms-tests/config/poison.xml
===================================================================
--- trunk/tests/jms-tests/config/poison.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/config/poison.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE aop PUBLIC
- "-//JBoss//DTD JBOSS AOP 1.0//EN"
- "http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd">
-<aop>
-
- <interceptor class="org.jboss.test.messaging.tools.aop.PoisonInterceptor" scope="PER_VM"/>
-
- <bind pointcut="execution(* org.jboss.messaging.jms.server.endpoint.advised.ConnectionAdvised->*(..))">
- <interceptor-ref name="org.jboss.test.messaging.tools.aop.PoisonInterceptor"/>
- </bind>
-
- <bind pointcut="execution(* org.jboss.messaging.jms.server.endpoint.advised.SessionAdvised->*(..))">
- <interceptor-ref name="org.jboss.test.messaging.tools.aop.PoisonInterceptor"/>
- </bind>
-
- <bind pointcut="execution(* org.jboss.messaging.jms.server.endpoint.advised.ConnectionFactoryAdvised->*(..))">
- <interceptor-ref name="org.jboss.test.messaging.tools.aop.PoisonInterceptor"/>
- </bind>
-
-</aop>
\ No newline at end of file
Deleted: trunk/tests/jms-tests/config/transaction-manager.xml
===================================================================
--- trunk/tests/jms-tests/config/transaction-manager.xml 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/config/transaction-manager.xml 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="jbm:TransactionManager"
- class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
-</deployment>
\ No newline at end of file
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMServerTestCase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -258,7 +258,7 @@
public String[] getContainerConfig()
{
- return new String[]{ "invm-beans.xml", "AS/config/jbm-jboss-beans.xml"};
+ return new String[]{ "invm-beans.xml", "AS/config/jbm-jboss-beans.xml"};
}
protected MessagingServer getJmsServer() throws Exception
@@ -422,7 +422,7 @@
protected static void assertActiveConnectionsOnTheServer(int expectedSize)
throws Exception
{
- assertEquals(expectedSize, servers.get(0).getMessagingServer().getServerManagement().getConnectionCount());
+ assertEquals(expectedSize, servers.get(0).getMessagingServer().getMessagingServerControl().getConnectionCount());
}
public static void deployConnectionFactory(String clientId, String objectName,
Modified: trunk/tests/joram-tests/src/org/jboss/test/jms/SpawnedJMSServer.java
===================================================================
--- trunk/tests/joram-tests/src/org/jboss/test/jms/SpawnedJMSServer.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/joram-tests/src/org/jboss/test/jms/SpawnedJMSServer.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -75,10 +75,10 @@
Configuration conf = new ConfigurationImpl();
conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
conf.setSecurityEnabled(false);
- final MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ final MessagingServer server = Messaging.newMessagingServer(conf);
server.start();
- JMSServerManager serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ JMSServerManager serverManager = new JMSServerManagerImpl(server);
serverManager.start();
Hashtable<String, String> env = new Hashtable<String, String>();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/DuplicateDetectionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/DuplicateDetectionTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/DuplicateDetectionTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1814,7 +1814,7 @@
conf.setIDCacheSize(cacheSize);
- messagingService = Messaging.newNullStorageMessagingServer(conf);
+ messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/String64KLimitTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/String64KLimitTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/String64KLimitTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -212,7 +212,7 @@
Configuration config = new ConfigurationImpl();
config.setSecurityEnabled(false);
- server = Messaging.newNullStorageMessagingServer(config);
+ server = Messaging.newMessagingServer(config, false);
server.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientConsumerCloseTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientConsumerCloseTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientConsumerCloseTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -109,7 +109,7 @@
Configuration config = new ConfigurationImpl();
config.setSecurityEnabled(false);
- server = Messaging.newNullStorageMessagingServer(config);
+ server = Messaging.newMessagingServer(config, false);
server.start();
SimpleString address = randomSimpleString();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientProducerCloseTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientProducerCloseTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientProducerCloseTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -87,7 +87,7 @@
Configuration config = new ConfigurationImpl();
config.setSecurityEnabled(false);
- server = Messaging.newNullStorageMessagingServer(config);
+ server = Messaging.newMessagingServer(config, false);
server.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientRequestorTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientRequestorTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientRequestorTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -226,7 +226,7 @@
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(false);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- service = Messaging.newNullStorageMessagingServer(conf);
+ service = Messaging.newMessagingServer(conf, false);
service.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionCloseTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionCloseTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionCloseTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -269,7 +269,7 @@
Configuration config = new ConfigurationImpl();
config.setSecurityEnabled(false);
- server = Messaging.newNullStorageMessagingServer(config);
+ server = Messaging.newMessagingServer(config, false);
server.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ClientSessionFactoryTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -640,7 +640,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -677,7 +677,7 @@
bcConfigs1.add(bcConfig1);
liveConf.setBroadcastGroupConfigurations(bcConfigs1);
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/CoreClientTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/CoreClientTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -75,7 +75,7 @@
conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactoryClassName));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/DeadLetterAddressTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/DeadLetterAddressTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/DeadLetterAddressTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -394,7 +394,7 @@
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
//start the server
server.start();
//then we create a client as normal
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/ExpiryAddressTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/ExpiryAddressTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/ExpiryAddressTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -327,7 +327,7 @@
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
// start the server
server.start();
// then we create a client as normal
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/HeuristicXATest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/HeuristicXATest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/HeuristicXATest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -73,7 +73,7 @@
Configuration configuration = createDefaultConfig();
configuration.setJMXManagementEnabled(true);
- MessagingServer server = createService(false,
+ MessagingServer server = createServer(false,
configuration,
mbeanServer,
new HashMap<String, AddressSettings>());
@@ -111,7 +111,7 @@
Configuration configuration = createDefaultConfig();
configuration.setJMXManagementEnabled(true);
- MessagingServer server = createService(false,
+ MessagingServer server = createServer(false,
configuration,
mbeanServer,
new HashMap<String, AddressSettings>());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/MessageGroupingTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/MessageGroupingTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/MessageGroupingTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -554,7 +554,7 @@
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
// start the server
server.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/MessagePriorityTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/MessagePriorityTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/MessagePriorityTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -223,7 +223,7 @@
Configuration config = new ConfigurationImpl();
config.setSecurityEnabled(false);
- server = Messaging.newNullStorageMessagingServer(config);
+ server = Messaging.newMessagingServer(config, false);
server.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/WildCardRoutingTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/WildCardRoutingTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/WildCardRoutingTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -771,7 +771,7 @@
configuration.setTransactionTimeoutScanPeriod(500);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
//start the server
server.start();
server.getManagementService().enableNotifications(false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -73,7 +73,7 @@
protected void assertActiveConnections(int expectedActiveConnections) throws Exception
{
- assertEquals(expectedActiveConnections, server.getServerManagement().getConnectionCount());
+ assertEquals(expectedActiveConnections, server.getMessagingServerControl().getConnectionCount());
}
protected void assertActiveSession(int expectedActiveSession) throws Exception
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/bridge/BridgeTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/bridge/BridgeTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -82,7 +82,7 @@
serviceConf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
params));
- MessagingServer service = Messaging.newNullStorageMessagingServer(serviceConf);
+ MessagingServer service = Messaging.newMessagingServer(serviceConf, false);
return service;
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/distribution/ClusterTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/distribution/ClusterTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -914,7 +914,7 @@
}
else
{
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
}
servers[node] = server;
}
@@ -1040,7 +1040,7 @@
}
else
{
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
}
servers[node] = server;
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ActivationTimeoutTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ActivationTimeoutTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ActivationTimeoutTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -270,7 +270,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -283,7 +283,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailBackupServerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailBackupServerTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailBackupServerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -229,7 +229,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -242,7 +242,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverExpiredMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverExpiredMessageTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverExpiredMessageTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -264,7 +264,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -278,7 +278,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverManagementTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverManagementTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverManagementTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -268,7 +268,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -281,7 +281,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverNoSessionsFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverNoSessionsFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverNoSessionsFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -190,7 +190,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -203,7 +203,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverPreAcknowledgeTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverPreAcknowledgeTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverPreAcknowledgeTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -171,7 +171,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -184,7 +184,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverScheduledMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverScheduledMessageTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverScheduledMessageTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -191,7 +191,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -204,7 +204,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailoverTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -132,7 +132,7 @@
}
else
{
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
}
backupServer.start();
@@ -173,7 +173,7 @@
}
else
{
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
}
AddressSettings settings = new AddressSettings();
@@ -216,7 +216,7 @@
}
else
{
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
}
backupServer.start();
@@ -267,10 +267,10 @@
}
else
{
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
}
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureListenerOnFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureListenerOnFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureListenerOnFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -483,7 +483,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -497,7 +497,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureOnCreateConnectionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureOnCreateConnectionTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/FailureOnCreateConnectionTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -96,7 +96,7 @@
liveConf.setSecurityEnabled(false);
liveConf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- service = Messaging.newNullStorageMessagingServer(liveConf);
+ service = Messaging.newMessagingServer(liveConf, false);
service.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/MultiThreadRandomFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -40,7 +40,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -54,7 +54,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/NettyMultiThreadRandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/NettyMultiThreadRandomFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/NettyMultiThreadRandomFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -56,7 +56,7 @@
.add(new TransportConfiguration("org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -72,7 +72,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/PagingFailoverMultiThreadTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/PagingFailoverMultiThreadTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/PagingFailoverMultiThreadTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -390,7 +390,7 @@
}
else
{
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
}
backupService.start();
@@ -431,7 +431,7 @@
}
else
{
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
}
AddressSettings settings = new AddressSettings();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/RandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/RandomFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/RandomFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1438,7 +1438,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -1452,7 +1452,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -570,7 +570,7 @@
liveConf.setSecurityEnabled(false);
liveConf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- service = Messaging.newNullStorageMessagingServer(liveConf);
+ service = Messaging.newMessagingServer(liveConf, false);
service.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectWithBackupTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectWithBackupTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReconnectWithBackupTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -279,7 +279,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -293,7 +293,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReplicateConnectionFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReplicateConnectionFailureTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/ReplicateConnectionFailureTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -176,7 +176,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -191,7 +191,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleAutomaticFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleAutomaticFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleAutomaticFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -828,7 +828,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -842,7 +842,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleManualFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleManualFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SimpleManualFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -182,14 +182,14 @@
server1Conf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
server1Params));
- server1Service = Messaging.newNullStorageMessagingServer(server1Conf);
+ server1Service = Messaging.newMessagingServer(server1Conf, false);
server1Service.start();
Configuration server0Conf = new ConfigurationImpl();
server0Conf.setSecurityEnabled(false);
server0Conf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- server0Service = Messaging.newNullStorageMessagingServer(server0Conf);
+ server0Service = Messaging.newMessagingServer(server0Conf, false);
server0Service.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SplitBrainTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SplitBrainTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/SplitBrainTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -219,7 +219,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf);
+ backupServer = Messaging.newMessagingServer(backupConf, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -232,7 +232,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveServer = Messaging.newNullStorageMessagingServer(liveConf);
+ liveServer = Messaging.newMessagingServer(liveConf, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -604,7 +604,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -618,7 +618,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/management/ReplicationAwareTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/management/ReplicationAwareTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/management/ReplicationAwareTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -106,7 +106,7 @@
backupParams));
backupConf.setBackup(true);
backupConf.setJMXManagementEnabled(true);
- backupServer = Messaging.newNullStorageMessagingServer(backupConf, backupMBeanServer);
+ backupServer = Messaging.newMessagingServer(backupConf, backupMBeanServer, false);
backupServer.start();
Configuration liveConf = new ConfigurationImpl();
@@ -120,7 +120,7 @@
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
liveConf.setJMXManagementEnabled(true);
- liveServer = Messaging.newNullStorageMessagingServer(liveConf, liveMBeanServer);
+ liveServer = Messaging.newMessagingServer(liveConf, liveMBeanServer, false);
liveServer.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/divert/DivertTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/divert/DivertTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/divert/DivertTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -72,7 +72,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -160,7 +160,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -286,7 +286,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -355,7 +355,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -454,7 +454,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -588,7 +588,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -711,7 +711,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -823,7 +823,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
@@ -965,7 +965,7 @@
conf.setDivertConfigurations(divertConfs);
- MessagingServer messagingService = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer messagingService = Messaging.newMessagingServer(conf, false);
messagingService.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -126,11 +126,11 @@
conf0.setSecurityEnabled(false);
conf0.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- server0 = Messaging.newNullStorageMessagingServer(conf0);
+ server0 = Messaging.newMessagingServer(conf0, false);
server0.start();
context0 = new InVMContext();
- jmsServer0 = JMSServerManagerImpl.newJMSServerManagerImpl(server0);
+ jmsServer0 = new JMSServerManagerImpl(server0);
jmsServer0.start();
jmsServer0.setContext(context0);
@@ -141,11 +141,11 @@
conf1.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory", params1));
- server1 = Messaging.newNullStorageMessagingServer(conf1);
+ server1 = Messaging.newMessagingServer(conf1, false);
server1.start();
context1 = new InVMContext();
- jmsServer1 = JMSServerManagerImpl.newJMSServerManagerImpl(server1);
+ jmsServer1 = new JMSServerManagerImpl(server1);
jmsServer1.start();
jmsServer1.setContext(context1);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/JMSBridgeReconnectionTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -21,6 +21,7 @@
*/
package org.jboss.messaging.tests.integration.jms.bridge;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.jms.bridge.QualityOfServiceMode;
import org.jboss.messaging.jms.bridge.impl.JMSBridgeImpl;
@@ -111,7 +112,7 @@
server1.start();
context1 = new InVMContext();
- jmsServer1 = JMSServerManagerImpl.newJMSServerManagerImpl(server1);
+ jmsServer1 = new JMSServerManagerImpl(server0);
jmsServer1.start();
jmsServer1.setContext(context1);
@@ -185,7 +186,7 @@
server1.start();
context1 = new InVMContext();
- jmsServer1 = JMSServerManagerImpl.newJMSServerManagerImpl(server1);
+ jmsServer1 = new JMSServerManagerImpl(server1);
jmsServer1.start();
jmsServer1.setContext(context1);
@@ -267,7 +268,7 @@
server1.start();
context1 = new InVMContext();
- jmsServer1 = JMSServerManagerImpl.newJMSServerManagerImpl(server1);
+ jmsServer1 = new JMSServerManagerImpl(server1);
jmsServer1.start();
jmsServer1.setContext(context1);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -329,7 +329,7 @@
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory",
backupParams));
backupConf.setBackup(true);
- backupService = Messaging.newNullStorageMessagingServer(backupConf);
+ backupService = Messaging.newMessagingServer(backupConf, false);
backupService.start();
Configuration liveConf = new ConfigurationImpl();
@@ -343,7 +343,7 @@
connectors.put(backupTC.getName(), backupTC);
liveConf.setConnectorConfigurations(connectors);
liveConf.setBackupConnectorName(backupTC.getName());
- liveService = Messaging.newNullStorageMessagingServer(liveConf);
+ liveService = Messaging.newMessagingServer(liveConf, false);
liveService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/management/ReplicationAwareJMSQueueControlWrapperTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/management/ReplicationAwareJMSQueueControlWrapperTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/management/ReplicationAwareJMSQueueControlWrapperTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -32,6 +32,7 @@
import javax.jms.Session;
import javax.jms.TextMessage;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory;
import org.jboss.messaging.jms.JBossQueue;
import org.jboss.messaging.jms.server.impl.JMSServerManagerImpl;
@@ -310,11 +311,11 @@
{
super.setUp();
- liveServerManager = JMSServerManagerImpl.newJMSServerManagerImpl(liveServer);
+ liveServerManager = new JMSServerManagerImpl(liveServer);
liveServerManager.start();
liveServerManager.setContext(new NullInitialContext());
- backupServerManager = JMSServerManagerImpl.newJMSServerManagerImpl(backupServer);
+ backupServerManager = new JMSServerManagerImpl(backupServer);
backupServerManager.start();
backupServerManager.setContext(new NullInitialContext());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/consumer/ConsumerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/consumer/ConsumerTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/consumer/ConsumerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -65,9 +65,9 @@
*/
public class ConsumerTest extends UnitTestCase
{
- private MessagingServer service;
+ private MessagingServer server;
- private JMSServerManagerImpl serverManager;
+ private JMSServerManagerImpl jmsServer;
private JBossConnectionFactory cf;
@@ -85,12 +85,12 @@
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- service = Messaging.newNullStorageMessagingServer(conf);
- service.start();
- serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(service);
- serverManager.start();
- serverManager.setContext(new NullInitialContext());
- serverManager.createQueue(Q_NAME, Q_NAME);
+ server = Messaging.newMessagingServer(conf, false);
+ server.start();
+ jmsServer = new JMSServerManagerImpl(server);
+ jmsServer.start();
+ jmsServer.setContext(new NullInitialContext());
+ jmsServer.createQueue(Q_NAME, Q_NAME);
cf = new JBossConnectionFactory(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"),
null,
DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
@@ -121,17 +121,17 @@
protected void tearDown() throws Exception
{
cf = null;
- if (service != null && service.isStarted())
+ if (server != null && server.isStarted())
{
try
{
- service.stop();
+ server.stop();
}
catch (Exception e)
{
e.printStackTrace();
}
- service = null;
+ server = null;
}
@@ -159,8 +159,8 @@
}
// assert that all the messages are there and none have been acked
SimpleString queueName = new SimpleString(JBossQueue.JMS_QUEUE_ADDRESS_PREFIX + Q_NAME);
- assertEquals(0, ((Queue)service.getPostOffice().getBinding(queueName).getBindable()).getDeliveringCount());
- assertEquals(0, ((Queue)service.getPostOffice().getBinding(queueName).getBindable()).getMessageCount());
+ assertEquals(0, ((Queue)server.getPostOffice().getBinding(queueName).getBindable()).getDeliveringCount());
+ assertEquals(0, ((Queue)server.getPostOffice().getBinding(queueName).getBindable()).getMessageCount());
session.close();
}
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSQueueControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSQueueControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSQueueControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -666,10 +666,10 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
- serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ serverManager = new JMSServerManagerImpl(server);
serverManager.start();
context = new InVMContext();
serverManager.setContext(context);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControl2Test.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControl2Test.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControl2Test.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -78,11 +78,11 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactory));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ MessagingServer server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
context = new InVMContext();
- JMSServerManagerImpl serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
serverManager.start();
serverManager.setContext(context);
@@ -100,11 +100,11 @@
"localhost",
discoveryPort,
ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ MessagingServer server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
context = new InVMContext();
- JMSServerManagerImpl serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
serverManager.start();
serverManager.setContext(context);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -343,11 +343,11 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
context = new InVMContext();
- JMSServerManagerImpl serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
serverManager.start();
serverManager.setContext(context);
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlUsingJMSTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/JMSServerControlUsingJMSTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -31,6 +31,7 @@
import javax.jms.Session;
import org.jboss.messaging.core.config.TransportConfiguration;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.management.ResourceNames;
import org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory;
import org.jboss.messaging.jms.JBossQueue;
@@ -66,7 +67,7 @@
{
super.setUp();
- JMSServerManagerImpl serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
serverManager.start();
serverManager.setContext(context);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/TopicControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/TopicControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/management/TopicControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -306,10 +306,10 @@
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations()
.add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
- serverManager = JMSServerManagerImpl.newJMSServerManagerImpl(server);
+ serverManager = new JMSServerManagerImpl(server);
serverManager.start();
serverManager.setContext(new NullInitialContext());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/AcceptorControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/AcceptorControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/AcceptorControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -76,7 +76,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(acceptorConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
AcceptorControlMBean acceptorControl = createManagementControl(acceptorConfig.getName());
@@ -94,7 +94,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(acceptorConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
AcceptorControlMBean acceptorControl = createManagementControl(acceptorConfig.getName());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/AddressControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -284,7 +284,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/BridgeControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/BridgeControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/BridgeControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -162,10 +162,10 @@
conf_0.getQueueConfigurations().add(sourceQueueConfig);
conf_0.getBridgeConfigurations().add(bridgeConfig);
- server_1 = Messaging.newNullStorageMessagingServer(conf_1, MBeanServerFactory.createMBeanServer());
+ server_1 = Messaging.newMessagingServer(conf_1, MBeanServerFactory.createMBeanServer(), false);
server_1.start();
- server_0 = Messaging.newNullStorageMessagingServer(conf_0, mbeanServer);
+ server_0 = Messaging.newMessagingServer(conf_0, mbeanServer, false);
server_0.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/BroadcastGroupControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/BroadcastGroupControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/BroadcastGroupControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -93,7 +93,7 @@
conf.setClustered(true);
conf.getConnectorConfigurations().put(connectorConfiguration.getName(), connectorConfiguration);
conf.getBroadcastGroupConfigurations().add(broadcastGroupConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
BroadcastGroupControlMBean broadcastGroupControl = createManagementControl(broadcastGroupConfig.getName());
@@ -126,7 +126,7 @@
conf.setClustered(true);
conf.getConnectorConfigurations().put(connectorConfiguration.getName(), connectorConfiguration);
conf.getBroadcastGroupConfigurations().add(broadcastGroupConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
BroadcastGroupControlMBean broadcastGroupControl = createManagementControl(broadcastGroupConfig.getName());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/ClusterConnectionControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/ClusterConnectionControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/ClusterConnectionControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -162,10 +162,10 @@
conf_0.getConnectorConfigurations().put(connectorConfig.getName(), connectorConfig);
conf_0.getClusterConfigurations().add(clusterConnectionConfig);
- server_1 = Messaging.newNullStorageMessagingServer(conf_1, MBeanServerFactory.createMBeanServer());
+ server_1 = Messaging.newMessagingServer(conf_1, MBeanServerFactory.createMBeanServer(), false);
server_1.start();
- server_0 = Messaging.newNullStorageMessagingServer(conf_0, mbeanServer);
+ server_0 = Messaging.newMessagingServer(conf_0, mbeanServer, false);
server_0.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/DiscoveryGroupControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/DiscoveryGroupControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/DiscoveryGroupControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -66,7 +66,7 @@
conf.setJMXManagementEnabled(true);
conf.setClustered(true);
conf.getDiscoveryGroupConfigurations().put(discoveryGroupConfig.getName(), discoveryGroupConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
DiscoveryGroupControlMBean discoveryGroupControl = createManagementControl(discoveryGroupConfig.getName());
@@ -86,7 +86,7 @@
conf.setJMXManagementEnabled(true);
conf.setClustered(true);
conf.getDiscoveryGroupConfigurations().put(discoveryGroupConfig.getName(), discoveryGroupConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
DiscoveryGroupControlMBean discoveryGroupControl = createManagementControl(discoveryGroupConfig.getName());
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/DivertControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/DivertControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/DivertControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -112,7 +112,7 @@
conf.getConnectorConfigurations().put(connectorConfig.getName(), connectorConfig);
- service = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ service = Messaging.newMessagingServer(conf, mbeanServer, false);
service.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/MessagingServerControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/MessagingServerControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/MessagingServerControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -295,7 +295,7 @@
conf = new ConfigurationImpl();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
conf.getConnectorConfigurations().put(connectorConfig.getName(), connectorConfig);
server.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/NotificationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/NotificationTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/NotificationTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -209,7 +209,7 @@
conf.setJMXManagementEnabled(false);
conf.getAcceptorConfigurations()
.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- service = Messaging.newNullStorageMessagingServer(conf);
+ service = Messaging.newMessagingServer(conf, false);
service.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/QueueControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/QueueControlTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/QueueControlTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1135,7 +1135,7 @@
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- server = Messaging.newNullStorageMessagingServer(conf, mbeanServer);
+ server = Messaging.newMessagingServer(conf, mbeanServer, false);
server.start();
ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName()));
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -98,7 +98,7 @@
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
JBMSecurityManagerImpl securityManager = (JBMSecurityManagerImpl)server.getSecurityManager();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -74,7 +74,7 @@
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
return server;
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -82,7 +82,7 @@
conf.setSecurityEnabled(true);
conf.setManagementClusterPassword(configuredClusterPassword);
conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
return server;
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityNotificationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityNotificationTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/management/SecurityNotificationTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -46,7 +46,7 @@
import org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory;
import org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory;
import org.jboss.messaging.core.security.CheckType;
-import org.jboss.messaging.core.security.JBMUpdateableSecurityManager;
+import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.Role;
import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
@@ -109,7 +109,7 @@
Set<Role> roles = new HashSet<Role>();
roles.add(role);
server.getSecurityRepository().addMatch(address.toString(), roles);
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager) server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addRole("guest", "roleCanNotCreateQueue");
flush(notifConsumer);
@@ -148,12 +148,12 @@
conf.setJMXManagementEnabled(false);
conf.getAcceptorConfigurations()
.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
- server = Messaging.newNullStorageMessagingServer(conf);
+ server = Messaging.newMessagingServer(conf, false);
server.start();
notifQueue = randomSimpleString();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager) server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("admin", "admin");
securityManager.addUser("guest", "guest");
securityManager.setDefaultUser("guest");
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/paging/PageCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/paging/PageCrashTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/paging/PageCrashTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -44,10 +44,6 @@
import org.jboss.messaging.core.paging.impl.PagingManagerImpl;
import org.jboss.messaging.core.paging.impl.PagingStoreFactoryNIO;
import org.jboss.messaging.core.paging.impl.PagingStoreImpl;
-import org.jboss.messaging.core.persistence.StorageManager;
-import org.jboss.messaging.core.persistence.impl.journal.JournalStorageManager;
-import org.jboss.messaging.core.remoting.server.RemotingService;
-import org.jboss.messaging.core.remoting.server.impl.RemotingServiceImpl;
import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl;
import org.jboss.messaging.core.server.MessagingServer;
@@ -230,28 +226,12 @@
private MessagingServer newMessagingServer(final Configuration configuration)
{
- StorageManager storageManager = new JournalStorageManager(configuration);
-
- RemotingService remotingService = new RemotingServiceImpl(configuration);
-
JBMSecurityManager securityManager = new JBMSecurityManagerImpl();
ManagementService managementService = new ManagementServiceImpl(ManagementFactory.getPlatformMBeanServer(), false);
+
+ MessagingServer server = new FailingMessagingServerImpl(configuration, securityManager);
- remotingService.setManagementService(managementService);
-
- MessagingServer server = new FailingMessagingServerImpl();
-
- server.setConfiguration(configuration);
-
- server.setStorageManager(storageManager);
-
- server.setRemotingService(remotingService);
-
- server.setSecurityManager(securityManager);
-
- server.setManagementService(managementService);
-
AddressSettings defaultSetting = new AddressSettings();
defaultSetting.setPageSizeBytes(configuration.getPagingGlobalWatermarkSize());
@@ -267,6 +247,10 @@
* before the page-file was removed */
class FailingMessagingServerImpl extends MessagingServerImpl
{
+ FailingMessagingServerImpl(final Configuration config, final JBMSecurityManager securityManager)
+ {
+ super(config, null, securityManager);
+ }
@Override
protected PagingManager createPagingManager()
{
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/security/NettySecurityClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/security/NettySecurityClientTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/security/NettySecurityClientTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -84,7 +84,7 @@
ConfigurationImpl config = new ConfigurationImpl();
config.setSecurityEnabled(false);
config.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
- messagingService = Messaging.newNullStorageMessagingServer(config);
+ messagingService = Messaging.newMessagingServer(config, false);
messagingService.start();
}
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/security/SecurityTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/security/SecurityTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/security/SecurityTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -44,7 +44,7 @@
import org.jboss.messaging.core.client.ClientSessionFactory;
import org.jboss.messaging.core.config.Configuration;
import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.security.JBMUpdateableSecurityManager;
+import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.security.Role;
import org.jboss.messaging.core.server.MessagingServer;
import org.jboss.messaging.core.server.Queue;
@@ -72,7 +72,7 @@
Configuration configuration = createDefaultConfig(false);
configuration.setSecurityEnabled(true);
MessagingServer server = createServer(false, configuration);
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("guest", "guest");
securityManager.setDefaultUser("guest");
try
@@ -131,7 +131,7 @@
Configuration configuration = createDefaultConfig(false);
configuration.setSecurityEnabled(true);
MessagingServer server = createServer(false, configuration);
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("newuser", "apass");
try
{
@@ -162,7 +162,7 @@
Configuration configuration = createDefaultConfig(false);
configuration.setSecurityEnabled(true);
MessagingServer server = createServer(false, configuration);
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("newuser", "apass");
try
{
@@ -197,7 +197,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -228,7 +228,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -267,7 +267,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, true, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -299,7 +299,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -339,7 +339,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, true, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -370,7 +370,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -409,7 +409,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, true, true, false);
Set<Role> roles = new HashSet<Role>();
@@ -441,7 +441,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, true, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -481,7 +481,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", true, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -515,7 +515,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -556,7 +556,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -592,7 +592,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
@@ -633,7 +633,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
@@ -682,7 +682,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
@@ -744,7 +744,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
@@ -814,7 +814,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
securityManager.addUser("guest", "guest");
securityManager.addRole("guest", "guest");
@@ -918,7 +918,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, false, false, false, false, true);
Set<Role> roles = new HashSet<Role>();
@@ -951,7 +951,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -992,7 +992,7 @@
{
server.start();
HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
- JBMUpdateableSecurityManager securityManager = (JBMUpdateableSecurityManager)server.getSecurityManager();
+ JBMSecurityManager securityManager = server.getSecurityManager();
securityManager.addUser("auser", "pass");
Role role = new Role("arole", false, false, true, false, false, false, false);
Set<Role> roles = new HashSet<Role>();
@@ -1027,10 +1027,9 @@
String domainName = SimpleLogingModule.class.getName();
Configuration configuration = createDefaultConfig(false);
configuration.setSecurityEnabled(true);
- MessagingServer server = createServer(false, configuration);
JAASSecurityManager securityManager = new JAASSecurityManager();
- server.setSecurityManager(securityManager);
-
+ MessagingServer server = createServer(false, configuration, securityManager);
+
securityManager.setConfigurationName(domainName);
securityManager.setCallbackHandler(new CallbackHandler()
{
@@ -1070,10 +1069,9 @@
String domainName = SimpleLogingModule.class.getName();
Configuration configuration = createDefaultConfig(false);
configuration.setSecurityEnabled(true);
- MessagingServer server = createServer(false, configuration);
JAASSecurityManager securityManager = new JAASSecurityManager();
- server.setSecurityManager(securityManager);
-
+ MessagingServer server = createServer(false, configuration, securityManager);
+
securityManager.setConfigurationName(domainName);
securityManager.setCallbackHandler(new CallbackHandler()
{
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/server/ExpiryRunnerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/server/ExpiryRunnerTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/server/ExpiryRunnerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -294,7 +294,7 @@
configuration.setMessageExpiryScanPeriod(1000);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- server = Messaging.newNullStorageMessagingServer(configuration);
+ server = Messaging.newMessagingServer(configuration, false);
// start the server
server.start();
// then we create a client as normal
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/server/LVQTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/server/LVQTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/server/LVQTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -54,9 +54,6 @@
private SimpleString qName1 = new SimpleString("LVQTestQ1");
- private FakeStorageManager storageManager;
-
-
public void testSimple() throws Exception
{
ClientProducer producer = clientSession.createProducer(address, -1, true, true);
@@ -360,13 +357,13 @@
producer.send(m4);
producer.send(m5);
producer.send(m6);
- assertEquals(1, storageManager.messageIds.size());
clientSession.start();
ClientMessage m = consumer.receive(1000);
assertNotNull(m);
m.acknowledge();
assertEquals(m.getBody().readString(), "m6");
- assertEquals(0, storageManager.messageIds.size());
+ m = consumer.receive(250);
+ assertNull(m);
}
public void testMultipleMessagesPersistedCorrectlyInTx() throws Exception
@@ -398,14 +395,14 @@
producer.send(m4);
producer.send(m5);
producer.send(m6);
- clientSessionTxSends.commit();
- assertEquals(1, storageManager.messageIds.size());
+ clientSessionTxSends.commit();
clientSessionTxSends.start();
ClientMessage m = consumer.receive(1000);
assertNotNull(m);
m.acknowledge();
assertEquals(m.getBody().readString(), "m6");
- assertEquals(0, storageManager.messageIds.size());
+ m = consumer.receive(250);
+ assertNull(m);
}
public void testMultipleAcksPersistedCorrectly() throws Exception
@@ -461,8 +458,7 @@
m = consumer.receive(1000);
assertNotNull(m);
m.acknowledge();
- assertEquals(m.getBody().readString(), "m6");
- assertEquals(6, storageManager.ackIds.size());
+ assertEquals(m.getBody().readString(), "m6");
}
public void testMultipleAcksPersistedCorrectlyInTx() throws Exception
@@ -519,13 +515,9 @@
assertNotNull(m);
m.acknowledge();
assertEquals(m.getBody().readString(), "m6");
- clientSessionTxReceives.commit();
- assertEquals(6, storageManager.ackIds.size());
+ clientSessionTxReceives.commit();
}
-
-
-
protected void tearDown() throws Exception
{
if (clientSession != null)
@@ -563,9 +555,8 @@
ConfigurationImpl configuration = new ConfigurationImpl();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
- configuration.getAcceptorConfigurations().add(transportConfig);
- storageManager = new FakeStorageManager();
- server = Messaging.newMessagingServer(configuration, storageManager);
+ configuration.getAcceptorConfigurations().add(transportConfig);
+ server = Messaging.newMessagingServer(configuration, false);
// start the server
server.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/server/PredefinedQueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/server/PredefinedQueueTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/server/PredefinedQueueTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -83,7 +83,7 @@
conf.setQueueConfigurations(queueConfs);
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
@@ -153,7 +153,7 @@
conf.setQueueConfigurations(queueConfs);
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
@@ -420,7 +420,7 @@
conf.setQueueConfigurations(queueConfs);
- MessagingServer server = Messaging.newNullStorageMessagingServer(conf);
+ MessagingServer server = Messaging.newMessagingServer(conf, false);
server.start();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/xa/XaTimeoutTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -77,7 +77,7 @@
configuration.setTransactionTimeoutScanPeriod(500);
TransportConfiguration transportConfig = new TransportConfiguration(INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
- messagingService = Messaging.newNullStorageMessagingServer(configuration);
+ messagingService = Messaging.newMessagingServer(configuration, false);
//start the server
messagingService.start();
//then we create a client as normal
Deleted: trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicSecurityDeployerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicSecurityDeployerTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicSecurityDeployerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -1,317 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.tests.unit.core.deployers.impl;
-
-import org.jboss.messaging.core.deployers.DeploymentManager;
-import org.jboss.messaging.core.deployers.impl.BasicSecurityDeployer;
-import org.jboss.messaging.core.security.CheckType;
-import org.jboss.messaging.core.security.JBMUpdateableSecurityManager;
-import org.jboss.messaging.core.security.Role;
-import org.jboss.messaging.tests.util.UnitTestCase;
-import org.jboss.messaging.utils.XMLUtil;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * tests BasicSecurityDeployer
- *
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class BasicSecurityDeployerTest extends UnitTestCase
-{
- private BasicSecurityDeployer deployer;
-
- private static final String simpleSecurityXml = "<deployment>\n" +
- "<defaultuser name=\"guest\" password=\"guest\">\n" +
- " <role name=\"guest\"/>\n" +
- " </defaultuser>" +
- "</deployment>";
-
- private static final String singleUserXml = "<deployment>\n" +
- " <user name=\"guest\" password=\"guest\">\n" +
- " <role name=\"guest\"/>\n" +
- " </user>\n" +
- "</deployment>";
-
- private static final String multipleUserXml = "<deployment>\n" +
- " <user name=\"guest\" password=\"guest\">\n" +
- " <role name=\"guest\"/>\n" +
- " <role name=\"foo\"/>\n" +
- " </user>\n" +
- " <user name=\"anotherguest\" password=\"anotherguest\">\n" +
- " <role name=\"anotherguest\"/>\n" +
- " <role name=\"foo\"/>\n" +
- " <role name=\"bar\"/>\n" +
- " </user>\n" +
- "</deployment>";
-
- protected void setUp() throws Exception
- {
- super.setUp();
- DeploymentManager deploymentManager = new FakeDeploymentManager();
- deployer = new BasicSecurityDeployer(deploymentManager);
- }
-
- protected void tearDown() throws Exception
- {
- deployer = null;
-
- super.tearDown();
- }
-
- private void deploy(String xml) throws Exception
- {
- NodeList children = XMLUtil.stringToElement(xml).getChildNodes();
- for (int i = 0; i < children.getLength(); i++)
- {
- Node node = children.item(i);
- if (node.getNodeName().equals("user") || node.getNodeName().equals("defaultuser"))
- {
- deployer.deploy(node);
- }
- }
- }
-
- private void undeploy(String xml) throws Exception
- {
- NodeList children = XMLUtil.stringToElement(xml).getChildNodes();
- for (int i = 0; i < children.getLength(); i++)
- {
- Node node = children.item(i);
- if (node.getNodeName().equals("user"))
- {
- deployer.undeploy(node);
- }
- }
- }
-
- public void testSimpleDefaultSecurity() throws Exception
- {
- FakeJBMUpdateableSecurityManager securityManager = new FakeJBMUpdateableSecurityManager();
- deployer.setJbmSecurityManager(securityManager);
- deploy(simpleSecurityXml);
- assertEquals("guest", securityManager.defaultUser);
- User user = securityManager.users.get("guest");
- assertNotNull(user);
- assertEquals("guest",user.user);
- assertEquals("guest",user.password);
- List<String> roles = securityManager.roles.get("guest");
- assertNotNull(roles);
- assertEquals(1, roles.size());
- assertEquals("guest", roles.get(0));
- }
-
- public void testSingleUserDeploySecurity() throws Exception
- {
- FakeJBMUpdateableSecurityManager securityManager = new FakeJBMUpdateableSecurityManager();
- deployer.setJbmSecurityManager(securityManager);
- deploy(singleUserXml);
- assertNull(securityManager.defaultUser);
- User user = securityManager.users.get("guest");
- assertNotNull(user);
- assertEquals("guest",user.user);
- assertEquals("guest",user.password);
- List<String> roles = securityManager.roles.get("guest");
- assertNotNull(roles);
- assertEquals(1, roles.size());
- assertEquals("guest", roles.get(0));
- }
-
- public void testMultipleUserDeploySecurity() throws Exception
- {
- FakeJBMUpdateableSecurityManager securityManager = new FakeJBMUpdateableSecurityManager();
- deployer.setJbmSecurityManager(securityManager);
- deploy(multipleUserXml);
- assertNull(securityManager.defaultUser);
- User user = securityManager.users.get("guest");
- assertNotNull(user);
- assertEquals("guest",user.user);
- assertEquals("guest",user.password);
- List<String> roles = securityManager.roles.get("guest");
- assertNotNull(roles);
- assertEquals(2, roles.size());
- assertEquals("guest", roles.get(0));
- assertEquals("foo", roles.get(1));
- user = securityManager.users.get("anotherguest");
- assertNotNull(user);
- assertEquals("anotherguest",user.user);
- assertEquals("anotherguest",user.password);
- roles = securityManager.roles.get("anotherguest");
- assertNotNull(roles);
- assertEquals(3, roles.size());
- assertEquals("anotherguest", roles.get(0));
- assertEquals("foo", roles.get(1));
- assertEquals("bar", roles.get(2));
- }
-
- public void testUndeploy() throws Exception
- {
- FakeJBMUpdateableSecurityManager securityManager = new FakeJBMUpdateableSecurityManager();
- deployer.setJbmSecurityManager(securityManager);
- deploy(multipleUserXml);
- undeploy(singleUserXml);
- assertNull(securityManager.defaultUser);
- User user = securityManager.users.get("guest");
- assertNull(user);
- List<String> roles = securityManager.roles.get("guest");
- assertNull(roles);
- user = securityManager.users.get("anotherguest");
- assertNotNull(user);
- assertEquals("anotherguest",user.user);
- assertEquals("anotherguest",user.password);
- roles = securityManager.roles.get("anotherguest");
- assertNotNull(roles);
- assertEquals(3, roles.size());
- assertEquals("anotherguest", roles.get(0));
- assertEquals("foo", roles.get(1));
- assertEquals("bar", roles.get(2));
- }
-
- class FakeJBMUpdateableSecurityManager implements JBMUpdateableSecurityManager
- {
- String defaultUser;
-
- private Map<String, User> users = new HashMap<String, User>();
-
- private Map<String, List<String>> roles = new HashMap<String, List<String>>();
-
- public void addUser(final String user, final String password)
- {
- if (user == null)
- {
- throw new IllegalArgumentException("User cannot be null");
- }
- if (password == null)
- {
- throw new IllegalArgumentException("password cannot be null");
- }
- users.put(user, new User(user, password));
- }
-
- public void removeUser(final String user)
- {
- users.remove(user);
- roles.remove(user);
- }
-
- public void addRole(final String user, final String role)
- {
- if (roles.get(user) == null)
- {
- roles.put(user, new ArrayList<String>());
- }
- roles.get(user).add(role);
- }
-
- public void removeRole(final String user, final String role)
- {
- if (roles.get(user) == null)
- {
- return;
- }
- roles.get(user).remove(role);
- }
-
- public void setDefaultUser(String username)
- {
- defaultUser = username;
- }
-
- public boolean validateUser(String user, String password)
- {
- return false;
- }
-
- public boolean validateUserAndRole(String user, String password, Set<Role> roles, CheckType checkType)
- {
- return false;
- }
-
- public void start()
- {
- }
-
- public void stop()
- {
- }
-
- public boolean isStarted()
- {
- return true;
- }
- }
-
- static class User
- {
- final String user;
-
- final String password;
-
- User(final String user, final String password)
- {
- this.user = user;
- this.password = password;
- }
-
- public boolean equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
- if (o == null || getClass() != o.getClass())
- {
- return false;
- }
-
- User user1 = (User) o;
-
- if (!user.equals(user1.user))
- {
- return false;
- }
-
- return true;
- }
-
- public int hashCode()
- {
- return user.hashCode();
- }
-
- public boolean isValid(final String user, final String password)
- {
- if (user == null)
- {
- return false;
- }
- return this.user.equals(user) && this.password.equals(password);
- }
- }
-}
Copied: trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java (from rev 6367, trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicSecurityDeployerTest.java)
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java (rev 0)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/BasicUserCredentialsDeployerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -0,0 +1,312 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.messaging.tests.unit.core.deployers.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.messaging.core.deployers.DeploymentManager;
+import org.jboss.messaging.core.deployers.impl.BasicUserCredentialsDeployer;
+import org.jboss.messaging.core.security.CheckType;
+import org.jboss.messaging.core.security.JBMSecurityManager;
+import org.jboss.messaging.core.security.Role;
+import org.jboss.messaging.tests.util.UnitTestCase;
+import org.jboss.messaging.utils.XMLUtil;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * tests BasicUserCredentialsDeployer
+ *
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ */
+public class BasicUserCredentialsDeployerTest extends UnitTestCase
+{
+ private BasicUserCredentialsDeployer deployer;
+
+ FakeJBMUpdateableSecurityManager securityManager;
+
+ private static final String simpleSecurityXml = "<deployment>\n" +
+ "<defaultuser name=\"guest\" password=\"guest\">\n" +
+ " <role name=\"guest\"/>\n" +
+ " </defaultuser>" +
+ "</deployment>";
+
+ private static final String singleUserXml = "<deployment>\n" +
+ " <user name=\"guest\" password=\"guest\">\n" +
+ " <role name=\"guest\"/>\n" +
+ " </user>\n" +
+ "</deployment>";
+
+ private static final String multipleUserXml = "<deployment>\n" +
+ " <user name=\"guest\" password=\"guest\">\n" +
+ " <role name=\"guest\"/>\n" +
+ " <role name=\"foo\"/>\n" +
+ " </user>\n" +
+ " <user name=\"anotherguest\" password=\"anotherguest\">\n" +
+ " <role name=\"anotherguest\"/>\n" +
+ " <role name=\"foo\"/>\n" +
+ " <role name=\"bar\"/>\n" +
+ " </user>\n" +
+ "</deployment>";
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ DeploymentManager deploymentManager = new FakeDeploymentManager();
+ securityManager = new FakeJBMUpdateableSecurityManager();
+ deployer = new BasicUserCredentialsDeployer(deploymentManager, securityManager);
+ }
+
+ protected void tearDown() throws Exception
+ {
+ deployer = null;
+
+ super.tearDown();
+ }
+
+ private void deploy(String xml) throws Exception
+ {
+ NodeList children = XMLUtil.stringToElement(xml).getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ Node node = children.item(i);
+ if (node.getNodeName().equals("user") || node.getNodeName().equals("defaultuser"))
+ {
+ deployer.deploy(node);
+ }
+ }
+ }
+
+ private void undeploy(String xml) throws Exception
+ {
+ NodeList children = XMLUtil.stringToElement(xml).getChildNodes();
+ for (int i = 0; i < children.getLength(); i++)
+ {
+ Node node = children.item(i);
+ if (node.getNodeName().equals("user"))
+ {
+ deployer.undeploy(node);
+ }
+ }
+ }
+
+ public void testSimpleDefaultSecurity() throws Exception
+ {
+ deploy(simpleSecurityXml);
+ assertEquals("guest", securityManager.defaultUser);
+ User user = securityManager.users.get("guest");
+ assertNotNull(user);
+ assertEquals("guest",user.user);
+ assertEquals("guest",user.password);
+ List<String> roles = securityManager.roles.get("guest");
+ assertNotNull(roles);
+ assertEquals(1, roles.size());
+ assertEquals("guest", roles.get(0));
+ }
+
+ public void testSingleUserDeploySecurity() throws Exception
+ {
+ deploy(singleUserXml);
+ assertNull(securityManager.defaultUser);
+ User user = securityManager.users.get("guest");
+ assertNotNull(user);
+ assertEquals("guest",user.user);
+ assertEquals("guest",user.password);
+ List<String> roles = securityManager.roles.get("guest");
+ assertNotNull(roles);
+ assertEquals(1, roles.size());
+ assertEquals("guest", roles.get(0));
+ }
+
+ public void testMultipleUserDeploySecurity() throws Exception
+ {
+ deploy(multipleUserXml);
+ assertNull(securityManager.defaultUser);
+ User user = securityManager.users.get("guest");
+ assertNotNull(user);
+ assertEquals("guest",user.user);
+ assertEquals("guest",user.password);
+ List<String> roles = securityManager.roles.get("guest");
+ assertNotNull(roles);
+ assertEquals(2, roles.size());
+ assertEquals("guest", roles.get(0));
+ assertEquals("foo", roles.get(1));
+ user = securityManager.users.get("anotherguest");
+ assertNotNull(user);
+ assertEquals("anotherguest",user.user);
+ assertEquals("anotherguest",user.password);
+ roles = securityManager.roles.get("anotherguest");
+ assertNotNull(roles);
+ assertEquals(3, roles.size());
+ assertEquals("anotherguest", roles.get(0));
+ assertEquals("foo", roles.get(1));
+ assertEquals("bar", roles.get(2));
+ }
+
+ public void testUndeploy() throws Exception
+ {
+ deploy(multipleUserXml);
+ undeploy(singleUserXml);
+ assertNull(securityManager.defaultUser);
+ User user = securityManager.users.get("guest");
+ assertNull(user);
+ List<String> roles = securityManager.roles.get("guest");
+ assertNull(roles);
+ user = securityManager.users.get("anotherguest");
+ assertNotNull(user);
+ assertEquals("anotherguest",user.user);
+ assertEquals("anotherguest",user.password);
+ roles = securityManager.roles.get("anotherguest");
+ assertNotNull(roles);
+ assertEquals(3, roles.size());
+ assertEquals("anotherguest", roles.get(0));
+ assertEquals("foo", roles.get(1));
+ assertEquals("bar", roles.get(2));
+ }
+
+ class FakeJBMUpdateableSecurityManager implements JBMSecurityManager
+ {
+ String defaultUser;
+
+ private Map<String, User> users = new HashMap<String, User>();
+
+ private Map<String, List<String>> roles = new HashMap<String, List<String>>();
+
+ public void addUser(final String user, final String password)
+ {
+ if (user == null)
+ {
+ throw new IllegalArgumentException("User cannot be null");
+ }
+ if (password == null)
+ {
+ throw new IllegalArgumentException("password cannot be null");
+ }
+ users.put(user, new User(user, password));
+ }
+
+ public void removeUser(final String user)
+ {
+ users.remove(user);
+ roles.remove(user);
+ }
+
+ public void addRole(final String user, final String role)
+ {
+ if (roles.get(user) == null)
+ {
+ roles.put(user, new ArrayList<String>());
+ }
+ roles.get(user).add(role);
+ }
+
+ public void removeRole(final String user, final String role)
+ {
+ if (roles.get(user) == null)
+ {
+ return;
+ }
+ roles.get(user).remove(role);
+ }
+
+ public void setDefaultUser(String username)
+ {
+ defaultUser = username;
+ }
+
+ public boolean validateUser(String user, String password)
+ {
+ return false;
+ }
+
+ public boolean validateUserAndRole(String user, String password, Set<Role> roles, CheckType checkType)
+ {
+ return false;
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public boolean isStarted()
+ {
+ return true;
+ }
+ }
+
+ static class User
+ {
+ final String user;
+
+ final String password;
+
+ User(final String user, final String password)
+ {
+ this.user = user;
+ this.password = password;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ User user1 = (User) o;
+
+ if (!user.equals(user1.user))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ return user.hashCode();
+ }
+
+ public boolean isValid(final String user, final String password)
+ {
+ if (user == null)
+ {
+ return false;
+ }
+ return this.user.equals(user) && this.password.equals(password);
+ }
+ }
+}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FakeDeploymentManager.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FakeDeploymentManager.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FakeDeploymentManager.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -29,6 +29,23 @@
*/
class FakeDeploymentManager implements DeploymentManager
{
+ private boolean started;
+
+ public boolean isStarted()
+ {
+ return started;
+ }
+
+ public void start() throws Exception
+ {
+ started = true;
+ }
+
+ public void stop() throws Exception
+ {
+ started = false;
+ }
+
public void registerDeployer(Deployer deployer) throws Exception
{
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -22,14 +22,15 @@
package org.jboss.messaging.tests.unit.core.deployers.impl;
+import java.io.File;
+import java.net.URL;
+
import org.jboss.messaging.core.deployers.Deployer;
import org.jboss.messaging.core.deployers.impl.FileDeploymentManager;
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.tests.util.UnitTestCase;
+import org.jboss.messaging.utils.Pair;
-import java.io.File;
-import java.net.URL;
-
/**
*
* A FileDeploymentManagerTest
@@ -41,7 +42,7 @@
{
private static final Logger log = Logger.getLogger(FileDeploymentManagerTest.class);
- public void testStartStop() throws Exception
+ public void testStartStop1() throws Exception
{
FileDeploymentManager fdm = new FileDeploymentManager(Long.MAX_VALUE);
@@ -57,29 +58,46 @@
FakeDeployer deployer = new FakeDeployer(filename);
- try
- {
- fdm.registerDeployer(deployer);
- fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- //Ok
- }
+ fdm.registerDeployer(deployer);
+ fdm.unregisterDeployer(deployer);
+
+ fdm.registerDeployer(deployer);
+
+ fdm.start();
try
- {
- fdm.unregisterDeployer(deployer);
- fail("Should throw exception");
+ {
+ assertEquals(file.toURL(), deployer.deployedUrl);
+ deployer.deployedUrl = null;
+ fdm.start();
+ assertNull(deployer.deployedUrl);
+ fdm.stop();
+
}
- catch (IllegalStateException e)
+ finally
{
- //Ok
- }
+ file.delete();
+ }
+ }
+
+ public void testStartStop2() throws Exception
+ {
+ FileDeploymentManager fdm = new FileDeploymentManager(Long.MAX_VALUE);
+
+ String filename = "fdm_test_file.xml";
+
+ log.debug("Filename is " + filename);
+
+ File file = new File("tests/tmpfiles/" + filename);
+
+ log.debug(file.getAbsoluteFile());
+
+ file.createNewFile();
+
+ FakeDeployer deployer = new FakeDeployer(filename);
fdm.start();
-
try
{
fdm.registerDeployer(deployer);
@@ -87,26 +105,7 @@
deployer.deployedUrl = null;
fdm.start();
assertNull(deployer.deployedUrl);
- fdm.stop();
- try
- {
- fdm.registerDeployer(deployer);
- fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- //Ok
- }
-
- try
- {
- fdm.unregisterDeployer(deployer);
- fail("Should throw exception");
- }
- catch (IllegalStateException e)
- {
- //Ok
- }
+ fdm.stop();
}
finally
{
@@ -136,6 +135,7 @@
FakeDeployer deployer1 = new FakeDeployer(filename1);
FakeDeployer deployer2 = new FakeDeployer(filename2);
FakeDeployer deployer3 = new FakeDeployer(filename3);
+ FakeDeployer deployer4 = new FakeDeployer(filename3); // Can have multiple deployers on the same file
try
{
URL url1 = file1.toURL();
@@ -147,44 +147,57 @@
URL url3 = file3.toURL();
deployer3.deploy(url3);
+ deployer4.deploy(url3);
+
fdm.registerDeployer(deployer1);
fdm.registerDeployer(deployer2);
fdm.registerDeployer(deployer3);
+ fdm.registerDeployer(deployer4);
- assertEquals(3, fdm.getDeployers().size());
+ assertEquals(4, fdm.getDeployers().size());
assertTrue(fdm.getDeployers().contains(deployer1));
assertTrue(fdm.getDeployers().contains(deployer2));
assertTrue(fdm.getDeployers().contains(deployer3));
- assertEquals(3, fdm.getDeployed().size());
+ assertTrue(fdm.getDeployers().contains(deployer4));
+ assertEquals(4, fdm.getDeployed().size());
assertEquals(file1.toURL(), deployer1.deployedUrl);
assertEquals(file2.toURL(), deployer2.deployedUrl);
assertEquals(file3.toURL(), deployer3.deployedUrl);
+ assertEquals(file3.toURL(), deployer4.deployedUrl);
//Registering same again should do nothing
fdm.registerDeployer(deployer1);
- assertEquals(3, fdm.getDeployers().size());
+ assertEquals(4, fdm.getDeployers().size());
assertTrue(fdm.getDeployers().contains(deployer1));
assertTrue(fdm.getDeployers().contains(deployer2));
assertTrue(fdm.getDeployers().contains(deployer3));
- assertEquals(3, fdm.getDeployed().size());
+ assertTrue(fdm.getDeployers().contains(deployer4));
+ assertEquals(4, fdm.getDeployed().size());
fdm.unregisterDeployer(deployer1);
- assertEquals(2, fdm.getDeployers().size());
+ assertEquals(3, fdm.getDeployers().size());
assertTrue(fdm.getDeployers().contains(deployer2));
assertTrue(fdm.getDeployers().contains(deployer3));
- assertEquals(2, fdm.getDeployed().size());
+ assertTrue(fdm.getDeployers().contains(deployer4));
+ assertEquals(3, fdm.getDeployed().size());
fdm.unregisterDeployer(deployer2);
fdm.unregisterDeployer(deployer3);
+ assertEquals(1, fdm.getDeployers().size());
+ assertTrue(fdm.getDeployers().contains(deployer4));
+ assertEquals(1, fdm.getDeployed().size());
+
+ fdm.unregisterDeployer(deployer4);
+
assertEquals(0, fdm.getDeployers().size());
assertEquals(0, fdm.getDeployed().size());
@@ -206,7 +219,6 @@
public void testRedeploy() throws Exception
{
FileDeploymentManager fdm = new FileDeploymentManager(Long.MAX_VALUE);
-
fdm.start();
@@ -236,13 +248,14 @@
assertTrue(fdm.getDeployers().contains(deployer));
assertEquals(1, fdm.getDeployed().size());
assertEquals(file.toURL(), deployer.reDeployedUrl);
- assertEquals(oldLastModified + 1000, fdm.getDeployed().get(url).lastModified);
+ Pair<URL, Deployer> pair = new Pair<URL, Deployer>(url, deployer);
+ assertEquals(oldLastModified + 1000, fdm.getDeployed().get(pair).lastModified);
deployer.reDeployedUrl = null;
//Scanning again should not redeploy
fdm.run();
- assertEquals(oldLastModified + 1000, fdm.getDeployed().get(url).lastModified);
+ assertEquals(oldLastModified + 1000, fdm.getDeployed().get(pair).lastModified);
assertNull(deployer.reDeployedUrl);
}
finally
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/jms/misc/ManifestTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/jms/misc/ManifestTest.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/jms/misc/ManifestTest.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -31,9 +31,10 @@
import javax.jms.Connection;
import javax.jms.ConnectionMetaData;
+import org.jboss.messaging.core.config.impl.ConfigurationImpl;
import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
-import org.jboss.messaging.core.server.impl.MessagingServerImpl;
import org.jboss.messaging.jms.client.JBossConnectionMetaData;
import org.jboss.messaging.tests.util.UnitTestCase;
@@ -72,7 +73,7 @@
try
{
- MessagingServer server = new MessagingServerImpl();
+ MessagingServer server = Messaging.newMessagingServer(new ConfigurationImpl());
ConnectionMetaData meta = new JBossConnectionMetaData(server.getVersion());
Modified: trunk/tests/src/org/jboss/messaging/tests/util/ServiceTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/util/ServiceTestBase.java 2009-04-09 15:36:58 UTC (rev 6382)
+++ trunk/tests/src/org/jboss/messaging/tests/util/ServiceTestBase.java 2009-04-09 18:09:20 UTC (rev 6383)
@@ -23,6 +23,7 @@
package org.jboss.messaging.tests.util;
import java.io.File;
+import java.lang.management.ManagementFactory;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
@@ -44,6 +45,7 @@
import org.jboss.messaging.core.postoffice.impl.LocalQueueBinding;
import org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory;
import org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory;
+import org.jboss.messaging.core.security.JBMSecurityManager;
import org.jboss.messaging.core.server.JournalType;
import org.jboss.messaging.core.server.Messaging;
import org.jboss.messaging.core.server.MessagingServer;
@@ -111,12 +113,12 @@
protected void clearData(String testDir)
{
- //Need to delete the root
-
+ // Need to delete the root
+
File file = new File(testDir);
deleteDirectory(file);
file.mkdirs();
-
+
recreateDirectory(getJournalDir(testDir));
recreateDirectory(getBindingsDir(testDir));
recreateDirectory(getPageDir(testDir));
@@ -147,7 +149,7 @@
}
else
{
- service = Messaging.newNullStorageMessagingServer(configuration);
+ service = Messaging.newMessagingServer(configuration, false);
}
for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
@@ -163,12 +165,11 @@
return service;
}
- protected MessagingServer createService(final boolean realFiles,
- final Configuration configuration,
- final MBeanServer mbeanServer,
- final Map<String, AddressSettings> settings)
+ protected MessagingServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final MBeanServer mbeanServer,
+ final Map<String, AddressSettings> settings)
{
-
MessagingServer service;
if (realFiles)
@@ -177,7 +178,7 @@
}
else
{
- service = Messaging.newNullStorageMessagingServer(configuration, mbeanServer);
+ service = Messaging.newMessagingServer(configuration, mbeanServer, false);
}
for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
@@ -203,6 +204,35 @@
return createServer(realFiles, configuration, new HashMap<String, AddressSettings>());
}
+ protected MessagingServer createServer(final boolean realFiles, final Configuration configuration,
+ final JBMSecurityManager securityManager)
+ {
+ MessagingServer service;
+
+ if (realFiles)
+ {
+ service = Messaging.newMessagingServer(configuration, ManagementFactory.getPlatformMBeanServer(), securityManager);
+ }
+ else
+ {
+ service = Messaging.newMessagingServer(configuration, ManagementFactory.getPlatformMBeanServer(), securityManager, false);
+ }
+
+ Map<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ service.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+ defaultSetting.setPageSizeBytes(configuration.getPagingGlobalWatermarkSize());
+
+ service.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return service;
+ }
+
protected MessagingServer createClusteredServerWithParams(final int index,
final boolean realFiles,
final Map<String, Object> params)
More information about the jboss-cvs-commits
mailing list