JBoss hornetq SVN: r10470 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-08 08:55:14 -0400 (Fri, 08 Apr 2011)
New Revision: 10470
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
Log:
https://issues.jboss.org/browse/JBPAPP-6273 - just a little comment on the code
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-08 12:18:13 UTC (rev 10469)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-08 12:55:14 UTC (rev 10470)
@@ -1143,6 +1143,8 @@
continue;
}
+ // Redistribution could install a Redistributor while we are still loading records, what will be an issue with prepared ACKs
+ // We make sure te Queue is paused before we reroute values.
queue.pause();
Collection<AddMessageRecord> valueRecords = queueRecords.values();
13 years, 8 months
JBoss hornetq SVN: r10469 - in trunk: tests and 43 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-08 08:18:13 -0400 (Fri, 08 Apr 2011)
New Revision: 10469
Added:
trunk/tests/pom.xml
trunk/tests/unit-tests/
trunk/tests/unit-tests/pom.xml
trunk/tests/unit-tests/src/
trunk/tests/unit-tests/src/test/
trunk/tests/unit-tests/src/test/java/
trunk/tests/unit-tests/src/test/java/org/
trunk/tests/unit-tests/src/test/java/org/hornetq/
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/RandomUtil.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/UnitTestCase.java
Removed:
trunk/tests/src/org/hornetq/tests/unit/
trunk/tests/src/org/hornetq/tests/util/RandomUtil.java
trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
Modified:
trunk/hornetq.iml
trunk/pom.xml
trunk/tests/hornetq-tests.iml
trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java
trunk/tests/src/org/hornetq/tests/integration/InterceptorTest.java
trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
trunk/tests/src/org/hornetq/tests/integration/client/AckBatchSizeTest.java
trunk/tests/src/org/hornetq/tests/integration/client/AcknowledgeTest.java
trunk/tests/src/org/hornetq/tests/integration/client/AddressSettingsTest.java
trunk/tests/src/org/hornetq/tests/integration/client/AutogroupIdTest.java
trunk/tests/src/org/hornetq/tests/integration/client/BlockingSendTest.java
trunk/tests/src/org/hornetq/tests/integration/client/CommitRollbackTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerFilterTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerRoundRobinTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerWindowSizeTest.java
trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
trunk/tests/src/org/hornetq/tests/integration/client/DeliveryOrderTest.java
trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
trunk/tests/src/org/hornetq/tests/integration/client/HeuristicXATest.java
trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
trunk/tests/src/org/hornetq/tests/integration/client/InVMNonPersistentMessageBufferTest.java
trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageConcurrencyTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageCounterTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageDurabilityTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageExpirationTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageHandlerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageRateTest.java
trunk/tests/src/org/hornetq/tests/integration/client/OrderTest.java
trunk/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java
trunk/tests/src/org/hornetq/tests/integration/client/PagingSyncTest.java
trunk/tests/src/org/hornetq/tests/integration/client/PagingTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ProducerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ReceiveTest.java
trunk/tests/src/org/hornetq/tests/integration/client/RedeliveryConsumerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/RoutingTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SelfExpandingBufferTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateAndDeleteQueueTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateConsumerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateProducerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionStopStartTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SimpleSendMultipleQueues.java
trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java
trunk/tests/src/org/hornetq/tests/integration/client/TransactionalSendTest.java
trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/NodeManagerTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadReattachSupport.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/core/deployers/impl/QueueDeployerTest.java
trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java
trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
trunk/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java
trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java
trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
trunk/tests/src/org/hornetq/tests/integration/management/ManagementTestBase.java
trunk/tests/src/org/hornetq/tests/integration/paging/PagingCounterTest.java
trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java
trunk/tests/src/org/hornetq/tests/integration/persistence/DeleteQueueRestartTest.java
trunk/tests/src/org/hornetq/tests/integration/persistence/ExportFormatTest.java
trunk/tests/src/org/hornetq/tests/integration/persistence/RestartSMTest.java
trunk/tests/src/org/hornetq/tests/integration/persistence/StorageManagerTestBase.java
trunk/tests/src/org/hornetq/tests/integration/ra/HornetQRATestBase.java
trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/DestroyConsumerTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java
trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/ReconnectTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
trunk/tests/src/org/hornetq/tests/integration/scheduling/DelayedMessageTest.java
trunk/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java
trunk/tests/src/org/hornetq/tests/integration/security/SecurityTest.java
trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java
trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaRecoveryTest.java
trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java
trunk/tests/src/org/hornetq/tests/performance/paging/MeasurePagingMultiThreadTest.java
trunk/tests/src/org/hornetq/tests/soak/client/ClientNonDivertedSoakTest.java
trunk/tests/src/org/hornetq/tests/soak/client/ClientSoakTest.java
trunk/tests/src/org/hornetq/tests/soak/client/SimpleSendReceiveSoakTest.java
trunk/tests/src/org/hornetq/tests/stress/client/SendStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/JournalCleanupCompactStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/JournalRestartStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java
trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java
trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java
trunk/tests/src/org/hornetq/tests/util/JMSClusteredTestBase.java
trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
Log:
mavenised unit tests
Modified: trunk/hornetq.iml
===================================================================
--- trunk/hornetq.iml 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/hornetq.iml 2011-04-08 12:18:13 UTC (rev 10469)
@@ -15,6 +15,7 @@
<sourceFolder url="file://$MODULE_DIR$/hornetq-jms/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-service-sar/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-ra/hornetq-ra-jar/src/main/java" isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/ObjectStore" />
<excludeFolder url="file://$MODULE_DIR$/build/api" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/jars" />
@@ -31,6 +32,7 @@
<excludeFolder url="file://$MODULE_DIR$/examples/jms/common/build" />
<excludeFolder url="file://$MODULE_DIR$/examples/jms/queue/build" />
<excludeFolder url="file://$MODULE_DIR$/journal-test" />
+ <excludeFolder url="file://$MODULE_DIR$/logs" />
<excludeFolder url="file://$MODULE_DIR$/output" />
<excludeFolder url="file://$MODULE_DIR$/output/classes" />
<excludeFolder url="file://$MODULE_DIR$/output/etc" />
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/pom.xml 2011-04-08 12:18:13 UTC (rev 10469)
@@ -38,6 +38,7 @@
<HornetQ-Version>${hornetq.version.majorVersion}.${hornetq.version.minorVersion}.${hornetq.version.microVersion}.${hornetq.version.versionSuffix} (${hornetq.version.versionName}, ${hornetq.version.incrementingVersion})</HornetQ-Version>
<HornetQ-SVN-URL>https://svn.jboss.org/repos/hornetq/trunk</HornetQ-SVN-URL>
<resteasy.version>2.1.0.GA</resteasy.version>
+ <skipTests>true</skipTests>
</properties>
<scm>
@@ -105,7 +106,7 @@
<module>hornetq-jboss-as-integration</module>
<module>hornetq-twitter-integration</module>
<module>hornetq-service-sar</module>
- <!--<module>tests</module>-->
+ <module>tests</module>
</modules>
<dependencyManagement>
@@ -399,6 +400,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ </configuration>
<version>2.4</version>
</plugin>
<plugin>
Modified: trunk/tests/hornetq-tests.iml
===================================================================
--- trunk/tests/hornetq-tests.iml 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/hornetq-tests.iml 2011-04-08 12:18:13 UTC (rev 10469)
@@ -4,6 +4,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/unit-tests/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/jms-tests" />
<excludeFolder url="file://$MODULE_DIR$/joram-tests" />
<excludeFolder url="file://$MODULE_DIR$/logs" />
Added: trunk/tests/pom.xml
===================================================================
--- trunk/tests/pom.xml (rev 0)
+++ trunk/tests/pom.xml 2011-04-08 12:18:13 UTC (rev 10469)
@@ -0,0 +1,30 @@
+<project>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+ <name>HornetQ Tests POM</name>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hornetq.tests</groupId>
+ <artifactId>hornetq-tests-pom</artifactId>
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>unit-tests</module>
+ <!--<module>jms-tests</module>-->
+ </modules>
+</project>
Modified: trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/DuplicateDetectionTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -29,7 +29,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.transaction.impl.XidImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.UUIDGenerator;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/InterceptorTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/InterceptorTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/InterceptorTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,7 +27,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.ServerMessage;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,13 +19,11 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/AckBatchSizeTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/AckBatchSizeTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/AckBatchSizeTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,7 +19,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/AcknowledgeTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/AcknowledgeTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/AcknowledgeTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/AddressSettingsTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/AddressSettingsTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/AddressSettingsTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,7 +19,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/AutogroupIdTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/AutogroupIdTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/AutogroupIdTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/BlockingSendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/BlockingSendTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/BlockingSendTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -17,7 +17,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A BlockingSendTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/CommitRollbackTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/CommitRollbackTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/CommitRollbackTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -30,8 +30,8 @@
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerFilterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerFilterTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerFilterTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.impl.QueueImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerRoundRobinTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerRoundRobinTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerRoundRobinTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,7 +18,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,7 +27,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerWindowSizeTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerWindowSizeTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerWindowSizeTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -37,7 +37,7 @@
import org.hornetq.core.server.Consumer;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.impl.ServerConsumerImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,12 +26,11 @@
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
public class CoreClientTest extends ServiceTestBase
{
Modified: trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -38,7 +38,7 @@
import org.hornetq.core.server.Queue;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/DeliveryOrderTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DeliveryOrderTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DeliveryOrderTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DurableQueueTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -16,11 +16,10 @@
import junit.framework.Assert;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
/**
* A TemporaryQueueTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,13 +20,12 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,6 @@
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -32,8 +31,7 @@
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.integration.jms.server.management.NullInitialContext;
-import org.hornetq.tests.util.ServiceTestBase;
-import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/HeuristicXATest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/HeuristicXATest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/HeuristicXATest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -32,7 +32,7 @@
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.impl.XidImpl;
import org.hornetq.tests.integration.management.ManagementControlHelper;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A HeuristicXATest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/InVMNonPersistentMessageBufferTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/InVMNonPersistentMessageBufferTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/InVMNonPersistentMessageBufferTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,8 +18,8 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.impl.PacketImpl;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.utils.DataConstants;
public class InVMNonPersistentMessageBufferTest extends ServiceTestBase
Modified: trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -14,14 +14,13 @@
package org.hornetq.tests.integration.client;
import static org.hornetq.tests.util.RandomUtil.randomString;
+
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.SpawnedVMSupport;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
@@ -37,12 +36,10 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.version.impl.VersionImpl;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.utils.VersionLoader;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/JournalCrashTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.journal.impl.JournalImpl;
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.SpawnedVMSupport;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageConcurrencyTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageConcurrencyTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageConcurrencyTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,8 +21,8 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageCounterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageCounterTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageCounterTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,7 +18,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageDurabilityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageDurabilityTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageDurabilityTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,8 +19,8 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageExpirationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageExpirationTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageExpirationTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.core.server.Queue;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MessageExpirationTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,11 +23,10 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageHandlerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageHandlerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageHandlerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,14 +19,12 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageRateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/MessageRateTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/MessageRateTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MessageRateTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/OrderTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/OrderTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/OrderTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A OrderTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -36,24 +36,21 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.api.jms.JMSFactoryType;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.paging.PagingStore;
-import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
import org.hornetq.core.postoffice.Binding;
import org.hornetq.core.postoffice.Bindings;
import org.hornetq.core.postoffice.impl.LocalQueueBinding;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.core.server.ServerSession;
import org.hornetq.core.server.impl.QueueImpl;
import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.jms.client.HornetQJMSConnectionFactory;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.tests.unit.util.InVMContext;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A PagingOrderTest.
Modified: trunk/tests/src/org/hornetq/tests/integration/client/PagingSyncTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/PagingSyncTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/PagingSyncTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -15,45 +15,20 @@
import java.nio.ByteBuffer;
import java.util.HashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
import org.hornetq.api.core.HornetQBuffer;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.ClientConsumer;
import org.hornetq.api.core.client.ClientMessage;
import org.hornetq.api.core.client.ClientProducer;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.api.jms.HornetQJMSClient;
-import org.hornetq.api.jms.JMSFactoryType;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
-import org.hornetq.core.paging.PagingStore;
-import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
-import org.hornetq.core.postoffice.Binding;
-import org.hornetq.core.postoffice.Bindings;
-import org.hornetq.core.postoffice.impl.LocalQueueBinding;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.core.server.ServerSession;
-import org.hornetq.core.server.impl.QueueImpl;
-import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.jms.client.HornetQJMSConnectionFactory;
-import org.hornetq.jms.server.impl.JMSServerManagerImpl;
-import org.hornetq.tests.unit.util.InVMContext;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A PagingOrderTest.
Modified: trunk/tests/src/org/hornetq/tests/integration/client/PagingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -53,7 +53,7 @@
import org.hornetq.core.server.impl.HornetQServerImpl;
import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,13 +18,11 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ProducerFlowControlTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -38,8 +38,8 @@
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ProducerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ProducerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ProducerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.protocol.core.impl.PacketImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/QueueBrowserTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -15,12 +15,11 @@
import junit.framework.Assert;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ReceiveImmediateTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -29,7 +29,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ReceiveTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ReceiveTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ReceiveTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,7 +18,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/RedeliveryConsumerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/RedeliveryConsumerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/RedeliveryConsumerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -35,7 +35,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.persistence.impl.journal.JournalStorageManager;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A RedeliveryConsumerTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/RoutingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/RoutingTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/RoutingTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -17,7 +17,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SelfExpandingBufferTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SelfExpandingBufferTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SelfExpandingBufferTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,8 +20,8 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ServerLocatorConnectTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.core.client.impl.ServerLocatorInternal;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseOnGCTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateAndDeleteQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateAndDeleteQueueTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateAndDeleteQueueTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,7 @@
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.impl.LastValueQueue;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateConsumerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateConsumerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateConsumerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,7 +20,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateProducerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateProducerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCreateProducerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,7 +20,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -34,8 +34,8 @@
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionSendAcknowledgementHandlerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A SendAcknowledgementsTest
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionStopStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionStopStartTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionStopStartTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,7 +27,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* This test covers the API for ClientSession altho XA tests are tested seperately.
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SimpleSendMultipleQueues.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SimpleSendMultipleQueues.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SimpleSendMultipleQueues.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -18,7 +18,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/TemporaryQueueTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -31,12 +31,11 @@
import org.hornetq.core.protocol.core.impl.PacketImpl;
import org.hornetq.core.protocol.core.impl.RemotingConnectionImpl;
import org.hornetq.core.remoting.CloseListener;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.spi.core.protocol.RemotingConnection;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/TransactionDurabilityTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,7 +20,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/client/TransactionalSendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/TransactionalSendTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/client/TransactionalSendTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/clientcrash/ClientTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -17,7 +17,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ClientTestBase
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/NodeManagerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/NodeManagerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/NodeManagerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -15,7 +15,7 @@
import org.hornetq.core.server.NodeManager;
import org.hornetq.core.server.impl.InVMNodeManager;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeStartTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,7 +20,6 @@
import junit.framework.Assert;
-import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
@@ -32,7 +31,7 @@
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.cluster.Bridge;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A BridgeStartTest
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -42,7 +42,7 @@
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.cluster.impl.BridgeImpl;
import org.hornetq.core.transaction.impl.TransactionImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.LinkedListIterator;
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeWithDiscoveryGroupStartTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -39,7 +39,7 @@
import org.hornetq.core.remoting.impl.netty.TransportConstants;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.cluster.Bridge;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A BridgeWithDiscoveryGroupStartTest
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -38,7 +38,6 @@
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.postoffice.Binding;
import org.hornetq.core.postoffice.Bindings;
@@ -55,7 +54,7 @@
import org.hornetq.core.server.group.GroupingHandler;
import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration;
import org.hornetq.core.server.impl.InVMNodeManager;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -32,7 +32,7 @@
import org.hornetq.core.server.cluster.impl.ClusterManagerImpl;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -44,7 +44,7 @@
import org.hornetq.core.server.impl.InVMNodeManager;
import org.hornetq.tests.integration.cluster.util.SameProcessHornetQServer;
import org.hornetq.tests.integration.cluster.util.TestableServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A FailoverTestBase
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverReplicationTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -12,17 +12,6 @@
*/
package org.hornetq.tests.integration.cluster.failover;
-import java.util.Map;
-
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.server.HornetQServers;
-import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.util.ServiceTestBase;
-
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* Created Oct 26, 2009
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/GroupingFailoverSharedServerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -12,16 +12,6 @@
*/
package org.hornetq.tests.integration.cluster.failover;
-import java.util.Map;
-
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
-import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.server.HornetQServers;
-import org.hornetq.core.server.impl.InVMNodeManager;
-import org.hornetq.tests.util.ServiceTestBase;
-
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* Created Oct 26, 2009
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -36,7 +36,7 @@
import org.hornetq.core.client.impl.ServerLocatorInternal;
import org.hornetq.jms.client.HornetQTextMessage;
import org.hornetq.tests.integration.cluster.util.TestableServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MultipleBackupsFailoverTestBase
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadReattachSupport.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadReattachSupport.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadReattachSupport.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -29,7 +29,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.impl.RemotingConnectionImpl;
import org.hornetq.core.remoting.impl.invm.InVMConnector;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -30,7 +30,7 @@
import org.hornetq.core.protocol.core.impl.RemotingConnectionImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A OrderReattachTest
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -31,13 +31,12 @@
import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMRegistry;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -30,7 +30,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.jms.client.HornetQTextMessage;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/core/deployers/impl/QueueDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/core/deployers/impl/QueueDeployerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/core/deployers/impl/QueueDeployerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -14,7 +14,6 @@
package org.hornetq.tests.integration.core.deployers.impl;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.deployers.DeploymentManager;
import org.hornetq.core.deployers.impl.FileDeploymentManager;
import org.hornetq.core.deployers.impl.QueueDeployer;
@@ -22,9 +21,7 @@
import org.hornetq.core.postoffice.Bindings;
import org.hornetq.core.postoffice.impl.LocalQueueBinding;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.server.impl.HornetQServerImpl;
-import org.hornetq.tests.util.ServiceTestBase;
-import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Modified: trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/divert/DivertTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/divert/PersistentDivertTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -40,7 +40,6 @@
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMRegistry;
import org.hornetq.core.remoting.impl.invm.TransportConstants;
@@ -58,7 +57,7 @@
import org.hornetq.tests.integration.jms.server.management.JMSUtil;
import org.hornetq.tests.unit.util.InVMContext;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,6 @@
import org.hornetq.api.core.DiscoveryGroupConfiguration;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.deployers.DeploymentManager;
import org.hornetq.core.deployers.impl.FileDeploymentManager;
import org.hornetq.core.logging.Logger;
@@ -35,7 +34,7 @@
import org.hornetq.jms.server.impl.JMSServerDeployer;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.tests.unit.util.InVMContext;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import org.w3c.dom.Element;
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerStartStopTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -35,7 +35,6 @@
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.spi.core.security.HornetQSecurityManager;
import org.hornetq.spi.core.security.HornetQSecurityManagerImpl;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSConfigurationTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -36,8 +36,8 @@
import org.hornetq.jms.server.config.impl.TopicConfigurationImpl;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.tests.unit.util.InVMContext;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import java.util.ArrayList;
import java.util.List;
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,7 @@
import org.hornetq.jms.server.config.JMSQueueConfiguration;
import org.hornetq.jms.server.config.TopicConfiguration;
import org.hornetq.jms.server.impl.JMSServerConfigParserImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A JMSServerConfigParserTest
Modified: trunk/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -35,7 +35,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.DataConstants;
Modified: trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/largemessage/ServerLargeMessageTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.persistence.impl.journal.JournalStorageManager;
import org.hornetq.core.persistence.impl.journal.LargeServerMessageImpl;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -16,14 +16,13 @@
import junit.framework.Assert;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.logging.impl.JULLogDelegate;
import org.hornetq.core.logging.impl.JULLogDelegateFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.integration.logging.Log4jLogDelegate;
import org.hornetq.integration.logging.Log4jLogDelegateFactory;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A LogDelegateTest
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ManagementTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ManagementTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ManagementTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,7 @@
import org.hornetq.api.core.client.ClientConsumer;
import org.hornetq.api.core.client.ClientMessage;
import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ManagementTestBase
Modified: trunk/tests/src/org/hornetq/tests/integration/paging/PagingCounterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/paging/PagingCounterTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/paging/PagingCounterTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -29,7 +29,7 @@
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.Transaction;
import org.hornetq.core.transaction.impl.TransactionImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A PagingCounterTest
Modified: trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -28,7 +28,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A SendTest
Modified: trunk/tests/src/org/hornetq/tests/integration/persistence/DeleteQueueRestartTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/persistence/DeleteQueueRestartTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/persistence/DeleteQueueRestartTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -21,7 +21,7 @@
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A DeleteMessagesRestartTest
Modified: trunk/tests/src/org/hornetq/tests/integration/persistence/ExportFormatTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/persistence/ExportFormatTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/persistence/ExportFormatTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,7 @@
import org.hornetq.core.journal.impl.ExportJournal;
import org.hornetq.core.journal.impl.ImportJournal;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ExportFormatTest
Modified: trunk/tests/src/org/hornetq/tests/integration/persistence/RestartSMTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/persistence/RestartSMTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/persistence/RestartSMTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,10 +27,9 @@
import org.hornetq.core.persistence.QueueBindingInfo;
import org.hornetq.core.persistence.impl.journal.JournalStorageManager;
import org.hornetq.core.postoffice.PostOffice;
-import org.hornetq.core.server.JournalType;
import org.hornetq.core.server.Queue;
import org.hornetq.tests.unit.core.server.impl.fakes.FakePostOffice;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.OrderedExecutorFactory;
Modified: trunk/tests/src/org/hornetq/tests/integration/persistence/StorageManagerTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/persistence/StorageManagerTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/persistence/StorageManagerTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -28,7 +28,7 @@
import org.hornetq.jms.persistence.JMSStorageManager;
import org.hornetq.jms.persistence.impl.journal.JMSJournalStorageManagerImpl;
import org.hornetq.tests.unit.core.server.impl.fakes.FakePostOffice;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.OrderedExecutorFactory;
import org.hornetq.utils.TimeAndCounterIDGenerator;
Modified: trunk/tests/src/org/hornetq/tests/integration/ra/HornetQRATestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/ra/HornetQRATestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/ra/HornetQRATestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -17,7 +17,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.jms.client.HornetQMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import javax.jms.Message;
import javax.jms.MessageListener;
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -19,13 +19,11 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.remoting.impl.netty.TransportConstants;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/DestroyConsumerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/DestroyConsumerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/DestroyConsumerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -13,7 +13,7 @@
package org.hornetq.tests.integration.remoting;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
public class DestroyConsumerTest extends ServiceTestBase
{
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,6 @@
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.postoffice.Binding;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
@@ -35,7 +34,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.impl.QueueImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/NetworkAddressTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,14 +27,12 @@
import junit.framework.Assert;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A NetworkAddressTest
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/PingTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -34,7 +34,7 @@
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/ReconnectTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/ReconnectTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/ReconnectTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ReconnectSimpleTest
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/SynchronousCloseTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,10 +22,8 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -66,7 +66,7 @@
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.spi.core.protocol.RemotingConnection;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.OrderedExecutorFactory;
Modified: trunk/tests/src/org/hornetq/tests/integration/scheduling/DelayedMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/scheduling/DelayedMessageTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/scheduling/DelayedMessageTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -20,7 +20,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.impl.XidImpl;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.UUIDGenerator;
Modified: trunk/tests/src/org/hornetq/tests/integration/security/SecurityTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/security/SecurityTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/security/SecurityTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -41,7 +41,7 @@
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.spi.core.security.HornetQSecurityManager;
import org.hornetq.spi.core.security.JAASSecurityManager;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.jboss.security.SimpleGroup;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -31,7 +31,7 @@
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.Queue;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQRecoveryTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.impl.XidImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
Modified: trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/server/PredefinedQueueTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -28,7 +28,7 @@
import org.hornetq.core.postoffice.Bindings;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
*
Modified: trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -36,7 +36,7 @@
import org.hornetq.integration.twitter.TwitterConstants;
import org.hornetq.integration.twitter.TwitterIncomingConnectorServiceFactory;
import org.hornetq.integration.twitter.TwitterOutgoingConnectorServiceFactory;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import twitter4j.*;
import twitter4j.http.AccessToken;
Modified: trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaRecoveryTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaRecoveryTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaRecoveryTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -35,7 +35,7 @@
import org.hornetq.jms.client.HornetQBytesMessage;
import org.hornetq.jms.client.HornetQTextMessage;
import org.hornetq.tests.integration.management.ManagementControlHelper;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.UUIDGenerator;
Modified: trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/integration/xa/BasicXaTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -31,7 +31,7 @@
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.impl.XidImpl;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.UUIDGenerator;
/**
Modified: trunk/tests/src/org/hornetq/tests/performance/paging/MeasurePagingMultiThreadTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/performance/paging/MeasurePagingMultiThreadTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/performance/paging/MeasurePagingMultiThreadTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -22,7 +22,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MeasurePagingMultiThreadTest
Modified: trunk/tests/src/org/hornetq/tests/soak/client/ClientNonDivertedSoakTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/soak/client/ClientNonDivertedSoakTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/soak/client/ClientNonDivertedSoakTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -25,7 +25,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ClientSoakTest
Modified: trunk/tests/src/org/hornetq/tests/soak/client/ClientSoakTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/soak/client/ClientSoakTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/soak/client/ClientSoakTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -27,7 +27,7 @@
import org.hornetq.core.config.DivertConfiguration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ClientSoakTest
Modified: trunk/tests/src/org/hornetq/tests/soak/client/SimpleSendReceiveSoakTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/soak/client/SimpleSendReceiveSoakTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/soak/client/SimpleSendReceiveSoakTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -25,7 +25,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A ClientSoakTest
Modified: trunk/tests/src/org/hornetq/tests/stress/client/SendStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/client/SendStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/client/SendStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -17,7 +17,7 @@
import org.hornetq.api.core.client.*;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A SendStressTest
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/CompactingStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -26,7 +26,7 @@
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A CompactingTest
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/JournalCleanupCompactStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/JournalCleanupCompactStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/JournalCleanupCompactStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -40,8 +40,8 @@
import org.hornetq.core.journal.impl.JournalImpl;
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.utils.HornetQThreadFactory;
import org.hornetq.utils.OrderedExecutorFactory;
import org.hornetq.utils.SimpleIDGenerator;
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/JournalRestartStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/JournalRestartStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/JournalRestartStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -25,7 +25,7 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* Simulates the journal being updated, compacted cleared up,
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -24,7 +24,7 @@
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A LargeJournalStressTest
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -25,7 +25,7 @@
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MultiThreadConsumerStressTest
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/NIOMultiThreadCompactorStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -35,7 +35,7 @@
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.JournalType;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A MultiThreadConsumerStressTest
Modified: trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -50,7 +50,7 @@
import org.hornetq.core.transaction.impl.TransactionImpl;
import org.hornetq.tests.unit.core.postoffice.impl.FakeQueue;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
import org.hornetq.utils.LinkedListIterator;
/**
Modified: trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -28,7 +28,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* This is an integration-tests that will take some time to run.
Modified: trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/stress/remote/PingStressTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -23,7 +23,6 @@
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.Packet;
@@ -32,7 +31,7 @@
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.integration.remoting.PingTest;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
Modified: trunk/tests/src/org/hornetq/tests/util/JMSClusteredTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/JMSClusteredTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/util/JMSClusteredTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -38,6 +38,7 @@
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
import org.hornetq.tests.unit.util.InVMContext;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A JMSBaseTest
Modified: trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/util/JMSTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -31,6 +31,7 @@
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.tests.unit.util.InVMContext;
+import org.hornetq.tests.unit.util.ServiceTestBase;
/**
* A JMSBaseTest
Deleted: trunk/tests/src/org/hornetq/tests/util/RandomUtil.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/RandomUtil.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/util/RandomUtil.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -1,176 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.tests.util;
-
-import java.util.Random;
-import java.util.UUID;
-
-import javax.transaction.xa.Xid;
-
-import org.hornetq.api.core.HornetQBuffer;
-import org.hornetq.api.core.HornetQBuffers;
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.core.transaction.impl.XidImpl;
-
-/**
- * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
- *
- * @version <tt>$Revision$</tt>
- *
- */
-public class RandomUtil
-{
- // Constants -----------------------------------------------------
-
- private static final Random random = new Random(System.currentTimeMillis());
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- public static String randomString()
- {
- return UUID.randomUUID().toString();
- }
-
- public static SimpleString randomSimpleString()
- {
- return new SimpleString(RandomUtil.randomString());
- }
-
- public static char randomChar()
- {
- return RandomUtil.randomString().charAt(0);
- }
-
- public static long randomLong()
- {
- return RandomUtil.random.nextLong();
- }
-
- public static long randomPositiveLong()
- {
- return Math.abs(RandomUtil.randomLong());
- }
-
- public static int randomInt()
- {
- return RandomUtil.random.nextInt();
- }
-
- public static int randomPositiveInt()
- {
- return Math.abs(RandomUtil.randomInt());
- }
-
-
- public static HornetQBuffer randomBuffer(final int size, final long... data)
- {
- HornetQBuffer buffer = HornetQBuffers.fixedBuffer(size + 8 * data.length);
-
- for (long d : data)
- {
- buffer.writeLong(d);
- }
-
- for (int i = 0 ; i < size; i++)
- {
- buffer.writeByte((byte)randomByte());
- }
-
- return buffer;
- }
-
-
-
-
- public static int randomInterval(final int min, final int max)
- {
- return min + randomMax(max - min);
- }
-
- public static int randomMax(int max)
- {
- int value = randomPositiveInt() % max;
-
- if (value == 0)
- {
- value = max;
- }
-
- return value;
- }
-
- public static int randomPort()
- {
- return RandomUtil.random.nextInt(65536);
- }
-
- public static short randomShort()
- {
- return (short)RandomUtil.random.nextInt(Short.MAX_VALUE);
- }
-
- public static byte randomByte()
- {
- return Integer.valueOf(RandomUtil.random.nextInt()).byteValue();
- }
-
- public static boolean randomBoolean()
- {
- return RandomUtil.random.nextBoolean();
- }
-
- public static byte[] randomBytes()
- {
- return RandomUtil.randomString().getBytes();
- }
-
- public static byte[] randomBytes(final int length)
- {
- byte[] bytes = new byte[length];
- for (int i = 0; i < bytes.length; i++)
- {
- bytes[i] = RandomUtil.randomByte();
- }
- return bytes;
- }
-
- public static double randomDouble()
- {
- return RandomUtil.random.nextDouble();
- }
-
- public static float randomFloat()
- {
- return RandomUtil.random.nextFloat();
- }
-
- public static Xid randomXid()
- {
- return new XidImpl(RandomUtil.randomBytes(), RandomUtil.randomInt(), RandomUtil.randomBytes());
- }
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Deleted: trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -1,572 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.tests.util;
-
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import junit.framework.Assert;
-
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.ClientMessage;
-import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.api.core.client.ClientSessionFactory;
-import org.hornetq.api.core.client.HornetQClient;
-import org.hornetq.api.core.client.ServerLocator;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
-import org.hornetq.core.config.Configuration;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMRegistry;
-import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
-import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.server.HornetQServers;
-import org.hornetq.core.server.NodeManager;
-import org.hornetq.core.server.impl.HornetQServerImpl;
-import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
-import org.hornetq.core.settings.impl.AddressSettings;
-import org.hornetq.jms.client.HornetQBytesMessage;
-import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.spi.core.security.HornetQSecurityManager;
-import org.hornetq.spi.core.security.HornetQSecurityManagerImpl;
-
-/**
- *
- * Base class with basic utilities on starting up a basic server
- *
- * @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
- *
- */
-public abstract class ServiceTestBase extends UnitTestCase
-{
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- protected static final String INVM_ACCEPTOR_FACTORY = InVMAcceptorFactory.class.getCanonicalName();
-
- public static final String INVM_CONNECTOR_FACTORY = InVMConnectorFactory.class.getCanonicalName();
-
- protected static final String NETTY_ACCEPTOR_FACTORY = NettyAcceptorFactory.class.getCanonicalName();
-
- protected static final String NETTY_CONNECTOR_FACTORY = NettyConnectorFactory.class.getCanonicalName();
-
- private List<ServerLocator> locators = new ArrayList<ServerLocator>();
-
- @Override
- protected void tearDown() throws Exception
- {
- for (ServerLocator locator : locators)
- {
- try
- {
- locator.close();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- locators.clear();
- super.tearDown();
- checkFreePort(5445);
- checkFreePort(5446);
- checkFreePort(5447);
- if (InVMRegistry.instance.size() > 0)
- {
- fail("InVMREgistry size > 0");
- }
- }
-
- protected static Map<String, Object> generateParams(final int node, final boolean netty)
- {
- Map<String, Object> params = new HashMap<String, Object>();
-
- if (netty)
- {
- params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
- org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + node);
- }
- else
- {
- params.put(org.hornetq.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, node);
- }
-
- return params;
- }
-
- protected static TransportConfiguration createTransportConfiguration(boolean netty,
- boolean acceptor,
- Map<String, Object> params)
- {
- String className;
- if (netty)
- {
- if (acceptor)
- {
- className = NettyAcceptorFactory.class.getName();
- }
- else
- {
- className = NettyConnectorFactory.class.getName();
- }
- }
- else
- {
- if (acceptor)
- {
- className = InVMAcceptorFactory.class.getName();
- }
- else
- {
- className = InVMConnectorFactory.class.getName();
- }
- }
- return new TransportConfiguration(className, params);
- }
-
- // Static --------------------------------------------------------
- private final Logger log = Logger.getLogger(this.getClass());
-
- // Constructors --------------------------------------------------
-
- public ServiceTestBase()
- {
- super();
- }
-
- public ServiceTestBase(final String name)
- {
- super(name);
- }
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- protected HornetQServer createServer(final boolean realFiles,
- final Configuration configuration,
- final int pageSize,
- final int maxAddressSize,
- final Map<String, AddressSettings> settings,
- final MBeanServer mbeanServer)
- {
- HornetQServer server;
-
- if (realFiles)
- {
- server = HornetQServers.newHornetQServer(configuration, mbeanServer, true);
- }
- else
- {
- server = HornetQServers.newHornetQServer(configuration, mbeanServer, false);
- }
-
- for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
- {
- server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
- }
-
- AddressSettings defaultSetting = new AddressSettings();
- defaultSetting.setPageSizeBytes(pageSize);
- defaultSetting.setMaxSizeBytes(maxAddressSize);
-
- server.getAddressSettingsRepository().addMatch("#", defaultSetting);
-
- return server;
- }
-
- protected HornetQServer createServer(final boolean realFiles,
- final Configuration configuration,
- final int pageSize,
- final int maxAddressSize,
- final Map<String, AddressSettings> settings)
- {
- return createServer(realFiles, configuration, pageSize, maxAddressSize, AddressFullMessagePolicy.PAGE, settings);
- }
-
- protected HornetQServer createServer(final boolean realFiles,
- final Configuration configuration,
- final int pageSize,
- final int maxAddressSize,
- final AddressFullMessagePolicy fullPolicy,
- final Map<String, AddressSettings> settings)
- {
- HornetQServer server;
-
- if (realFiles)
- {
- server = HornetQServers.newHornetQServer(configuration);
- }
- else
- {
- server = HornetQServers.newHornetQServer(configuration, false);
- }
-
- for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
- {
- server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
- }
-
- AddressSettings defaultSetting = new AddressSettings();
- defaultSetting.setPageSizeBytes(pageSize);
- defaultSetting.setMaxSizeBytes(maxAddressSize);
- defaultSetting.setAddressFullMessagePolicy(fullPolicy);
-
- server.getAddressSettingsRepository().addMatch("#", defaultSetting);
-
- return server;
- }
-
- protected HornetQServer createServer(final boolean realFiles,
- final Configuration configuration,
- final MBeanServer mbeanServer,
- final Map<String, AddressSettings> settings)
- {
- HornetQServer server;
-
- if (realFiles)
- {
- server = HornetQServers.newHornetQServer(configuration, mbeanServer);
- }
- else
- {
- server = HornetQServers.newHornetQServer(configuration, mbeanServer, false);
- }
-
- for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
- {
- server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
- }
-
- AddressSettings defaultSetting = new AddressSettings();
- server.getAddressSettingsRepository().addMatch("#", defaultSetting);
-
- return server;
- }
-
- protected HornetQServer createServer(final boolean realFiles)
- {
- return createServer(realFiles, false);
- }
-
- protected HornetQServer createServer(final boolean realFiles, final boolean netty)
- {
- return createServer(realFiles, createDefaultConfig(netty), -1, -1, new HashMap<String, AddressSettings>());
- }
-
- protected HornetQServer createServer(final boolean realFiles, final Configuration configuration)
- {
- return createServer(realFiles, configuration, -1, -1, new HashMap<String, AddressSettings>());
- }
-
- protected HornetQServer createInVMFailoverServer(final boolean realFiles,
- final Configuration configuration,
- NodeManager nodeManager)
- {
- return createInVMFailoverServer(realFiles,
- configuration,
- -1,
- -1,
- new HashMap<String, AddressSettings>(),
- nodeManager);
- }
-
- protected HornetQServer createInVMFailoverServer(final boolean realFiles,
- final Configuration configuration,
- final int pageSize,
- final int maxAddressSize,
- final Map<String, AddressSettings> settings,
- NodeManager nodeManager)
- {
- HornetQServer server;
- HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl();
- configuration.setPersistenceEnabled(realFiles);
- server = new InVMNodeManagerServer(configuration,
- ManagementFactory.getPlatformMBeanServer(),
- securityManager,
- nodeManager);
-
- for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
- {
- server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
- }
-
- AddressSettings defaultSetting = new AddressSettings();
- defaultSetting.setPageSizeBytes(pageSize);
- defaultSetting.setMaxSizeBytes(maxAddressSize);
-
- server.getAddressSettingsRepository().addMatch("#", defaultSetting);
-
- return server;
- }
-
- protected HornetQServer createServer(final boolean realFiles,
- final Configuration configuration,
- final HornetQSecurityManager securityManager)
- {
- HornetQServer server;
-
- if (realFiles)
- {
- server = HornetQServers.newHornetQServer(configuration,
- ManagementFactory.getPlatformMBeanServer(),
- securityManager);
- }
- else
- {
- server = HornetQServers.newHornetQServer(configuration,
- ManagementFactory.getPlatformMBeanServer(),
- securityManager,
- false);
- }
-
- Map<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
-
- for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
- {
- server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
- }
-
- AddressSettings defaultSetting = new AddressSettings();
-
- server.getAddressSettingsRepository().addMatch("#", defaultSetting);
-
- return server;
- }
-
- protected HornetQServer createClusteredServerWithParams(final boolean isNetty,
- final int index,
- final boolean realFiles,
- final Map<String, Object> params)
- {
- if (isNetty)
- {
- return createServer(realFiles,
- createClusteredDefaultConfig(index, params, NETTY_ACCEPTOR_FACTORY),
- -1,
- -1,
- new HashMap<String, AddressSettings>());
- }
- else
- {
- return createServer(realFiles,
- createClusteredDefaultConfig(index, params, INVM_ACCEPTOR_FACTORY),
- -1,
- -1,
- new HashMap<String, AddressSettings>());
- }
- }
-
- protected HornetQServer createClusteredServerWithParams(final boolean isNetty,
- final int index,
- final boolean realFiles,
- final int pageSize,
- final int maxAddressSize,
- final Map<String, Object> params)
- {
- if (isNetty)
- {
- return createServer(realFiles,
- createClusteredDefaultConfig(index, params, NETTY_ACCEPTOR_FACTORY),
- pageSize,
- maxAddressSize,
- new HashMap<String, AddressSettings>());
- }
- else
- {
- return createServer(realFiles,
- createClusteredDefaultConfig(index, params, INVM_ACCEPTOR_FACTORY),
- -1,
- -1,
- new HashMap<String, AddressSettings>());
- }
- }
-
- protected ServerLocator createFactory(final boolean isNetty) throws Exception
- {
- if (isNetty)
- {
- return createNettyNonHALocator();
- }
- else
- {
- return createInVMNonHALocator();
- }
- }
-
- protected void createQueue(String address, String queue) throws Exception
- {
- ServerLocator locator = createInVMNonHALocator();
- ClientSessionFactory sf = locator.createSessionFactory();
- ClientSession session = sf.createSession();
- session.createQueue(address, queue);
- session.close();
- sf.close();
- locator.close();
- }
-
- protected ServerLocator createInVMNonHALocator()
- {
- return createNonHALocator(false);
- }
-
- protected ServerLocator createNettyNonHALocator()
- {
- return createNonHALocator(true);
- }
-
- protected ServerLocator createNonHALocator(final boolean isNetty)
- {
- ServerLocator locatorWithoutHA = isNetty ? HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY))
- : HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY));
- locators.add(locatorWithoutHA);
- return locatorWithoutHA;
- }
-
- protected ClientSessionFactoryImpl createFactory(final String connectorClass) throws Exception
- {
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(connectorClass));
- return (ClientSessionFactoryImpl)locator.createSessionFactory();
-
- }
-
- protected ClientMessage createTextMessage(final ClientSession session, final String s)
- {
- return createTextMessage(session, s, true);
- }
-
- public String getTextMessage(final ClientMessage m)
- {
- m.getBodyBuffer().resetReaderIndex();
- return m.getBodyBuffer().readString();
- }
-
- protected ClientMessage createTextMessage(final ClientSession session, final String s, final boolean durable)
- {
- ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
- durable,
- 0,
- System.currentTimeMillis(),
- (byte)1);
- message.getBodyBuffer().writeString(s);
- return message;
- }
-
- protected ClientMessage createBytesMessage(final ClientSession session, final byte[] b, final boolean durable)
- {
- ClientMessage message = session.createMessage(HornetQBytesMessage.TYPE,
- durable,
- 0,
- System.currentTimeMillis(),
- (byte)1);
- message.getBodyBuffer().writeBytes(b);
- return message;
- }
-
- /**
- * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking for a while if the file hasn't been deleted yet
- */
- protected void validateNoFilesOnLargeDir(final int expect) throws Exception
- {
- File largeMessagesFileDir = new File(getLargeMessagesDir());
-
- // Deleting the file is async... we keep looking for a period of the time until the file is really gone
- long timeout = System.currentTimeMillis() + 5000;
- while (timeout > System.currentTimeMillis() && largeMessagesFileDir.listFiles().length != expect)
- {
- Thread.sleep(100);
- }
-
-
- if (expect != largeMessagesFileDir.listFiles().length)
- {
- for (File file : largeMessagesFileDir.listFiles())
- {
- System.out.println("File " + file + " still on ");
- }
- }
-
- Assert.assertEquals(expect, largeMessagesFileDir.listFiles().length);
- }
-
- /**
- * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking for a while if the file hasn't been deleted yet
- */
- protected void validateNoFilesOnLargeDir() throws Exception
- {
- validateNoFilesOnLargeDir(0);
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
- class InVMNodeManagerServer extends HornetQServerImpl
- {
- final NodeManager nodeManager;
-
- public InVMNodeManagerServer(NodeManager nodeManager)
- {
- super();
- this.nodeManager = nodeManager;
- }
-
- public InVMNodeManagerServer(Configuration configuration, NodeManager nodeManager)
- {
- super(configuration);
- this.nodeManager = nodeManager;
- }
-
- public InVMNodeManagerServer(Configuration configuration, MBeanServer mbeanServer, NodeManager nodeManager)
- {
- super(configuration, mbeanServer);
- this.nodeManager = nodeManager;
- }
-
- public InVMNodeManagerServer(Configuration configuration,
- HornetQSecurityManager securityManager,
- NodeManager nodeManager)
- {
- super(configuration, securityManager);
- this.nodeManager = nodeManager;
- }
-
- public InVMNodeManagerServer(Configuration configuration,
- MBeanServer mbeanServer,
- HornetQSecurityManager securityManager,
- NodeManager nodeManager)
- {
- super(configuration, mbeanServer, securityManager);
- this.nodeManager = nodeManager;
- }
-
- @Override
- protected NodeManager createNodeManager(String directory)
- {
- return nodeManager;
- }
-
- }
-}
Deleted: trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-04-08 10:24:03 UTC (rev 10468)
+++ trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -1,1245 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.tests.util;
-
-import java.beans.BeanInfo;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.net.ServerSocket;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.naming.Context;
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.Xid;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.hornetq.api.core.HornetQBuffer;
-import org.hornetq.api.core.HornetQException;
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.ClientMessage;
-import org.hornetq.api.core.client.ClientSession;
-import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
-import org.hornetq.core.client.impl.ServerLocatorImpl;
-import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
-import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
-import org.hornetq.core.logging.Logger;
-import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
-import org.hornetq.core.postoffice.Binding;
-import org.hornetq.core.postoffice.Bindings;
-import org.hornetq.core.postoffice.PostOffice;
-import org.hornetq.core.postoffice.QueueBinding;
-import org.hornetq.core.postoffice.impl.LocalQueueBinding;
-import org.hornetq.core.remoting.impl.invm.InVMRegistry;
-import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.server.JournalType;
-import org.hornetq.core.server.MessageReference;
-import org.hornetq.core.server.Queue;
-import org.hornetq.core.server.ServerMessage;
-import org.hornetq.core.server.impl.ServerMessageImpl;
-import org.hornetq.core.transaction.impl.XidImpl;
-import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.utils.UUIDGenerator;
-
-/**
- *
- * Helper base class for our unit tests
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- * @author <a href="mailto:csuconic@redhat.com">Clebert</a>
- *
- */
-public class UnitTestCase extends TestCase
-{
- // Constants -----------------------------------------------------
-
- private static final Logger log = Logger.getLogger(UnitTestCase.class);
-
- public static final String INVM_ACCEPTOR_FACTORY = "org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory";
-
- public static final String INVM_CONNECTOR_FACTORY = "org.hornetq.core.remoting.impl.invm.InVMConnectorFactory";
-
- public static final String NETTY_ACCEPTOR_FACTORY = "org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory";
-
- public static final String NETTY_CONNECTOR_FACTORY = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory";
-
- // Attributes ----------------------------------------------------
-
- private static final String testDir = System.getProperty("java.io.tmpdir", "/tmp") + "/hornetq-unit-test";
-
- // There is a verification about thread leakages. We only fail a single thread when this happens
- private static Set<Thread> alreadyFailedThread = new HashSet<Thread>();
-
- // Static --------------------------------------------------------
-
- protected Configuration createDefaultConfig()
- {
- return createDefaultConfig(false);
- }
-
- protected Configuration createDefaultConfig(final boolean netty)
- {
- if (netty)
- {
- return createDefaultConfig(new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY, NETTY_ACCEPTOR_FACTORY);
- }
- else
- {
- return createDefaultConfig(new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY);
- }
- }
-
- protected static Configuration createClusteredDefaultConfig(final int index,
- final Map<String, Object> params,
- final String... acceptors)
- {
- Configuration config = createDefaultConfig(index, params, acceptors);
-
- config.setClustered(true);
-
- return config;
- }
-
- protected static Configuration createDefaultConfig(final int index,
- final Map<String, Object> params,
- final String... acceptors)
- {
- Configuration configuration = createBasicConfig(index);
-
- configuration.getAcceptorConfigurations().clear();
-
- for (String acceptor : acceptors)
- {
- TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
- configuration.getAcceptorConfigurations().add(transportConfig);
- }
-
- return configuration;
- }
-
- protected static ConfigurationImpl createBasicConfig()
- {
- return createBasicConfig(0);
- }
-
- /**
- * @param serverID
- * @return
- */
- protected static ConfigurationImpl createBasicConfig(final int serverID)
- {
- ConfigurationImpl configuration = new ConfigurationImpl();
- configuration.setSecurityEnabled(false);
- configuration.setBindingsDirectory(getBindingsDir(serverID, false));
- configuration.setJournalMinFiles(2);
- configuration.setJournalDirectory(getJournalDir(serverID, false));
- configuration.setJournalFileSize(100 * 1024);
- configuration.setJournalType(getDefaultJournalType());
- configuration.setPagingDirectory(getPageDir(serverID, false));
- configuration.setLargeMessagesDirectory(getLargeMessagesDir(serverID, false));
- configuration.setJournalCompactMinFiles(0);
- configuration.setJournalCompactPercentage(0);
- return configuration;
- }
-
- protected static Configuration createDefaultConfig(final Map<String, Object> params, final String... acceptors)
- {
- Configuration configuration = new ConfigurationImpl();
- configuration.setSecurityEnabled(false);
- configuration.setJMXManagementEnabled(false);
- configuration.setBindingsDirectory(getBindingsDir());
- configuration.setJournalMinFiles(2);
- configuration.setJournalDirectory(getJournalDir());
- configuration.setJournalFileSize(100 * 1024);
- configuration.setPagingDirectory(getPageDir());
- configuration.setLargeMessagesDirectory(getLargeMessagesDir());
- configuration.setJournalCompactMinFiles(0);
- configuration.setJournalCompactPercentage(0);
-
- configuration.setFileDeploymentEnabled(false);
-
- configuration.setJournalType(getDefaultJournalType());
-
- configuration.getAcceptorConfigurations().clear();
-
- for (String acceptor : acceptors)
- {
- TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
- configuration.getAcceptorConfigurations().add(transportConfig);
- }
-
- return configuration;
- }
-
- protected static String getUDPDiscoveryAddress()
- {
- return System.getProperty("TEST-UDP-ADDRESS", "230.1.2.3");
- }
-
- protected static String getUDPDiscoveryAddress(int variant)
- {
- String value = getUDPDiscoveryAddress();
-
- int posPoint = value.lastIndexOf('.');
-
- int last = Integer.valueOf(value.substring(posPoint + 1));
-
- return value.substring(0, posPoint + 1) + (last + variant);
- }
-
- public static int getUDPDiscoveryPort()
- {
- return Integer.parseInt(System.getProperty("TEST-UDP-PORT", "6750"));
- }
-
- public static int getUDPDiscoveryPort(final int variant)
- {
- return getUDPDiscoveryPort() + variant;
- }
-
- protected static JournalType getDefaultJournalType()
- {
- if (AsynchronousFileImpl.isLoaded())
- {
- return JournalType.ASYNCIO;
- }
- else
- {
- return JournalType.NIO;
- }
- }
-
- /**
- * @param name
- */
- public UnitTestCase(final String name)
- {
- super(name);
- }
-
- public UnitTestCase()
- {
- super();
- }
-
- public static void forceGC()
- {
- WeakReference<Object> dumbReference = new WeakReference<Object>(new Object());
- // A loop that will wait GC, using the minimal time as possible
- while (dumbReference.get() != null)
- {
- System.gc();
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- }
- }
- }
-
- public static void forceGC(Reference<?> ref, long timeout)
- {
- long waitUntil = System.currentTimeMillis() + timeout;
- // A loop that will wait GC, using the minimal time as possible
- while (ref.get() != null && System.currentTimeMillis() < waitUntil)
- {
- ArrayList<String> list = new ArrayList<String>();
- for (int i = 0; i < 1000; i++)
- {
- list.add("Some string with garbage with concatenation " + i);
- }
- list.clear();
- list = null;
- System.gc();
- try
- {
- Thread.sleep(500);
- }
- catch (InterruptedException e)
- {
- }
- }
- }
-
- // verify if these weak references are released after a few GCs
- public static void checkWeakReferences(final WeakReference<?>... references)
- {
-
- int i = 0;
- boolean hasValue = false;
-
- do
- {
- hasValue = false;
-
- if (i > 0)
- {
- UnitTestCase.forceGC();
- }
-
- for (WeakReference<?> ref : references)
- {
- if (ref.get() != null)
- {
- hasValue = true;
- }
- }
- }
- while (i++ <= 30 && hasValue);
-
- for (WeakReference<?> ref : references)
- {
- Assert.assertNull(ref.get());
- }
- }
-
- public static String threadDump(final String msg)
- {
- StringWriter str = new StringWriter();
- PrintWriter out = new PrintWriter(str);
-
- Map<Thread, StackTraceElement[]> stackTrace = Thread.getAllStackTraces();
-
- out.println("*******************************************************************************");
- out.println("Complete Thread dump " + msg);
-
- for (Map.Entry<Thread, StackTraceElement[]> el : stackTrace.entrySet())
- {
- out.println("===============================================================================");
- out.println("Thread " + el.getKey() +
- " name = " +
- el.getKey().getName() +
- " id = " +
- el.getKey().getId() +
- " group = " +
- el.getKey().getThreadGroup());
- out.println();
- for (StackTraceElement traceEl : el.getValue())
- {
- out.println(traceEl);
- }
- }
-
- out.println("===============================================================================");
- out.println("End Thread dump " + msg);
- out.println("*******************************************************************************");
-
- return str.toString();
- }
-
- protected static TestSuite createAIOTestSuite(final Class<?> clazz)
- {
- TestSuite suite = new TestSuite(clazz.getName() + " testsuite");
-
- if (AIOSequentialFileFactory.isSupported())
- {
- suite.addTestSuite(clazz);
- }
- else
- {
- // System.out goes towards JUnit report
- System.out.println("Test " + clazz.getName() + " ignored as AIO is not available");
- }
-
- return suite;
- }
-
- public static String dumpBytes(final byte[] bytes)
- {
- StringBuffer buff = new StringBuffer();
-
- buff.append(System.identityHashCode(bytes) + ", size: " + bytes.length + " [");
-
- for (int i = 0; i < bytes.length; i++)
- {
- buff.append(bytes[i]);
-
- if (i != bytes.length - 1)
- {
- buff.append(", ");
- }
- }
-
- buff.append("]");
-
- return buff.toString();
- }
-
- public static String dumbBytesHex(final byte[] buffer, final int bytesPerLine)
- {
-
- StringBuffer buff = new StringBuffer();
-
- buff.append("[");
-
- for (int i = 0; i < buffer.length; i++)
- {
- buff.append(String.format("%1$2X", buffer[i]));
- if (i + 1 < buffer.length)
- {
- buff.append(", ");
- }
- if ((i + 1) % bytesPerLine == 0)
- {
- buff.append("\n ");
- }
- }
- buff.append("]");
-
- return buff.toString();
- }
-
- public static void assertEqualsByteArrays(final byte[] expected, final byte[] actual)
- {
- // assertEquals(expected.length, actual.length);
- for (int i = 0; i < expected.length; i++)
- {
- Assert.assertEquals("byte at index " + i, expected[i], actual[i]);
- }
- }
-
- public static void assertEqualsTransportConfigurations(final TransportConfiguration[] expected,
- final TransportConfiguration[] actual)
- {
- assertEquals(expected.length, actual.length);
- for (int i = 0; i < expected.length; i++)
- {
- Assert.assertEquals("TransportConfiguration at index " + i, expected[i], actual[i]);
- }
- }
-
- public static void assertEqualsBuffers(final int size, final HornetQBuffer expected, final HornetQBuffer actual)
- {
- // assertEquals(expected.length, actual.length);
- expected.readerIndex(0);
- actual.readerIndex(0);
-
- for (int i = 0; i < size; i++)
- {
- byte b1 = expected.readByte();
- byte b2 = actual.readByte();
- Assert.assertEquals("byte at index " + i, b1, b2);
- }
- expected.resetReaderIndex();
- actual.resetReaderIndex();
- }
-
- public static void assertEqualsByteArrays(final int length, final byte[] expected, final byte[] actual)
- {
- // we check only for the given length (the arrays might be
- // larger)
- Assert.assertTrue(expected.length >= length);
- Assert.assertTrue(actual.length >= length);
- for (int i = 0; i < length; i++)
- {
- Assert.assertEquals("byte at index " + i, expected[i], actual[i]);
- }
- }
-
- public static void assertSameXids(final List<Xid> expected, final List<Xid> actual)
- {
- Assert.assertNotNull(expected);
- Assert.assertNotNull(actual);
- Assert.assertEquals(expected.size(), actual.size());
-
- for (int i = 0; i < expected.size(); i++)
- {
- Xid expectedXid = expected.get(i);
- Xid actualXid = actual.get(i);
- UnitTestCase.assertEqualsByteArrays(expectedXid.getBranchQualifier(), actualXid.getBranchQualifier());
- Assert.assertEquals(expectedXid.getFormatId(), actualXid.getFormatId());
- UnitTestCase.assertEqualsByteArrays(expectedXid.getGlobalTransactionId(), actualXid.getGlobalTransactionId());
- }
- }
-
- protected static void checkNoBinding(final Context context, final String binding)
- {
- try
- {
- context.lookup(binding);
- Assert.fail("there must be no resource to look up for " + binding);
- }
- catch (Exception e)
- {
- }
- }
-
- protected static Object checkBinding(final Context context, final String binding) throws Exception
- {
- Object o = context.lookup(binding);
- Assert.assertNotNull(o);
- return o;
- }
-
- /**
- * @param connectorConfigs
- * @return
- */
- protected ArrayList<String> registerConnectors(final HornetQServer server,
- final List<TransportConfiguration> connectorConfigs)
- {
- // The connectors need to be pre-configured at main config object but this method is taking
- // TransportConfigurations directly
- // So this will first register them at the config and then generate a list of objects
- ArrayList<String> connectors = new ArrayList<String>();
- for (TransportConfiguration tnsp : connectorConfigs)
- {
- String name = RandomUtil.randomString();
-
- server.getConfiguration().getConnectorConfigurations().put(name, tnsp);
-
- connectors.add(name);
- }
- return connectors;
- }
-
- protected static void checkFreePort(final int... ports)
- {
- for (int port : ports)
- {
- ServerSocket ssocket = null;
- try
- {
- ssocket = new ServerSocket(port);
- }
- catch (Exception e)
- {
- System.out.println("port " + port + " is already bound");
- System.exit(0);
- }
- finally
- {
- if (ssocket != null)
- {
- try
- {
- ssocket.close();
- }
- catch (IOException e)
- {
- }
- }
- }
- }
- }
-
- // Constructors --------------------------------------------------
-
- // Protected -----------------------------------------------------
-
- /**
- * @return the testDir
- */
- protected String getTestDir()
- {
- return testDir;
- }
-
- protected void clearData()
- {
- clearData(getTestDir());
- }
-
- protected void clearData(final String testDir)
- {
- // Need to delete the root
-
- File file = new File(testDir);
- deleteDirectory(file);
- file.mkdirs();
-
- recreateDirectory(getJournalDir(testDir));
- recreateDirectory(getBindingsDir(testDir));
- recreateDirectory(getPageDir(testDir));
- recreateDirectory(getLargeMessagesDir(testDir));
- recreateDirectory(getClientLargeMessagesDir(testDir));
- recreateDirectory(getTemporaryDir(testDir));
-
- System.out.println("deleted " + testDir);
- }
-
- /**
- * @return the journalDir
- */
- public static String getJournalDir()
- {
- return getJournalDir(testDir);
- }
-
- protected static String getJournalDir(final String testDir)
- {
- return testDir + "/journal";
- }
-
- protected static String getJournalDir(final int index, final boolean backup)
- {
- String dir = getJournalDir(testDir) + index + "-" + (backup ? "B" : "L");
-
- return dir;
- }
-
- /**
- * @return the bindingsDir
- */
- protected static String getBindingsDir()
- {
- return getBindingsDir(testDir);
- }
-
- /**
- * @return the bindingsDir
- */
- protected static String getBindingsDir(final String testDir)
- {
- return testDir + "/bindings";
- }
-
- /**
- * @return the bindingsDir
- */
- protected static String getBindingsDir(final int index, final boolean backup)
- {
- return getBindingsDir(testDir) + index + "-" + (backup ? "B" : "L");
- }
-
- /**
- * @return the pageDir
- */
- protected static String getPageDir()
- {
- return getPageDir(testDir);
- }
-
- /**
- * @return the pageDir
- */
- protected static String getPageDir(final String testDir)
- {
- return testDir + "/page";
- }
-
- protected static String getPageDir(final int index, final boolean backup)
- {
- return getPageDir(testDir) + index + "-" + (backup ? "B" : "L");
- }
-
- /**
- * @return the largeMessagesDir
- */
- protected static String getLargeMessagesDir()
- {
- return getLargeMessagesDir(testDir);
- }
-
- /**
- * @return the largeMessagesDir
- */
- protected static String getLargeMessagesDir(final String testDir)
- {
- return testDir + "/large-msg";
- }
-
- protected static String getLargeMessagesDir(final int index, final boolean backup)
- {
- return getLargeMessagesDir(testDir) + index + "-" + (backup ? "B" : "L");
- }
-
- /**
- * @return the clientLargeMessagesDir
- */
- protected String getClientLargeMessagesDir()
- {
- return getClientLargeMessagesDir(testDir);
- }
-
- /**
- * @return the clientLargeMessagesDir
- */
- protected String getClientLargeMessagesDir(final String testDir)
- {
- return testDir + "/client-large-msg";
- }
-
- /**
- * @return the temporaryDir
- */
- protected String getTemporaryDir()
- {
- return getTemporaryDir(testDir);
- }
-
- /**
- * @return the temporaryDir
- */
- protected String getTemporaryDir(final String testDir)
- {
- return testDir + "/temp";
- }
-
- protected static void expectHornetQException(final String message, final int errorCode, final HornetQAction action)
- {
- try
- {
- action.run();
- Assert.fail(message);
- }
- catch (Exception e)
- {
- Assert.assertTrue(e instanceof HornetQException);
- Assert.assertEquals(errorCode, ((HornetQException)e).getCode());
- }
- }
-
- protected static void expectHornetQException(final int errorCode, final HornetQAction action)
- {
- UnitTestCase.expectHornetQException("must throw a HornetQException with the expected errorCode: " + errorCode,
- errorCode,
- action);
- }
-
- protected static void expectXAException(final int errorCode, final HornetQAction action)
- {
- try
- {
- action.run();
- Assert.fail("must throw a XAException with the expected errorCode: " + errorCode);
- }
- catch (Exception e)
- {
- Assert.assertTrue(e instanceof XAException);
- Assert.assertEquals(errorCode, ((XAException)e).errorCode);
- }
- }
-
- public static byte getSamplebyte(final long position)
- {
- return (byte)('a' + position % ('z' - 'a' + 1));
- }
-
- // Creates a Fake LargeStream without using a real file
- public static InputStream createFakeLargeStream(final long size) throws Exception
- {
- return new InputStream()
- {
- private long count;
-
- private boolean closed = false;
-
- @Override
- public void close() throws IOException
- {
- super.close();
- closed = true;
- }
-
- @Override
- public int read() throws IOException
- {
- if (closed)
- {
- throw new IOException("Stream was closed");
- }
- if (count++ < size)
- {
- return UnitTestCase.getSamplebyte(count - 1);
- }
- else
- {
- return -1;
- }
- }
- };
-
- }
-
- /** It validates a Bean (POJO) using simple setters and getters with random values.
- * You can pass a list of properties to be ignored, as some properties will have a pre-defined domain (not being possible to use random-values on them) */
- protected void validateGettersAndSetters(final Object pojo, final String... IgnoredProperties) throws Exception
- {
- HashSet<String> ignoreSet = new HashSet<String>();
-
- for (String ignore : IgnoredProperties)
- {
- ignoreSet.add(ignore);
- }
-
- BeanInfo info = Introspector.getBeanInfo(pojo.getClass());
-
- PropertyDescriptor properties[] = info.getPropertyDescriptors();
-
- for (PropertyDescriptor prop : properties)
- {
- Object value;
-
- if (prop.getPropertyType() == String.class)
- {
- value = RandomUtil.randomString();
- }
- else if (prop.getPropertyType() == Integer.class || prop.getPropertyType() == Integer.TYPE)
- {
- value = RandomUtil.randomInt();
- }
- else if (prop.getPropertyType() == Long.class || prop.getPropertyType() == Long.TYPE)
- {
- value = RandomUtil.randomLong();
- }
- else if (prop.getPropertyType() == Boolean.class || prop.getPropertyType() == Boolean.TYPE)
- {
- value = RandomUtil.randomBoolean();
- }
- else if (prop.getPropertyType() == Double.class || prop.getPropertyType() == Double.TYPE)
- {
- value = RandomUtil.randomDouble();
- }
- else
- {
- System.out.println("Can't validate property of type " + prop.getPropertyType() + " on " + prop.getName());
- value = null;
- }
-
- if (value != null && prop.getWriteMethod() != null && prop.getReadMethod() == null)
- {
- System.out.println("WriteOnly property " + prop.getName() + " on " + pojo.getClass());
- }
- else if (value != null & prop.getWriteMethod() != null &&
- prop.getReadMethod() != null &&
- !ignoreSet.contains(prop.getName()))
- {
- System.out.println("Validating " + prop.getName() + " type = " + prop.getPropertyType());
- prop.getWriteMethod().invoke(pojo, value);
-
- Assert.assertEquals("Property " + prop.getName(), value, prop.getReadMethod().invoke(pojo));
- }
- }
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- Map<Thread, StackTraceElement[]> previousThreads;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- deleteDirectory(new File(getTestDir()));
-
- InVMRegistry.instance.clear();
-
- // checkFreePort(TransportConstants.DEFAULT_PORT);
-
- previousThreads = Thread.getAllStackTraces();
-
- UnitTestCase.log.info("###### starting test " + this.getClass().getName() + "." + getName());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- cleanupPools();
-
- Map<Thread, StackTraceElement[]> threadMap = Thread.getAllStackTraces();
- for (Thread thread : threadMap.keySet())
- {
- StackTraceElement[] stack = threadMap.get(thread);
- for (StackTraceElement stackTraceElement : stack)
- {
- if (stackTraceElement.getMethodName().contains("getConnectionWithRetry") && !alreadyFailedThread.contains(thread))
- {
- alreadyFailedThread.add(thread);
- System.out.println(threadDump(this.getName() + " has left threads running. Look at thread " +
- thread.getName() +
- " id = " +
- thread.getId() +
- " has running locators on test " +
- this.getName() +
- " on this following dump"));
- fail("test left serverlocator running, this could effect other tests");
- // System.exit(0);
- }
- else if (stackTraceElement.getMethodName().contains("BroadcastGroupImpl.run") && !alreadyFailedThread.contains(thread))
- {
- alreadyFailedThread.add(thread);
- System.out.println(threadDump(this.getName() + " has left threads running. Look at thread " +
- thread.getName() +
- " id = " +
- thread.getId() +
- " is still broadcasting " +
- this.getName() +
- " on this following dump"));
- fail("test left broadcastgroupimpl running, this could effect other tests");
- // System.exit(0);
- }
- }
- }
-
- Map<Thread, StackTraceElement[]> postThreads = Thread.getAllStackTraces();
-
- boolean failedThread = false;
- if (postThreads.size() > previousThreads.size())
- {
- StringBuffer buffer = new StringBuffer();
-
-
- buffer.append("*********************************************************************************\n");
- buffer.append("LEAKING THREADS\n");
-
- for (Thread aliveThread : postThreads.keySet())
- {
- if (!aliveThread.getName().contains("SunPKCS11") && !previousThreads.containsKey(aliveThread))
- {
- failedThread = true;
- buffer.append("=============================================================================\n");
- buffer.append("Thread " + aliveThread + " is still alive with the following stackTrace:\n");
- StackTraceElement[] elements = postThreads.get(aliveThread);
- for (StackTraceElement el : elements)
- {
- buffer.append(el + "\n");
- }
- }
-
- }
- buffer.append("*********************************************************************************\n");
-
- System.out.println(buffer.toString());
-
- }
-
- //assertFalse("Thread Failed", failedThread);
-
- super.tearDown();
- }
-
- /**
- *
- */
- protected void cleanupPools()
- {
- OperationContextImpl.clearContext();
-
- deleteDirectory(new File(getTestDir()));
-
- int invmSize = InVMRegistry.instance.size();
- if (invmSize > 0)
- {
- InVMRegistry.instance.clear();
- fail("invm registry still had acceptors registered");
- }
-
- if (AsynchronousFileImpl.getTotalMaxIO() != 0)
- {
- AsynchronousFileImpl.resetMaxAIO();
- Assert.fail("test did not close all its files " + AsynchronousFileImpl.getTotalMaxIO());
- }
-
- // We shutdown the global pools to give a better isolation between tests
- ServerLocatorImpl.clearThreadPools();
- }
-
- protected byte[] autoEncode(final Object... args)
- {
-
- int size = 0;
-
- for (Object arg : args)
- {
- if (arg instanceof Byte)
- {
- size++;
- }
- else if (arg instanceof Boolean)
- {
- size++;
- }
- else if (arg instanceof Integer)
- {
- size += 4;
- }
- else if (arg instanceof Long)
- {
- size += 8;
- }
- else if (arg instanceof Float)
- {
- size += 4;
- }
- else if (arg instanceof Double)
- {
- size += 8;
- }
- else
- {
- throw new IllegalArgumentException("method autoEncode doesn't know how to convert " + arg.getClass() +
- " yet");
- }
- }
-
- ByteBuffer buffer = ByteBuffer.allocate(size);
-
- for (Object arg : args)
- {
- if (arg instanceof Byte)
- {
- buffer.put(((Byte)arg).byteValue());
- }
- else if (arg instanceof Boolean)
- {
- Boolean b = (Boolean)arg;
- buffer.put((byte)(b.booleanValue() ? 1 : 0));
- }
- else if (arg instanceof Integer)
- {
- buffer.putInt(((Integer)arg).intValue());
- }
- else if (arg instanceof Long)
- {
- buffer.putLong(((Long)arg).longValue());
- }
- else if (arg instanceof Float)
- {
- buffer.putFloat(((Float)arg).floatValue());
- }
- else if (arg instanceof Double)
- {
- buffer.putDouble(((Double)arg).doubleValue());
- }
- else
- {
- throw new IllegalArgumentException("method autoEncode doesn't know how to convert " + arg.getClass() +
- " yet");
- }
- }
-
- return buffer.array();
- }
-
- protected void recreateDirectory(final String directory)
- {
- File file = new File(directory);
- deleteDirectory(file);
- file.mkdirs();
- }
-
- protected boolean deleteDirectory(final File directory)
- {
- if (directory.isDirectory())
- {
- String[] files = directory.list();
-
- for (int j = 0; j < files.length; j++)
- {
- if (!deleteDirectory(new File(directory, files[j])))
- {
- return false;
- }
- }
- }
-
- return directory.delete();
- }
-
- protected void copyRecursive(final File from, final File to) throws Exception
- {
- if (from.isDirectory())
- {
- if (!to.exists())
- {
- to.mkdir();
- }
-
- String[] subs = from.list();
-
- for (String sub : subs)
- {
- copyRecursive(new File(from, sub), new File(to, sub));
- }
- }
- else
- {
- InputStream in = null;
-
- OutputStream out = null;
-
- try
- {
- in = new BufferedInputStream(new FileInputStream(from));
-
- out = new BufferedOutputStream(new FileOutputStream(to));
-
- int b;
-
- while ((b = in.read()) != -1)
- {
- out.write(b);
- }
- }
- finally
- {
- if (in != null)
- {
- in.close();
- }
-
- if (out != null)
- {
- out.close();
- }
- }
- }
- }
-
- protected void assertRefListsIdenticalRefs(final List<MessageReference> l1, final List<MessageReference> l2)
- {
- if (l1.size() != l2.size())
- {
- Assert.fail("Lists different sizes: " + l1.size() + ", " + l2.size());
- }
-
- Iterator<MessageReference> iter1 = l1.iterator();
- Iterator<MessageReference> iter2 = l2.iterator();
-
- while (iter1.hasNext())
- {
- MessageReference o1 = iter1.next();
- MessageReference o2 = iter2.next();
-
- Assert.assertTrue("expected " + o1 + " but was " + o2, o1 == o2);
- }
- }
-
- protected ServerMessage generateMessage(final long id)
- {
- ServerMessage message = new ServerMessageImpl(id, 1000);
-
- message.setMessageID(id);
-
- message.getBodyBuffer().writeString(UUID.randomUUID().toString());
-
- message.setAddress(new SimpleString("foo"));
-
- return message;
- }
-
- protected MessageReference generateReference(final Queue queue, final long id)
- {
- ServerMessage message = generateMessage(id);
-
- return message.createReference(queue);
- }
-
- protected int calculateRecordSize(final int size, final int alignment)
- {
- return (size / alignment + (size % alignment != 0 ? 1 : 0)) * alignment;
- }
-
- protected ClientMessage createTextMessage(final String s, final ClientSession clientSession)
- {
- return createTextMessage(s, true, clientSession);
- }
-
- protected ClientMessage createTextMessage(final String s, final boolean durable, final ClientSession clientSession)
- {
- ClientMessage message = clientSession.createMessage(HornetQTextMessage.TYPE,
- durable,
- 0,
- System.currentTimeMillis(),
- (byte)4);
- message.getBodyBuffer().writeString(s);
- return message;
- }
-
- protected XidImpl newXID()
- {
- return new XidImpl("xa1".getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes());
- }
-
- protected int getMessageCount(final HornetQServer service, final String address) throws Exception
- {
- return getMessageCount(service.getPostOffice(), address);
- }
-
- /**
- * @param address
- * @param postOffice
- * @return
- * @throws Exception
- */
- protected int getMessageCount(final PostOffice postOffice, final String address) throws Exception
- {
- int messageCount = 0;
-
- List<QueueBinding> bindings = getLocalQueueBindings(postOffice, address);
-
- for (QueueBinding qBinding : bindings)
- {
- messageCount += qBinding.getQueue().getMessageCount();
- }
-
- return messageCount;
- }
-
- protected List<QueueBinding> getLocalQueueBindings(final PostOffice postOffice, final String address) throws Exception
- {
- ArrayList<QueueBinding> bindingsFound = new ArrayList<QueueBinding>();
-
- Bindings bindings = postOffice.getBindingsForAddress(new SimpleString(address));
-
- for (Binding binding : bindings.getBindings())
- {
- if (binding instanceof LocalQueueBinding)
- {
- bindingsFound.add((QueueBinding)binding);
- }
- }
- return bindingsFound;
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
- protected static interface HornetQAction
- {
- void run() throws Exception;
- }
-
-}
Added: trunk/tests/unit-tests/pom.xml
===================================================================
--- trunk/tests/unit-tests/pom.xml (rev 0)
+++ trunk/tests/unit-tests/pom.xml 2011-04-08 12:18:13 UTC (rev 10469)
@@ -0,0 +1,96 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.hornetq.tests</groupId>
+ <artifactId>unit-tests</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ Unit Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-ra</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-bootstrap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>../config</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/hornetq/tests/util/*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/deployers/impl/FileDeploymentManagerTest.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -63,7 +63,7 @@
FileDeploymentManagerTest.log.debug("Filename is " + filename);
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/tmpfiles/" + filename);
FileDeploymentManagerTest.log.debug(file.getAbsoluteFile());
@@ -99,7 +99,7 @@
FileDeploymentManagerTest.log.debug("Filename is " + filename);
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/tmpfiles/" + filename);
FileDeploymentManagerTest.log.debug(file.getAbsoluteFile());
@@ -134,9 +134,9 @@
String filename2 = "fdm_test_file.xml2";
String filename3 = "fdm_test_file.xml3";
- File file1 = new File("tests/tmpfiles/" + filename1);
- File file2 = new File("tests/tmpfiles/" + filename2);
- File file3 = new File("tests/tmpfiles/" + filename3);
+ File file1 = new File("target/tmpfiles/" + filename1);
+ File file2 = new File("target/tmpfiles/" + filename2);
+ File file3 = new File("target/tmpfiles/" + filename3);
file1.createNewFile();
file2.createNewFile();
@@ -231,7 +231,7 @@
String filename = "fdm_test_file.xml1";
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/tmpfiles/" + filename);
file.createNewFile();
long oldLastModified = file.lastModified();
@@ -280,7 +280,7 @@
String filename = "fdm_test_file.xml1";
- File file = new File("tests/tmpfiles/" + filename);
+ File file = new File("target/tmpfiles/" + filename);
file.createNewFile();
Copied: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/RandomUtil.java (from rev 10466, trunk/tests/src/org/hornetq/tests/util/RandomUtil.java)
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/RandomUtil.java (rev 0)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/RandomUtil.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.util;
+
+import java.util.Random;
+import java.util.UUID;
+
+import javax.transaction.xa.Xid;
+
+import org.hornetq.api.core.HornetQBuffer;
+import org.hornetq.api.core.HornetQBuffers;
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.core.transaction.impl.XidImpl;
+
+/**
+ * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
+ *
+ * @version <tt>$Revision$</tt>
+ *
+ */
+public class RandomUtil
+{
+ // Constants -----------------------------------------------------
+
+ private static final Random random = new Random(System.currentTimeMillis());
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ public static String randomString()
+ {
+ return UUID.randomUUID().toString();
+ }
+
+ public static SimpleString randomSimpleString()
+ {
+ return new SimpleString(RandomUtil.randomString());
+ }
+
+ public static char randomChar()
+ {
+ return RandomUtil.randomString().charAt(0);
+ }
+
+ public static long randomLong()
+ {
+ return RandomUtil.random.nextLong();
+ }
+
+ public static long randomPositiveLong()
+ {
+ return Math.abs(RandomUtil.randomLong());
+ }
+
+ public static int randomInt()
+ {
+ return RandomUtil.random.nextInt();
+ }
+
+ public static int randomPositiveInt()
+ {
+ return Math.abs(RandomUtil.randomInt());
+ }
+
+
+ public static HornetQBuffer randomBuffer(final int size, final long... data)
+ {
+ HornetQBuffer buffer = HornetQBuffers.fixedBuffer(size + 8 * data.length);
+
+ for (long d : data)
+ {
+ buffer.writeLong(d);
+ }
+
+ for (int i = 0 ; i < size; i++)
+ {
+ buffer.writeByte((byte)randomByte());
+ }
+
+ return buffer;
+ }
+
+
+
+
+ public static int randomInterval(final int min, final int max)
+ {
+ return min + randomMax(max - min);
+ }
+
+ public static int randomMax(int max)
+ {
+ int value = randomPositiveInt() % max;
+
+ if (value == 0)
+ {
+ value = max;
+ }
+
+ return value;
+ }
+
+ public static int randomPort()
+ {
+ return RandomUtil.random.nextInt(65536);
+ }
+
+ public static short randomShort()
+ {
+ return (short)RandomUtil.random.nextInt(Short.MAX_VALUE);
+ }
+
+ public static byte randomByte()
+ {
+ return Integer.valueOf(RandomUtil.random.nextInt()).byteValue();
+ }
+
+ public static boolean randomBoolean()
+ {
+ return RandomUtil.random.nextBoolean();
+ }
+
+ public static byte[] randomBytes()
+ {
+ return RandomUtil.randomString().getBytes();
+ }
+
+ public static byte[] randomBytes(final int length)
+ {
+ byte[] bytes = new byte[length];
+ for (int i = 0; i < bytes.length; i++)
+ {
+ bytes[i] = RandomUtil.randomByte();
+ }
+ return bytes;
+ }
+
+ public static double randomDouble()
+ {
+ return RandomUtil.random.nextDouble();
+ }
+
+ public static float randomFloat()
+ {
+ return RandomUtil.random.nextFloat();
+ }
+
+ public static Xid randomXid()
+ {
+ return new XidImpl(RandomUtil.randomBytes(), RandomUtil.randomInt(), RandomUtil.randomBytes());
+ }
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+}
Copied: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java (from rev 10466, trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java)
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java (rev 0)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -0,0 +1,572 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.util;
+
+import java.io.File;
+import java.lang.management.ManagementFactory;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import junit.framework.Assert;
+
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
+import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
+import org.hornetq.core.remoting.impl.invm.InVMRegistry;
+import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.HornetQServers;
+import org.hornetq.core.server.NodeManager;
+import org.hornetq.core.server.impl.HornetQServerImpl;
+import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
+import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.jms.client.HornetQBytesMessage;
+import org.hornetq.jms.client.HornetQTextMessage;
+import org.hornetq.spi.core.security.HornetQSecurityManager;
+import org.hornetq.spi.core.security.HornetQSecurityManagerImpl;
+
+/**
+ *
+ * Base class with basic utilities on starting up a basic server
+ *
+ * @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
+ *
+ */
+public abstract class ServiceTestBase extends UnitTestCase
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ protected static final String INVM_ACCEPTOR_FACTORY = InVMAcceptorFactory.class.getCanonicalName();
+
+ public static final String INVM_CONNECTOR_FACTORY = InVMConnectorFactory.class.getCanonicalName();
+
+ protected static final String NETTY_ACCEPTOR_FACTORY = NettyAcceptorFactory.class.getCanonicalName();
+
+ protected static final String NETTY_CONNECTOR_FACTORY = NettyConnectorFactory.class.getCanonicalName();
+
+ private List<ServerLocator> locators = new ArrayList<ServerLocator>();
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ for (ServerLocator locator : locators)
+ {
+ try
+ {
+ locator.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ locators.clear();
+ super.tearDown();
+ checkFreePort(5445);
+ checkFreePort(5446);
+ checkFreePort(5447);
+ if (InVMRegistry.instance.size() > 0)
+ {
+ fail("InVMREgistry size > 0");
+ }
+ }
+
+ protected static Map<String, Object> generateParams(final int node, final boolean netty)
+ {
+ Map<String, Object> params = new HashMap<String, Object>();
+
+ if (netty)
+ {
+ params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
+ org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + node);
+ }
+ else
+ {
+ params.put(org.hornetq.core.remoting.impl.invm.TransportConstants.SERVER_ID_PROP_NAME, node);
+ }
+
+ return params;
+ }
+
+ protected static TransportConfiguration createTransportConfiguration(boolean netty,
+ boolean acceptor,
+ Map<String, Object> params)
+ {
+ String className;
+ if (netty)
+ {
+ if (acceptor)
+ {
+ className = NettyAcceptorFactory.class.getName();
+ }
+ else
+ {
+ className = NettyConnectorFactory.class.getName();
+ }
+ }
+ else
+ {
+ if (acceptor)
+ {
+ className = InVMAcceptorFactory.class.getName();
+ }
+ else
+ {
+ className = InVMConnectorFactory.class.getName();
+ }
+ }
+ return new TransportConfiguration(className, params);
+ }
+
+ // Static --------------------------------------------------------
+ private final Logger log = Logger.getLogger(this.getClass());
+
+ // Constructors --------------------------------------------------
+
+ public ServiceTestBase()
+ {
+ super();
+ }
+
+ public ServiceTestBase(final String name)
+ {
+ super(name);
+ }
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ protected HornetQServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final int pageSize,
+ final int maxAddressSize,
+ final Map<String, AddressSettings> settings,
+ final MBeanServer mbeanServer)
+ {
+ HornetQServer server;
+
+ if (realFiles)
+ {
+ server = HornetQServers.newHornetQServer(configuration, mbeanServer, true);
+ }
+ else
+ {
+ server = HornetQServers.newHornetQServer(configuration, mbeanServer, false);
+ }
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+ defaultSetting.setPageSizeBytes(pageSize);
+ defaultSetting.setMaxSizeBytes(maxAddressSize);
+
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ protected HornetQServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final int pageSize,
+ final int maxAddressSize,
+ final Map<String, AddressSettings> settings)
+ {
+ return createServer(realFiles, configuration, pageSize, maxAddressSize, AddressFullMessagePolicy.PAGE, settings);
+ }
+
+ protected HornetQServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final int pageSize,
+ final int maxAddressSize,
+ final AddressFullMessagePolicy fullPolicy,
+ final Map<String, AddressSettings> settings)
+ {
+ HornetQServer server;
+
+ if (realFiles)
+ {
+ server = HornetQServers.newHornetQServer(configuration);
+ }
+ else
+ {
+ server = HornetQServers.newHornetQServer(configuration, false);
+ }
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+ defaultSetting.setPageSizeBytes(pageSize);
+ defaultSetting.setMaxSizeBytes(maxAddressSize);
+ defaultSetting.setAddressFullMessagePolicy(fullPolicy);
+
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ protected HornetQServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final MBeanServer mbeanServer,
+ final Map<String, AddressSettings> settings)
+ {
+ HornetQServer server;
+
+ if (realFiles)
+ {
+ server = HornetQServers.newHornetQServer(configuration, mbeanServer);
+ }
+ else
+ {
+ server = HornetQServers.newHornetQServer(configuration, mbeanServer, false);
+ }
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ protected HornetQServer createServer(final boolean realFiles)
+ {
+ return createServer(realFiles, false);
+ }
+
+ protected HornetQServer createServer(final boolean realFiles, final boolean netty)
+ {
+ return createServer(realFiles, createDefaultConfig(netty), -1, -1, new HashMap<String, AddressSettings>());
+ }
+
+ protected HornetQServer createServer(final boolean realFiles, final Configuration configuration)
+ {
+ return createServer(realFiles, configuration, -1, -1, new HashMap<String, AddressSettings>());
+ }
+
+ protected HornetQServer createInVMFailoverServer(final boolean realFiles,
+ final Configuration configuration,
+ NodeManager nodeManager)
+ {
+ return createInVMFailoverServer(realFiles,
+ configuration,
+ -1,
+ -1,
+ new HashMap<String, AddressSettings>(),
+ nodeManager);
+ }
+
+ protected HornetQServer createInVMFailoverServer(final boolean realFiles,
+ final Configuration configuration,
+ final int pageSize,
+ final int maxAddressSize,
+ final Map<String, AddressSettings> settings,
+ NodeManager nodeManager)
+ {
+ HornetQServer server;
+ HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl();
+ configuration.setPersistenceEnabled(realFiles);
+ server = new InVMNodeManagerServer(configuration,
+ ManagementFactory.getPlatformMBeanServer(),
+ securityManager,
+ nodeManager);
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+ defaultSetting.setPageSizeBytes(pageSize);
+ defaultSetting.setMaxSizeBytes(maxAddressSize);
+
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ protected HornetQServer createServer(final boolean realFiles,
+ final Configuration configuration,
+ final HornetQSecurityManager securityManager)
+ {
+ HornetQServer server;
+
+ if (realFiles)
+ {
+ server = HornetQServers.newHornetQServer(configuration,
+ ManagementFactory.getPlatformMBeanServer(),
+ securityManager);
+ }
+ else
+ {
+ server = HornetQServers.newHornetQServer(configuration,
+ ManagementFactory.getPlatformMBeanServer(),
+ securityManager,
+ false);
+ }
+
+ Map<String, AddressSettings> settings = new HashMap<String, AddressSettings>();
+
+ for (Map.Entry<String, AddressSettings> setting : settings.entrySet())
+ {
+ server.getAddressSettingsRepository().addMatch(setting.getKey(), setting.getValue());
+ }
+
+ AddressSettings defaultSetting = new AddressSettings();
+
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ protected HornetQServer createClusteredServerWithParams(final boolean isNetty,
+ final int index,
+ final boolean realFiles,
+ final Map<String, Object> params)
+ {
+ if (isNetty)
+ {
+ return createServer(realFiles,
+ createClusteredDefaultConfig(index, params, NETTY_ACCEPTOR_FACTORY),
+ -1,
+ -1,
+ new HashMap<String, AddressSettings>());
+ }
+ else
+ {
+ return createServer(realFiles,
+ createClusteredDefaultConfig(index, params, INVM_ACCEPTOR_FACTORY),
+ -1,
+ -1,
+ new HashMap<String, AddressSettings>());
+ }
+ }
+
+ protected HornetQServer createClusteredServerWithParams(final boolean isNetty,
+ final int index,
+ final boolean realFiles,
+ final int pageSize,
+ final int maxAddressSize,
+ final Map<String, Object> params)
+ {
+ if (isNetty)
+ {
+ return createServer(realFiles,
+ createClusteredDefaultConfig(index, params, NETTY_ACCEPTOR_FACTORY),
+ pageSize,
+ maxAddressSize,
+ new HashMap<String, AddressSettings>());
+ }
+ else
+ {
+ return createServer(realFiles,
+ createClusteredDefaultConfig(index, params, INVM_ACCEPTOR_FACTORY),
+ -1,
+ -1,
+ new HashMap<String, AddressSettings>());
+ }
+ }
+
+ protected ServerLocator createFactory(final boolean isNetty) throws Exception
+ {
+ if (isNetty)
+ {
+ return createNettyNonHALocator();
+ }
+ else
+ {
+ return createInVMNonHALocator();
+ }
+ }
+
+ protected void createQueue(String address, String queue) throws Exception
+ {
+ ServerLocator locator = createInVMNonHALocator();
+ ClientSessionFactory sf = locator.createSessionFactory();
+ ClientSession session = sf.createSession();
+ session.createQueue(address, queue);
+ session.close();
+ sf.close();
+ locator.close();
+ }
+
+ protected ServerLocator createInVMNonHALocator()
+ {
+ return createNonHALocator(false);
+ }
+
+ protected ServerLocator createNettyNonHALocator()
+ {
+ return createNonHALocator(true);
+ }
+
+ protected ServerLocator createNonHALocator(final boolean isNetty)
+ {
+ ServerLocator locatorWithoutHA = isNetty ? HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY))
+ : HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY));
+ locators.add(locatorWithoutHA);
+ return locatorWithoutHA;
+ }
+
+ protected ClientSessionFactoryImpl createFactory(final String connectorClass) throws Exception
+ {
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(connectorClass));
+ return (ClientSessionFactoryImpl)locator.createSessionFactory();
+
+ }
+
+ protected ClientMessage createTextMessage(final ClientSession session, final String s)
+ {
+ return createTextMessage(session, s, true);
+ }
+
+ public String getTextMessage(final ClientMessage m)
+ {
+ m.getBodyBuffer().resetReaderIndex();
+ return m.getBodyBuffer().readString();
+ }
+
+ protected ClientMessage createTextMessage(final ClientSession session, final String s, final boolean durable)
+ {
+ ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
+ durable,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
+ message.getBodyBuffer().writeString(s);
+ return message;
+ }
+
+ protected ClientMessage createBytesMessage(final ClientSession session, final byte[] b, final boolean durable)
+ {
+ ClientMessage message = session.createMessage(HornetQBytesMessage.TYPE,
+ durable,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
+ message.getBodyBuffer().writeBytes(b);
+ return message;
+ }
+
+ /**
+ * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking for a while if the file hasn't been deleted yet
+ */
+ protected void validateNoFilesOnLargeDir(final int expect) throws Exception
+ {
+ File largeMessagesFileDir = new File(getLargeMessagesDir());
+
+ // Deleting the file is async... we keep looking for a period of the time until the file is really gone
+ long timeout = System.currentTimeMillis() + 5000;
+ while (timeout > System.currentTimeMillis() && largeMessagesFileDir.listFiles().length != expect)
+ {
+ Thread.sleep(100);
+ }
+
+
+ if (expect != largeMessagesFileDir.listFiles().length)
+ {
+ for (File file : largeMessagesFileDir.listFiles())
+ {
+ System.out.println("File " + file + " still on ");
+ }
+ }
+
+ Assert.assertEquals(expect, largeMessagesFileDir.listFiles().length);
+ }
+
+ /**
+ * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking for a while if the file hasn't been deleted yet
+ */
+ protected void validateNoFilesOnLargeDir() throws Exception
+ {
+ validateNoFilesOnLargeDir(0);
+ }
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+ class InVMNodeManagerServer extends HornetQServerImpl
+ {
+ final NodeManager nodeManager;
+
+ public InVMNodeManagerServer(NodeManager nodeManager)
+ {
+ super();
+ this.nodeManager = nodeManager;
+ }
+
+ public InVMNodeManagerServer(Configuration configuration, NodeManager nodeManager)
+ {
+ super(configuration);
+ this.nodeManager = nodeManager;
+ }
+
+ public InVMNodeManagerServer(Configuration configuration, MBeanServer mbeanServer, NodeManager nodeManager)
+ {
+ super(configuration, mbeanServer);
+ this.nodeManager = nodeManager;
+ }
+
+ public InVMNodeManagerServer(Configuration configuration,
+ HornetQSecurityManager securityManager,
+ NodeManager nodeManager)
+ {
+ super(configuration, securityManager);
+ this.nodeManager = nodeManager;
+ }
+
+ public InVMNodeManagerServer(Configuration configuration,
+ MBeanServer mbeanServer,
+ HornetQSecurityManager securityManager,
+ NodeManager nodeManager)
+ {
+ super(configuration, mbeanServer, securityManager);
+ this.nodeManager = nodeManager;
+ }
+
+ @Override
+ protected NodeManager createNodeManager(String directory)
+ {
+ return nodeManager;
+ }
+
+ }
+}
Copied: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/UnitTestCase.java (from rev 10466, trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java)
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/UnitTestCase.java (rev 0)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/UnitTestCase.java 2011-04-08 12:18:13 UTC (rev 10469)
@@ -0,0 +1,1245 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.util;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.ref.Reference;
+import java.lang.ref.WeakReference;
+import java.net.ServerSocket;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.naming.Context;
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.Xid;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.hornetq.api.core.HornetQBuffer;
+import org.hornetq.api.core.HornetQException;
+import org.hornetq.api.core.SimpleString;
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
+import org.hornetq.core.client.impl.ServerLocatorImpl;
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
+import org.hornetq.core.postoffice.Binding;
+import org.hornetq.core.postoffice.Bindings;
+import org.hornetq.core.postoffice.PostOffice;
+import org.hornetq.core.postoffice.QueueBinding;
+import org.hornetq.core.postoffice.impl.LocalQueueBinding;
+import org.hornetq.core.remoting.impl.invm.InVMRegistry;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.JournalType;
+import org.hornetq.core.server.MessageReference;
+import org.hornetq.core.server.Queue;
+import org.hornetq.core.server.ServerMessage;
+import org.hornetq.core.server.impl.ServerMessageImpl;
+import org.hornetq.core.transaction.impl.XidImpl;
+import org.hornetq.jms.client.HornetQTextMessage;
+import org.hornetq.utils.UUIDGenerator;
+
+/**
+ *
+ * Helper base class for our unit tests
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ * @author <a href="mailto:csuconic@redhat.com">Clebert</a>
+ *
+ */
+public class UnitTestCase extends TestCase
+{
+ // Constants -----------------------------------------------------
+
+ private static final Logger log = Logger.getLogger(UnitTestCase.class);
+
+ public static final String INVM_ACCEPTOR_FACTORY = "org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory";
+
+ public static final String INVM_CONNECTOR_FACTORY = "org.hornetq.core.remoting.impl.invm.InVMConnectorFactory";
+
+ public static final String NETTY_ACCEPTOR_FACTORY = "org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory";
+
+ public static final String NETTY_CONNECTOR_FACTORY = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory";
+
+ // Attributes ----------------------------------------------------
+
+ private static final String testDir = System.getProperty("java.io.tmpdir", "/tmp") + "/hornetq-unit-test";
+
+ // There is a verification about thread leakages. We only fail a single thread when this happens
+ private static Set<Thread> alreadyFailedThread = new HashSet<Thread>();
+
+ // Static --------------------------------------------------------
+
+ protected Configuration createDefaultConfig()
+ {
+ return createDefaultConfig(false);
+ }
+
+ protected Configuration createDefaultConfig(final boolean netty)
+ {
+ if (netty)
+ {
+ return createDefaultConfig(new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY, NETTY_ACCEPTOR_FACTORY);
+ }
+ else
+ {
+ return createDefaultConfig(new HashMap<String, Object>(), INVM_ACCEPTOR_FACTORY);
+ }
+ }
+
+ protected static Configuration createClusteredDefaultConfig(final int index,
+ final Map<String, Object> params,
+ final String... acceptors)
+ {
+ Configuration config = createDefaultConfig(index, params, acceptors);
+
+ config.setClustered(true);
+
+ return config;
+ }
+
+ protected static Configuration createDefaultConfig(final int index,
+ final Map<String, Object> params,
+ final String... acceptors)
+ {
+ Configuration configuration = createBasicConfig(index);
+
+ configuration.getAcceptorConfigurations().clear();
+
+ for (String acceptor : acceptors)
+ {
+ TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
+ configuration.getAcceptorConfigurations().add(transportConfig);
+ }
+
+ return configuration;
+ }
+
+ protected static ConfigurationImpl createBasicConfig()
+ {
+ return createBasicConfig(0);
+ }
+
+ /**
+ * @param serverID
+ * @return
+ */
+ protected static ConfigurationImpl createBasicConfig(final int serverID)
+ {
+ ConfigurationImpl configuration = new ConfigurationImpl();
+ configuration.setSecurityEnabled(false);
+ configuration.setBindingsDirectory(getBindingsDir(serverID, false));
+ configuration.setJournalMinFiles(2);
+ configuration.setJournalDirectory(getJournalDir(serverID, false));
+ configuration.setJournalFileSize(100 * 1024);
+ configuration.setJournalType(getDefaultJournalType());
+ configuration.setPagingDirectory(getPageDir(serverID, false));
+ configuration.setLargeMessagesDirectory(getLargeMessagesDir(serverID, false));
+ configuration.setJournalCompactMinFiles(0);
+ configuration.setJournalCompactPercentage(0);
+ return configuration;
+ }
+
+ protected static Configuration createDefaultConfig(final Map<String, Object> params, final String... acceptors)
+ {
+ Configuration configuration = new ConfigurationImpl();
+ configuration.setSecurityEnabled(false);
+ configuration.setJMXManagementEnabled(false);
+ configuration.setBindingsDirectory(getBindingsDir());
+ configuration.setJournalMinFiles(2);
+ configuration.setJournalDirectory(getJournalDir());
+ configuration.setJournalFileSize(100 * 1024);
+ configuration.setPagingDirectory(getPageDir());
+ configuration.setLargeMessagesDirectory(getLargeMessagesDir());
+ configuration.setJournalCompactMinFiles(0);
+ configuration.setJournalCompactPercentage(0);
+
+ configuration.setFileDeploymentEnabled(false);
+
+ configuration.setJournalType(getDefaultJournalType());
+
+ configuration.getAcceptorConfigurations().clear();
+
+ for (String acceptor : acceptors)
+ {
+ TransportConfiguration transportConfig = new TransportConfiguration(acceptor, params);
+ configuration.getAcceptorConfigurations().add(transportConfig);
+ }
+
+ return configuration;
+ }
+
+ protected static String getUDPDiscoveryAddress()
+ {
+ return System.getProperty("TEST-UDP-ADDRESS", "230.1.2.3");
+ }
+
+ protected static String getUDPDiscoveryAddress(int variant)
+ {
+ String value = getUDPDiscoveryAddress();
+
+ int posPoint = value.lastIndexOf('.');
+
+ int last = Integer.valueOf(value.substring(posPoint + 1));
+
+ return value.substring(0, posPoint + 1) + (last + variant);
+ }
+
+ public static int getUDPDiscoveryPort()
+ {
+ return Integer.parseInt(System.getProperty("TEST-UDP-PORT", "6750"));
+ }
+
+ public static int getUDPDiscoveryPort(final int variant)
+ {
+ return getUDPDiscoveryPort() + variant;
+ }
+
+ protected static JournalType getDefaultJournalType()
+ {
+ if (AsynchronousFileImpl.isLoaded())
+ {
+ return JournalType.ASYNCIO;
+ }
+ else
+ {
+ return JournalType.NIO;
+ }
+ }
+
+ /**
+ * @param name
+ */
+ public UnitTestCase(final String name)
+ {
+ super(name);
+ }
+
+ public UnitTestCase()
+ {
+ super();
+ }
+
+ public static void forceGC()
+ {
+ WeakReference<Object> dumbReference = new WeakReference<Object>(new Object());
+ // A loop that will wait GC, using the minimal time as possible
+ while (dumbReference.get() != null)
+ {
+ System.gc();
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ }
+
+ public static void forceGC(Reference<?> ref, long timeout)
+ {
+ long waitUntil = System.currentTimeMillis() + timeout;
+ // A loop that will wait GC, using the minimal time as possible
+ while (ref.get() != null && System.currentTimeMillis() < waitUntil)
+ {
+ ArrayList<String> list = new ArrayList<String>();
+ for (int i = 0; i < 1000; i++)
+ {
+ list.add("Some string with garbage with concatenation " + i);
+ }
+ list.clear();
+ list = null;
+ System.gc();
+ try
+ {
+ Thread.sleep(500);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+ }
+
+ // verify if these weak references are released after a few GCs
+ public static void checkWeakReferences(final WeakReference<?>... references)
+ {
+
+ int i = 0;
+ boolean hasValue = false;
+
+ do
+ {
+ hasValue = false;
+
+ if (i > 0)
+ {
+ UnitTestCase.forceGC();
+ }
+
+ for (WeakReference<?> ref : references)
+ {
+ if (ref.get() != null)
+ {
+ hasValue = true;
+ }
+ }
+ }
+ while (i++ <= 30 && hasValue);
+
+ for (WeakReference<?> ref : references)
+ {
+ Assert.assertNull(ref.get());
+ }
+ }
+
+ public static String threadDump(final String msg)
+ {
+ StringWriter str = new StringWriter();
+ PrintWriter out = new PrintWriter(str);
+
+ Map<Thread, StackTraceElement[]> stackTrace = Thread.getAllStackTraces();
+
+ out.println("*******************************************************************************");
+ out.println("Complete Thread dump " + msg);
+
+ for (Map.Entry<Thread, StackTraceElement[]> el : stackTrace.entrySet())
+ {
+ out.println("===============================================================================");
+ out.println("Thread " + el.getKey() +
+ " name = " +
+ el.getKey().getName() +
+ " id = " +
+ el.getKey().getId() +
+ " group = " +
+ el.getKey().getThreadGroup());
+ out.println();
+ for (StackTraceElement traceEl : el.getValue())
+ {
+ out.println(traceEl);
+ }
+ }
+
+ out.println("===============================================================================");
+ out.println("End Thread dump " + msg);
+ out.println("*******************************************************************************");
+
+ return str.toString();
+ }
+
+ protected static TestSuite createAIOTestSuite(final Class<?> clazz)
+ {
+ TestSuite suite = new TestSuite(clazz.getName() + " testsuite");
+
+ if (AIOSequentialFileFactory.isSupported())
+ {
+ suite.addTestSuite(clazz);
+ }
+ else
+ {
+ // System.out goes towards JUnit report
+ System.out.println("Test " + clazz.getName() + " ignored as AIO is not available");
+ }
+
+ return suite;
+ }
+
+ public static String dumpBytes(final byte[] bytes)
+ {
+ StringBuffer buff = new StringBuffer();
+
+ buff.append(System.identityHashCode(bytes) + ", size: " + bytes.length + " [");
+
+ for (int i = 0; i < bytes.length; i++)
+ {
+ buff.append(bytes[i]);
+
+ if (i != bytes.length - 1)
+ {
+ buff.append(", ");
+ }
+ }
+
+ buff.append("]");
+
+ return buff.toString();
+ }
+
+ public static String dumbBytesHex(final byte[] buffer, final int bytesPerLine)
+ {
+
+ StringBuffer buff = new StringBuffer();
+
+ buff.append("[");
+
+ for (int i = 0; i < buffer.length; i++)
+ {
+ buff.append(String.format("%1$2X", buffer[i]));
+ if (i + 1 < buffer.length)
+ {
+ buff.append(", ");
+ }
+ if ((i + 1) % bytesPerLine == 0)
+ {
+ buff.append("\n ");
+ }
+ }
+ buff.append("]");
+
+ return buff.toString();
+ }
+
+ public static void assertEqualsByteArrays(final byte[] expected, final byte[] actual)
+ {
+ // assertEquals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; i++)
+ {
+ Assert.assertEquals("byte at index " + i, expected[i], actual[i]);
+ }
+ }
+
+ public static void assertEqualsTransportConfigurations(final TransportConfiguration[] expected,
+ final TransportConfiguration[] actual)
+ {
+ assertEquals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; i++)
+ {
+ Assert.assertEquals("TransportConfiguration at index " + i, expected[i], actual[i]);
+ }
+ }
+
+ public static void assertEqualsBuffers(final int size, final HornetQBuffer expected, final HornetQBuffer actual)
+ {
+ // assertEquals(expected.length, actual.length);
+ expected.readerIndex(0);
+ actual.readerIndex(0);
+
+ for (int i = 0; i < size; i++)
+ {
+ byte b1 = expected.readByte();
+ byte b2 = actual.readByte();
+ Assert.assertEquals("byte at index " + i, b1, b2);
+ }
+ expected.resetReaderIndex();
+ actual.resetReaderIndex();
+ }
+
+ public static void assertEqualsByteArrays(final int length, final byte[] expected, final byte[] actual)
+ {
+ // we check only for the given length (the arrays might be
+ // larger)
+ Assert.assertTrue(expected.length >= length);
+ Assert.assertTrue(actual.length >= length);
+ for (int i = 0; i < length; i++)
+ {
+ Assert.assertEquals("byte at index " + i, expected[i], actual[i]);
+ }
+ }
+
+ public static void assertSameXids(final List<Xid> expected, final List<Xid> actual)
+ {
+ Assert.assertNotNull(expected);
+ Assert.assertNotNull(actual);
+ Assert.assertEquals(expected.size(), actual.size());
+
+ for (int i = 0; i < expected.size(); i++)
+ {
+ Xid expectedXid = expected.get(i);
+ Xid actualXid = actual.get(i);
+ UnitTestCase.assertEqualsByteArrays(expectedXid.getBranchQualifier(), actualXid.getBranchQualifier());
+ Assert.assertEquals(expectedXid.getFormatId(), actualXid.getFormatId());
+ UnitTestCase.assertEqualsByteArrays(expectedXid.getGlobalTransactionId(), actualXid.getGlobalTransactionId());
+ }
+ }
+
+ protected static void checkNoBinding(final Context context, final String binding)
+ {
+ try
+ {
+ context.lookup(binding);
+ Assert.fail("there must be no resource to look up for " + binding);
+ }
+ catch (Exception e)
+ {
+ }
+ }
+
+ protected static Object checkBinding(final Context context, final String binding) throws Exception
+ {
+ Object o = context.lookup(binding);
+ Assert.assertNotNull(o);
+ return o;
+ }
+
+ /**
+ * @param connectorConfigs
+ * @return
+ */
+ protected ArrayList<String> registerConnectors(final HornetQServer server,
+ final List<TransportConfiguration> connectorConfigs)
+ {
+ // The connectors need to be pre-configured at main config object but this method is taking
+ // TransportConfigurations directly
+ // So this will first register them at the config and then generate a list of objects
+ ArrayList<String> connectors = new ArrayList<String>();
+ for (TransportConfiguration tnsp : connectorConfigs)
+ {
+ String name = RandomUtil.randomString();
+
+ server.getConfiguration().getConnectorConfigurations().put(name, tnsp);
+
+ connectors.add(name);
+ }
+ return connectors;
+ }
+
+ protected static void checkFreePort(final int... ports)
+ {
+ for (int port : ports)
+ {
+ ServerSocket ssocket = null;
+ try
+ {
+ ssocket = new ServerSocket(port);
+ }
+ catch (Exception e)
+ {
+ System.out.println("port " + port + " is already bound");
+ System.exit(0);
+ }
+ finally
+ {
+ if (ssocket != null)
+ {
+ try
+ {
+ ssocket.close();
+ }
+ catch (IOException e)
+ {
+ }
+ }
+ }
+ }
+ }
+
+ // Constructors --------------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ /**
+ * @return the testDir
+ */
+ protected String getTestDir()
+ {
+ return testDir;
+ }
+
+ protected void clearData()
+ {
+ clearData(getTestDir());
+ }
+
+ protected void clearData(final String testDir)
+ {
+ // Need to delete the root
+
+ File file = new File(testDir);
+ deleteDirectory(file);
+ file.mkdirs();
+
+ recreateDirectory(getJournalDir(testDir));
+ recreateDirectory(getBindingsDir(testDir));
+ recreateDirectory(getPageDir(testDir));
+ recreateDirectory(getLargeMessagesDir(testDir));
+ recreateDirectory(getClientLargeMessagesDir(testDir));
+ recreateDirectory(getTemporaryDir(testDir));
+
+ System.out.println("deleted " + testDir);
+ }
+
+ /**
+ * @return the journalDir
+ */
+ public static String getJournalDir()
+ {
+ return getJournalDir(testDir);
+ }
+
+ protected static String getJournalDir(final String testDir)
+ {
+ return testDir + "/journal";
+ }
+
+ protected static String getJournalDir(final int index, final boolean backup)
+ {
+ String dir = getJournalDir(testDir) + index + "-" + (backup ? "B" : "L");
+
+ return dir;
+ }
+
+ /**
+ * @return the bindingsDir
+ */
+ protected static String getBindingsDir()
+ {
+ return getBindingsDir(testDir);
+ }
+
+ /**
+ * @return the bindingsDir
+ */
+ protected static String getBindingsDir(final String testDir)
+ {
+ return testDir + "/bindings";
+ }
+
+ /**
+ * @return the bindingsDir
+ */
+ protected static String getBindingsDir(final int index, final boolean backup)
+ {
+ return getBindingsDir(testDir) + index + "-" + (backup ? "B" : "L");
+ }
+
+ /**
+ * @return the pageDir
+ */
+ protected static String getPageDir()
+ {
+ return getPageDir(testDir);
+ }
+
+ /**
+ * @return the pageDir
+ */
+ protected static String getPageDir(final String testDir)
+ {
+ return testDir + "/page";
+ }
+
+ protected static String getPageDir(final int index, final boolean backup)
+ {
+ return getPageDir(testDir) + index + "-" + (backup ? "B" : "L");
+ }
+
+ /**
+ * @return the largeMessagesDir
+ */
+ protected static String getLargeMessagesDir()
+ {
+ return getLargeMessagesDir(testDir);
+ }
+
+ /**
+ * @return the largeMessagesDir
+ */
+ protected static String getLargeMessagesDir(final String testDir)
+ {
+ return testDir + "/large-msg";
+ }
+
+ protected static String getLargeMessagesDir(final int index, final boolean backup)
+ {
+ return getLargeMessagesDir(testDir) + index + "-" + (backup ? "B" : "L");
+ }
+
+ /**
+ * @return the clientLargeMessagesDir
+ */
+ protected String getClientLargeMessagesDir()
+ {
+ return getClientLargeMessagesDir(testDir);
+ }
+
+ /**
+ * @return the clientLargeMessagesDir
+ */
+ protected String getClientLargeMessagesDir(final String testDir)
+ {
+ return testDir + "/client-large-msg";
+ }
+
+ /**
+ * @return the temporaryDir
+ */
+ protected String getTemporaryDir()
+ {
+ return getTemporaryDir(testDir);
+ }
+
+ /**
+ * @return the temporaryDir
+ */
+ protected String getTemporaryDir(final String testDir)
+ {
+ return testDir + "/temp";
+ }
+
+ protected static void expectHornetQException(final String message, final int errorCode, final HornetQAction action)
+ {
+ try
+ {
+ action.run();
+ Assert.fail(message);
+ }
+ catch (Exception e)
+ {
+ Assert.assertTrue(e instanceof HornetQException);
+ Assert.assertEquals(errorCode, ((HornetQException)e).getCode());
+ }
+ }
+
+ protected static void expectHornetQException(final int errorCode, final HornetQAction action)
+ {
+ UnitTestCase.expectHornetQException("must throw a HornetQException with the expected errorCode: " + errorCode,
+ errorCode,
+ action);
+ }
+
+ protected static void expectXAException(final int errorCode, final HornetQAction action)
+ {
+ try
+ {
+ action.run();
+ Assert.fail("must throw a XAException with the expected errorCode: " + errorCode);
+ }
+ catch (Exception e)
+ {
+ Assert.assertTrue(e instanceof XAException);
+ Assert.assertEquals(errorCode, ((XAException)e).errorCode);
+ }
+ }
+
+ public static byte getSamplebyte(final long position)
+ {
+ return (byte)('a' + position % ('z' - 'a' + 1));
+ }
+
+ // Creates a Fake LargeStream without using a real file
+ public static InputStream createFakeLargeStream(final long size) throws Exception
+ {
+ return new InputStream()
+ {
+ private long count;
+
+ private boolean closed = false;
+
+ @Override
+ public void close() throws IOException
+ {
+ super.close();
+ closed = true;
+ }
+
+ @Override
+ public int read() throws IOException
+ {
+ if (closed)
+ {
+ throw new IOException("Stream was closed");
+ }
+ if (count++ < size)
+ {
+ return UnitTestCase.getSamplebyte(count - 1);
+ }
+ else
+ {
+ return -1;
+ }
+ }
+ };
+
+ }
+
+ /** It validates a Bean (POJO) using simple setters and getters with random values.
+ * You can pass a list of properties to be ignored, as some properties will have a pre-defined domain (not being possible to use random-values on them) */
+ protected void validateGettersAndSetters(final Object pojo, final String... IgnoredProperties) throws Exception
+ {
+ HashSet<String> ignoreSet = new HashSet<String>();
+
+ for (String ignore : IgnoredProperties)
+ {
+ ignoreSet.add(ignore);
+ }
+
+ BeanInfo info = Introspector.getBeanInfo(pojo.getClass());
+
+ PropertyDescriptor properties[] = info.getPropertyDescriptors();
+
+ for (PropertyDescriptor prop : properties)
+ {
+ Object value;
+
+ if (prop.getPropertyType() == String.class)
+ {
+ value = RandomUtil.randomString();
+ }
+ else if (prop.getPropertyType() == Integer.class || prop.getPropertyType() == Integer.TYPE)
+ {
+ value = RandomUtil.randomInt();
+ }
+ else if (prop.getPropertyType() == Long.class || prop.getPropertyType() == Long.TYPE)
+ {
+ value = RandomUtil.randomLong();
+ }
+ else if (prop.getPropertyType() == Boolean.class || prop.getPropertyType() == Boolean.TYPE)
+ {
+ value = RandomUtil.randomBoolean();
+ }
+ else if (prop.getPropertyType() == Double.class || prop.getPropertyType() == Double.TYPE)
+ {
+ value = RandomUtil.randomDouble();
+ }
+ else
+ {
+ System.out.println("Can't validate property of type " + prop.getPropertyType() + " on " + prop.getName());
+ value = null;
+ }
+
+ if (value != null && prop.getWriteMethod() != null && prop.getReadMethod() == null)
+ {
+ System.out.println("WriteOnly property " + prop.getName() + " on " + pojo.getClass());
+ }
+ else if (value != null & prop.getWriteMethod() != null &&
+ prop.getReadMethod() != null &&
+ !ignoreSet.contains(prop.getName()))
+ {
+ System.out.println("Validating " + prop.getName() + " type = " + prop.getPropertyType());
+ prop.getWriteMethod().invoke(pojo, value);
+
+ Assert.assertEquals("Property " + prop.getName(), value, prop.getReadMethod().invoke(pojo));
+ }
+ }
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ Map<Thread, StackTraceElement[]> previousThreads;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ deleteDirectory(new File(getTestDir()));
+
+ InVMRegistry.instance.clear();
+
+ // checkFreePort(TransportConstants.DEFAULT_PORT);
+
+ previousThreads = Thread.getAllStackTraces();
+
+ UnitTestCase.log.info("###### starting test " + this.getClass().getName() + "." + getName());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ cleanupPools();
+
+ Map<Thread, StackTraceElement[]> threadMap = Thread.getAllStackTraces();
+ for (Thread thread : threadMap.keySet())
+ {
+ StackTraceElement[] stack = threadMap.get(thread);
+ for (StackTraceElement stackTraceElement : stack)
+ {
+ if (stackTraceElement.getMethodName().contains("getConnectionWithRetry") && !alreadyFailedThread.contains(thread))
+ {
+ alreadyFailedThread.add(thread);
+ System.out.println(threadDump(this.getName() + " has left threads running. Look at thread " +
+ thread.getName() +
+ " id = " +
+ thread.getId() +
+ " has running locators on test " +
+ this.getName() +
+ " on this following dump"));
+ fail("test left serverlocator running, this could effect other tests");
+ // System.exit(0);
+ }
+ else if (stackTraceElement.getMethodName().contains("BroadcastGroupImpl.run") && !alreadyFailedThread.contains(thread))
+ {
+ alreadyFailedThread.add(thread);
+ System.out.println(threadDump(this.getName() + " has left threads running. Look at thread " +
+ thread.getName() +
+ " id = " +
+ thread.getId() +
+ " is still broadcasting " +
+ this.getName() +
+ " on this following dump"));
+ fail("test left broadcastgroupimpl running, this could effect other tests");
+ // System.exit(0);
+ }
+ }
+ }
+
+ Map<Thread, StackTraceElement[]> postThreads = Thread.getAllStackTraces();
+
+ boolean failedThread = false;
+ if (postThreads.size() > previousThreads.size())
+ {
+ StringBuffer buffer = new StringBuffer();
+
+
+ buffer.append("*********************************************************************************\n");
+ buffer.append("LEAKING THREADS\n");
+
+ for (Thread aliveThread : postThreads.keySet())
+ {
+ if (!aliveThread.getName().contains("SunPKCS11") && !previousThreads.containsKey(aliveThread))
+ {
+ failedThread = true;
+ buffer.append("=============================================================================\n");
+ buffer.append("Thread " + aliveThread + " is still alive with the following stackTrace:\n");
+ StackTraceElement[] elements = postThreads.get(aliveThread);
+ for (StackTraceElement el : elements)
+ {
+ buffer.append(el + "\n");
+ }
+ }
+
+ }
+ buffer.append("*********************************************************************************\n");
+
+ System.out.println(buffer.toString());
+
+ }
+
+ //assertFalse("Thread Failed", failedThread);
+
+ super.tearDown();
+ }
+
+ /**
+ *
+ */
+ protected void cleanupPools()
+ {
+ OperationContextImpl.clearContext();
+
+ deleteDirectory(new File(getTestDir()));
+
+ int invmSize = InVMRegistry.instance.size();
+ if (invmSize > 0)
+ {
+ InVMRegistry.instance.clear();
+ fail("invm registry still had acceptors registered");
+ }
+
+ if (AsynchronousFileImpl.getTotalMaxIO() != 0)
+ {
+ AsynchronousFileImpl.resetMaxAIO();
+ Assert.fail("test did not close all its files " + AsynchronousFileImpl.getTotalMaxIO());
+ }
+
+ // We shutdown the global pools to give a better isolation between tests
+ ServerLocatorImpl.clearThreadPools();
+ }
+
+ protected byte[] autoEncode(final Object... args)
+ {
+
+ int size = 0;
+
+ for (Object arg : args)
+ {
+ if (arg instanceof Byte)
+ {
+ size++;
+ }
+ else if (arg instanceof Boolean)
+ {
+ size++;
+ }
+ else if (arg instanceof Integer)
+ {
+ size += 4;
+ }
+ else if (arg instanceof Long)
+ {
+ size += 8;
+ }
+ else if (arg instanceof Float)
+ {
+ size += 4;
+ }
+ else if (arg instanceof Double)
+ {
+ size += 8;
+ }
+ else
+ {
+ throw new IllegalArgumentException("method autoEncode doesn't know how to convert " + arg.getClass() +
+ " yet");
+ }
+ }
+
+ ByteBuffer buffer = ByteBuffer.allocate(size);
+
+ for (Object arg : args)
+ {
+ if (arg instanceof Byte)
+ {
+ buffer.put(((Byte)arg).byteValue());
+ }
+ else if (arg instanceof Boolean)
+ {
+ Boolean b = (Boolean)arg;
+ buffer.put((byte)(b.booleanValue() ? 1 : 0));
+ }
+ else if (arg instanceof Integer)
+ {
+ buffer.putInt(((Integer)arg).intValue());
+ }
+ else if (arg instanceof Long)
+ {
+ buffer.putLong(((Long)arg).longValue());
+ }
+ else if (arg instanceof Float)
+ {
+ buffer.putFloat(((Float)arg).floatValue());
+ }
+ else if (arg instanceof Double)
+ {
+ buffer.putDouble(((Double)arg).doubleValue());
+ }
+ else
+ {
+ throw new IllegalArgumentException("method autoEncode doesn't know how to convert " + arg.getClass() +
+ " yet");
+ }
+ }
+
+ return buffer.array();
+ }
+
+ protected void recreateDirectory(final String directory)
+ {
+ File file = new File(directory);
+ deleteDirectory(file);
+ file.mkdirs();
+ }
+
+ protected boolean deleteDirectory(final File directory)
+ {
+ if (directory.isDirectory())
+ {
+ String[] files = directory.list();
+
+ for (int j = 0; j < files.length; j++)
+ {
+ if (!deleteDirectory(new File(directory, files[j])))
+ {
+ return false;
+ }
+ }
+ }
+
+ return directory.delete();
+ }
+
+ protected void copyRecursive(final File from, final File to) throws Exception
+ {
+ if (from.isDirectory())
+ {
+ if (!to.exists())
+ {
+ to.mkdir();
+ }
+
+ String[] subs = from.list();
+
+ for (String sub : subs)
+ {
+ copyRecursive(new File(from, sub), new File(to, sub));
+ }
+ }
+ else
+ {
+ InputStream in = null;
+
+ OutputStream out = null;
+
+ try
+ {
+ in = new BufferedInputStream(new FileInputStream(from));
+
+ out = new BufferedOutputStream(new FileOutputStream(to));
+
+ int b;
+
+ while ((b = in.read()) != -1)
+ {
+ out.write(b);
+ }
+ }
+ finally
+ {
+ if (in != null)
+ {
+ in.close();
+ }
+
+ if (out != null)
+ {
+ out.close();
+ }
+ }
+ }
+ }
+
+ protected void assertRefListsIdenticalRefs(final List<MessageReference> l1, final List<MessageReference> l2)
+ {
+ if (l1.size() != l2.size())
+ {
+ Assert.fail("Lists different sizes: " + l1.size() + ", " + l2.size());
+ }
+
+ Iterator<MessageReference> iter1 = l1.iterator();
+ Iterator<MessageReference> iter2 = l2.iterator();
+
+ while (iter1.hasNext())
+ {
+ MessageReference o1 = iter1.next();
+ MessageReference o2 = iter2.next();
+
+ Assert.assertTrue("expected " + o1 + " but was " + o2, o1 == o2);
+ }
+ }
+
+ protected ServerMessage generateMessage(final long id)
+ {
+ ServerMessage message = new ServerMessageImpl(id, 1000);
+
+ message.setMessageID(id);
+
+ message.getBodyBuffer().writeString(UUID.randomUUID().toString());
+
+ message.setAddress(new SimpleString("foo"));
+
+ return message;
+ }
+
+ protected MessageReference generateReference(final Queue queue, final long id)
+ {
+ ServerMessage message = generateMessage(id);
+
+ return message.createReference(queue);
+ }
+
+ protected int calculateRecordSize(final int size, final int alignment)
+ {
+ return (size / alignment + (size % alignment != 0 ? 1 : 0)) * alignment;
+ }
+
+ protected ClientMessage createTextMessage(final String s, final ClientSession clientSession)
+ {
+ return createTextMessage(s, true, clientSession);
+ }
+
+ protected ClientMessage createTextMessage(final String s, final boolean durable, final ClientSession clientSession)
+ {
+ ClientMessage message = clientSession.createMessage(HornetQTextMessage.TYPE,
+ durable,
+ 0,
+ System.currentTimeMillis(),
+ (byte)4);
+ message.getBodyBuffer().writeString(s);
+ return message;
+ }
+
+ protected XidImpl newXID()
+ {
+ return new XidImpl("xa1".getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes());
+ }
+
+ protected int getMessageCount(final HornetQServer service, final String address) throws Exception
+ {
+ return getMessageCount(service.getPostOffice(), address);
+ }
+
+ /**
+ * @param address
+ * @param postOffice
+ * @return
+ * @throws Exception
+ */
+ protected int getMessageCount(final PostOffice postOffice, final String address) throws Exception
+ {
+ int messageCount = 0;
+
+ List<QueueBinding> bindings = getLocalQueueBindings(postOffice, address);
+
+ for (QueueBinding qBinding : bindings)
+ {
+ messageCount += qBinding.getQueue().getMessageCount();
+ }
+
+ return messageCount;
+ }
+
+ protected List<QueueBinding> getLocalQueueBindings(final PostOffice postOffice, final String address) throws Exception
+ {
+ ArrayList<QueueBinding> bindingsFound = new ArrayList<QueueBinding>();
+
+ Bindings bindings = postOffice.getBindingsForAddress(new SimpleString(address));
+
+ for (Binding binding : bindings.getBindings())
+ {
+ if (binding instanceof LocalQueueBinding)
+ {
+ bindingsFound.add((QueueBinding)binding);
+ }
+ }
+ return bindingsFound;
+ }
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+ protected static interface HornetQAction
+ {
+ void run() throws Exception;
+ }
+
+}
13 years, 8 months
JBoss hornetq SVN: r10468 - trunk.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-08 06:24:03 -0400 (Fri, 08 Apr 2011)
New Revision: 10468
Removed:
trunk/lib/
Log:
removed unwanted docbook libs
13 years, 8 months
JBoss hornetq SVN: r10467 - in trunk: hornetq-core and 11 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-08 06:20:36 -0400 (Fri, 08 Apr 2011)
New Revision: 10467
Modified:
trunk/build-hornetq.xml
trunk/hornetq-core-client/pom.xml
trunk/hornetq-core/pom.xml
trunk/hornetq-jboss-as-integration/pom.xml
trunk/hornetq-jms-client/pom.xml
trunk/hornetq-jms/pom.xml
trunk/hornetq-logging/pom.xml
trunk/hornetq-ra/hornetq-ra-jar/pom.xml
trunk/hornetq-ra/hornetq-ra-rar/pom.xml
trunk/hornetq-ra/pom.xml
trunk/hornetq-service-sar/pom.xml
trunk/hornetq-spring-integration/pom.xml
trunk/hornetq-twitter-integration/pom.xml
trunk/pom.xml
Log:
added parent pom and changed build file
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/build-hornetq.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -490,54 +490,12 @@
<!-- Compilation targets -->
<!-- ================================= -->
- <target name="compile" depends="compile-jms"/>
+ <target name="compile">
+ <ant antfile="build-thirdparty.xml" target="maven-install">
+ <property name="maven.opts" value="-Dmaven.test.skip=true"/>
+ <property name="maven.goal" value="compile"/>
+ </ant>
- <target name="compile-core" depends="jar-core">
- <!-- <exec executable="../tools/maven/bin/mvn" dir="hornetq-core">
- <arg value="package"/>
- </exec>-->
- <!-- <mkdir dir="${build.src.dir}/org/hornetq/core/filter/impl"/>
- <javacc target="${src.main.dir}/org/hornetq/core/filter/impl/FilterParser.jj"
- outputdirectory="${build.src.dir}/org/hornetq/core/filter/impl"
- javacchome="${sun.javacc.lib}"
- static="false"/>
- <javac destdir="${build.core.classes.dir}"
- target="${javac.target}"
- source="${javac.source}"
- optimize="${javac.optimize}"
- debug="${javac.debug}"
- depend="${javac.depend}"
- verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
- includeAntRuntime="${javac.include.ant.runtime}"
- includeJavaRuntime="${javac.include.java.runtime}"
- encoding="${javac.encoding}"
- failonerror="${javac.fail.onerror}">
- <src>
- <pathelement path="${build.src.dir}"/>
- <pathelement path="${src.main.dir}"/>
- </src>
- <include name="**/hornetq/*.java"/>
- <include name="**/hornetq/api/*.java"/>
- <include name="**/hornetq/api/core/**/*.java"/>
- <include name="**/hornetq/core/**/*.java"/>
- <include name="**/hornetq/spi/**/*.java"/>
- <include name="**/hornetq/utils/**/*.java"/>
- <classpath refid="core.compilation.classpath"/>
- </javac>
- <javah class="org.hornetq.core.asyncio.impl.AsynchronousFileImpl"
- classpath="${build.core.classes.dir}" destdir="./native/src"/>
-
- <java classname="org.jboss.netty.util.Version" classpathref="org.jboss.netty.classpath"
- outputproperty="netty.version" fork="true"/>
- <echo>setting netty version ${netty.version}</echo>
- <copy file="${src.config.dir}/common/hornetq-version.properties"
- tofile="${build.core.classes.dir}/hornetq-version.properties" overwrite="true">
- <filterset>
- <filter token="NETTY.VERSION" value="${netty.version}"/>
- </filterset>
- </copy>-->
-
</target>
<target name="compile-core-client-java5" depends="init">
@@ -583,11 +541,8 @@
</copy>
</target>
-
- <target name="compile-jms" depends="jar-jms">
- </target>
- <target name="compile-jms-java5" depends="compile-core-client-java5">
+ <target name="compile-jms-java5" depends="compile-core-client-java5">
<javac destdir="${build.jms.java5.classes.dir}"
target="1.5"
source="1.5"
@@ -607,30 +562,8 @@
<classpath refid="jms.compilation.jdk15.classpath"/>
</javac>
</target>
-
- <target name="compile-jboss-integration" depends="jar-jboss-integration">
- </target>
- <target name="compile-twitter-integration" depends="jar-twitter-integration">
- </target>
- <target name="compile-spring-integration" depends="jar-spring-integration">
-
- </target>
-
- <!-- author: Lucas Amador -->
- <target name="compile-jboss-service" depends="jar-jboss-service">
- </target>
-
- <target name="compile-bootstrap" depends="jar-bootstrap">
- </target>
-
- <target name="compile-logging" depends="jar-logging">
- </target>
-
- <target name="compile-ra" depends="jar-ra">
- </target>
-
<target name="build-native" depends="jar">
<exec dir="native" executable="bash">
<arg line="bootstrap"/>
@@ -688,14 +621,13 @@
<!-- Jar Targets -->
<!-- ======================================================================================== -->
- <target name="sources-jar" description="create jar files containing source code"
- depends="jar-core-sources, jar-core-client-sources, jar-core-client-java5-sources, jar-jms-sources, jar-jms-client-sources, jar-jms-client-java5-sources, jar-jboss-integration-sources, jar-jboss-service-sources, jar-bootstrap-sources, jar-logging-sources, jar-ra-sources, jar-resources-sources, jar-twitter-integration-sources, jar-spring-integration-sources">
+ <target name="jar">
+ <ant antfile="build-thirdparty.xml" target="maven-install">
+ <property name="maven.opts" value="-Dmaven.test.skip=true"/>
+ <property name="maven.goal" value="package"/>
+ </ant>
</target>
- <target name="jar"
- depends="jar-core, jar-core-client, jar-jms, jar-jms-client, jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jnp-client, jar-resources, sources-jar, jar-twitter-integration, jar-spring-integration, jar-rest, eap-examples">
- </target>
-
<target name="jar-jnp-client" depends="init">
<jar jarfile="${build.jars.dir}/${jnp.client.jar.name}">
<zipfileset src="${org.jboss.naming.lib}/jnpserver.jar">
@@ -722,43 +654,6 @@
</jar>
</target>
- <target name="jar-core" depends="init">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-core"/>
- </ant>
- </target>
-
- <target name="jar-core-sources">
- <jar jarfile="${build.jars.dir}/${core.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="**/hornetq/*.java"/>
- <include name="**/hornetq/api/*.java"/>
- <include name="**/hornetq/api/core/**/*.java"/>
- <include name="**/hornetq/core/**/*.java"/>
- <include name="**/hornetq/spi/**/*.java"/>
- <include name="**/hornetq/utils/**/*.java"/>
- </fileset>
- <fileset dir="${src.config.dir}/common">
- <include name="**/*.xsd"/>
- <exclude name="**/hornetq-jms.xsd"/>
- </fileset>
- <manifest>
- <attribute name="HornetQ-Version" value="${hornetq.version.string}"/>
- <attribute name="HornetQ-SVN-URL" value="${hornetq.version.svnurl}"/>
- </manifest>
- </jar>
- </target>
-
- <target name="jar-jms">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-jms"/>
- </ant>
- </target>
-
<target name="jar-jms-sources">
<jar jarfile="${build.jars.dir}/${jms.sources.jar.name}">
<fileset dir="${src.main.dir}">
@@ -770,24 +665,6 @@
</jar>
</target>
- <target name="jar-jms-client" depends="jar-jms">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-jms-client"/>
- </ant>
- </target>
-
- <target name="jar-jms-client-sources">
- <jar jarfile="${build.jars.dir}/${jms.client.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/api/jms/**/*.*"/>
- <include name="org/hornetq/jms/client/**/*.*"/>
- <include name="org/hornetq/jms/referenceable/**/*.*"/>
- </fileset>
- </jar>
- </target>
-
<target name="jar-jms-client-java5" depends="compile-jms-java5">
<jar jarfile="${build.jars.dir}/${jms.client.java5.jar.name}">
@@ -808,95 +685,6 @@
</jar>
</target>
- <target name="jar-jboss-integration">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-jboss-as-integration"/>
- </ant>
- </target>
-
- <target name="jar-jboss-integration-sources">
- <jar jarfile="${build.jars.dir}/${jboss.integration.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/integration/jboss/**/*.java"/>
- </fileset>
- </jar>
- </target>
-
- <target name="jar-twitter-integration">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-twitter-integration"/>
- </ant>
- </target>
-
- <target name="jar-twitter-integration-sources">
- <jar jarfile="${build.jars.dir}/${twitter.integration.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/integration/twitter/**/*.java"/>
- </fileset>
- </jar>
- </target>
-
- <target name="jar-spring-integration">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-spring-integration"/>
- </ant>
- </target>
-
- <target name="jar-spring-integration-sources">
- <jar jarfile="${build.jars.dir}/${spring.integration.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/integration/spring/**/*.java"/>
- </fileset>
- </jar>
- </target>
-
- <!-- author: Lucas Amador -->
- <target name="jar-jboss-service" depends="jar-core">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-service-sar"/>
- </ant>
- </target>
-
- <target name="jar-jboss-service-sources">
- <jar jarfile="${build.jars.dir}/${service.sources.sar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/service/**/*.java"/>
- </fileset>
- </jar>
- </target>
-
- <target name="jar-bootstrap">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-bootstrap"/>
- </ant>
- </target>
-
- <target name="jar-bootstrap-sources">
- <jar jarfile="${build.jars.dir}/${bootstrap.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/integration/bootstrap/**/*.java"/>
- </fileset>
- </jar>
- </target>
-
- <target name="jar-logging">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-logging"/>
- </ant>
- </target>
-
<target name="jar-logging-sources">
<jar jarfile="${build.jars.dir}/${logging.sources.jar.name}">
<fileset dir="${src.main.dir}">
@@ -904,15 +692,7 @@
</fileset>
</jar>
</target>
-
- <target name="jar-core-client" depends="compile-core">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-core-client"/>
- </ant>
- </target>
-
+<!--
<target name="jar-core-client-sources">
<jar jarfile="${build.jars.dir}/${core.client.sources.jar.name}">
<fileset dir="${src.main.dir}">
@@ -938,12 +718,12 @@
<include name="org/hornetq/spi/core/protocol/*.*"/>
<include name="org/hornetq/spi/core/remoting/*.*"/>
- <!-- required by SessionSendMessage -->
+ <!– required by SessionSendMessage –>
<include name="org/hornetq/core/server/ServerMessage.java"/>
<include name="org/hornetq/core/journal/EncodingSupport.java"/>
</fileset>
</jar>
- </target>
+ </target>-->
<target name="jar-core-client-java5" depends="compile-core-client-java5">
<jar jarfile="${build.jars.dir}/${core.client.java5.jar.name}">
@@ -1009,22 +789,7 @@
</fileset>
</jar>
</target>
-
- <target name="jar-ra" depends="jar-core-client, jar-jms-client">
- <ant antfile="build-thirdparty.xml" target="maven-install">
- <property name="maven.opts" value="-Dmaven.test.skip=true"/>
- <property name="maven.goal" value="install"/>
- <property name="working.dir" value="hornetq-ra"/>
- </ant>
- </target>
- <target name="jar-ra-sources">
- <jar jarfile="${build.jars.dir}/${ra.sources.jar.name}">
- <fileset dir="${src.main.dir}">
- <include name="org/hornetq/ra/**/*"/>
- </fileset>
- </jar>
- </target>
<target name="jar-resources" depends="init">
<jar jarfile="${build.jars.dir}/${resources.jar.name}">
@@ -1061,7 +826,7 @@
</jar>
</target>
- <target name="jar-rest-init" depends="jar-jms">
+ <target name="jar-rest-init" depends="jar">
<ant antfile="build-maven.xml" target="upload-local-target">
<property name="artifact.id" value="hornetq-core"/>
<property name="file-name" value="hornetq-core"/>
@@ -1073,7 +838,7 @@
</target>
- <target name="jar-rest" depends="jar-rest-init">
+ <target name="jar-rest" >
<ant antfile="build-thirdparty.xml" target="maven-install">
<property name="maven.opts" value="-Dmaven.test.skip=true"/>
<property name="maven.goal" value="install"/>
@@ -1092,7 +857,7 @@
<!-- Distribution targets -->
<!-- ======================================================================================== -->
- <target name="bin-distro" depends="createthirdparty, jar, jar-core-client, jar-jms-client, validate-configuration">
+ <target name="bin-distro" depends="createthirdparty, jar, validate-configuration">
<mkdir dir="${build.distro.dir}"/>
<mkdir dir="${build.distro.lib.dir}"/>
Modified: trunk/hornetq-core/pom.xml
===================================================================
--- trunk/hornetq-core/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-core/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,82 +1,70 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-core</artifactId>
- <packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
- <name>HornetQ Core</name>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ Core</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.netty</groupId>
+ <artifactId>netty</artifactId>
+ </dependency>
+ </dependencies>
- <properties>
- <netty.version>3.2.3.Final</netty.version>
- <netty.version.string>3.2.3.Final</netty.version.string>
- <hornetq.version.versionName>Stripey</hornetq.version.versionName>
- <hornetq.version.majorVersion>2</hornetq.version.majorVersion>
- <hornetq.version.minorVersion>2</hornetq.version.minorVersion>
- <hornetq.version.microVersion>3</hornetq.version.microVersion>
- <hornetq.version.incrementingVersion>122</hornetq.version.incrementingVersion>
- <hornetq.version.versionSuffix>SNAPSHOT</hornetq.version.versionSuffix>
- <hornetq.version.versionTag>SNAPSHOT</hornetq.version.versionTag>
- <HornetQ-Version>${hornetq.version.majorVersion}.${hornetq.version.minorVersion}.${hornetq.version.microVersion}.${hornetq.version.versionSuffix} (${hornetq.version.versionName}, ${hornetq.version.incrementingVersion})</HornetQ-Version>
- <HornetQ-SVN-URL>https://svn.jboss.org/repos/hornetq/trunk</HornetQ-SVN-URL>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.2.3.Final</version>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <archive>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
<manifestEntries>
- <HornetQ-Version>${HornetQ-Version}</HornetQ-Version>
- <HornetQ-SVN-URL>${HornetQ-SVN-URL}</HornetQ-SVN-URL>
+ <HornetQ-Version>${HornetQ-Version}</HornetQ-Version>
+ <HornetQ-SVN-URL>${HornetQ-SVN-URL}</HornetQ-SVN-URL>
</manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javacc-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>javacc</id>
- <goals>
- <goal>javacc</goal>
- </goals>
- <configuration>
- <isStatic>false</isStatic>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javacc</id>
+ <goals>
+ <goal>javacc</goal>
+ </goals>
+ <configuration>
+ <isStatic>false</isStatic>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: trunk/hornetq-core-client/pom.xml
===================================================================
--- trunk/hornetq-core-client/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-core-client/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,90 +1,96 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-core-client</artifactId>
- <packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
- <name>HornetQ Core Client</name>
- <dependencies>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
- </dependency>
- </dependencies>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <excludes>
- <exclude>org.jboss.netty:netty</exclude>
- </excludes>
- </artifactSet>
- <filters>
- <filter>
- <artifact>org.hornetq:hornetq-core</artifact>
- <includes>
- <include>hornetq-version.properties</include>
- <include>org/hornetq/api/**/*.class</include>
- <include>org/hornetq/*.class</include>
- <include>org/hornetq/core/buffers/**/*.class</include>
- <include>org/hornetq/core/client/**/*.class</include>
- <include>org/hornetq/core/filter/**/*.class</include>
- <include>org/hornetq/core/exception/**/*.class</include>
- <include>org/hornetq/core/remoting/impl/**/*.class</include>
- <include>org/hornetq/utils/**/*.class</include>
- <include>org/hornetq/core/cluster/**/*.class</include>
- <include>org/hornetq/core/list/**/*.class</include>
- <include>org/hornetq/core/logging/**/*.class</include>
- <include>org/hornetq/core/message/**/*.class</include>
- <include>org/hornetq/core/protocol/core/**/*.class</include>
- <include>org/hornetq/core/remoting/**/*.class</include>
- <include>org/hornetq/core/version/**/*.class</include>
- <include>org/hornetq/core/management/*.class</include>
- <include>org/hornetq/core/transaction/impl/XidImpl.class</include>
- <include>org/hornetq/spi/core/logging/*.class</include>
- <include>org/hornetq/spi/core/protocol/*.class</include>
- <include>org/hornetq/spi/core/remoting/*.class</include>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core-client</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ Core Client</name>
- <!-- required by SessionSendMessage -->
- <include>org/hornetq/core/server/ServerMessage.class</include>
- <include>org/hornetq/core/journal/EncodingSupport.class</include>
- </includes>
- </filter>
- </filters>
- </configuration>
- </execution>
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>org.jboss.netty:netty</exclude>
+ </excludes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.hornetq:hornetq-core</artifact>
+ <includes>
+ <include>hornetq-version.properties</include>
+ <include>org/hornetq/api/**/*.class</include>
+ <include>org/hornetq/*.class</include>
+ <include>org/hornetq/core/buffers/**/*.class</include>
+ <include>org/hornetq/core/client/**/*.class</include>
+ <include>org/hornetq/core/filter/**/*.class</include>
+ <include>org/hornetq/core/exception/**/*.class</include>
+ <include>org/hornetq/core/remoting/impl/**/*.class</include>
+ <include>org/hornetq/utils/**/*.class</include>
+ <include>org/hornetq/core/cluster/**/*.class</include>
+ <include>org/hornetq/core/list/**/*.class</include>
+ <include>org/hornetq/core/logging/**/*.class</include>
+ <include>org/hornetq/core/message/**/*.class</include>
+ <include>org/hornetq/core/protocol/core/**/*.class</include>
+ <include>org/hornetq/core/remoting/**/*.class</include>
+ <include>org/hornetq/core/version/**/*.class</include>
+ <include>org/hornetq/core/management/*.class</include>
+ <include>org/hornetq/core/transaction/impl/XidImpl.class</include>
+ <include>org/hornetq/spi/core/logging/*.class</include>
+ <include>org/hornetq/spi/core/protocol/*.class</include>
+ <include>org/hornetq/spi/core/remoting/*.class</include>
+ <!-- required by SessionSendMessage -->
+ <include>org/hornetq/core/server/ServerMessage.class</include>
+ <include>org/hornetq/core/journal/EncodingSupport.class</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: trunk/hornetq-jboss-as-integration/pom.xml
===================================================================
--- trunk/hornetq-jboss-as-integration/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-jboss-as-integration/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,64 +1,64 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-jboss-as-integration</artifactId>
- <packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
- <name>HornetQ JBoss AS Integration</name>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
- <dependencies>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <version>2.0.3.SP1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx</artifactId>
- <version>2.0.3.SP1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- <version>1.0.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <version>5.1.0.GA</version>
- </dependency>
- <!--this for xa recovery-->
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossjts</artifactId>
- <version>4.6.1.GA</version>
- </dependency>
- </dependencies>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jboss-as-integration</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ JBoss AS Integration</name>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ </dependency>
+ <!--this for xa recovery-->
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjts</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: trunk/hornetq-jms/pom.xml
===================================================================
--- trunk/hornetq-jms/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-jms/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -2,32 +2,34 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
<packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ JMS</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jms-api</artifactId>
- <version>1.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-transaction-api</artifactId>
- <version>1.0.1.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
- <version>4.6.1.GA</version>
</dependency>
</dependencies>
@@ -43,8 +45,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/hornetq-jms-client/pom.xml
===================================================================
--- trunk/hornetq-jms-client/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-jms-client/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,69 +1,74 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-jms-client</artifactId>
- <packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
- <name>HornetQ JMS Client</name>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
- <dependencies>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-jms</artifactId>
- <version>2.2.3-SNAPSHOT</version>
- </dependency>
- </dependencies>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms-client</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ JMS Client</name>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <excludes>
- <exclude>org.jboss.netty:netty</exclude>
- <exclude>org.hornetq:hornetq-core</exclude>
- </excludes>
- </artifactSet>
- <filters>
- <filter>
- <artifact>org.hornetq:hornetq-jms</artifact>
- <includes>
- <include>org/hornetq/api/jms/**/*.class</include>
- <include>org/hornetq/jms/client/**/*.*</include>
- <include>org/hornetq/jms/referenceable/**/*.*</include>
- </includes>
- </filter>
- </filters>
- </configuration>
- </execution>
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>org.jboss.netty:netty</exclude>
+ <exclude>org.hornetq:hornetq-core</exclude>
+ </excludes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.hornetq:hornetq-jms</artifact>
+ <includes>
+ <include>org/hornetq/api/jms/**/*.class</include>
+ <include>org/hornetq/jms/client/**/*.*</include>
+ <include>org/hornetq/jms/referenceable/**/*.*</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: trunk/hornetq-logging/pom.xml
===================================================================
--- trunk/hornetq-logging/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-logging/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,37 +1,41 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-logging</artifactId>
- <packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
- <name>HornetQ Logging</name>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
- <dependencies>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-logging</artifactId>
+ <packaging>jar</packaging>
+ <name>HornetQ Logging</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: trunk/hornetq-ra/hornetq-ra-jar/pom.xml
===================================================================
--- trunk/hornetq-ra/hornetq-ra-jar/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-ra/hornetq-ra-jar/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -2,29 +2,33 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-ra</artifactId>
<packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ RAR JAR</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jca-api</artifactId>
- <version>1.5.0.GA</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -41,8 +45,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/hornetq-ra/hornetq-ra-rar/pom.xml
===================================================================
--- trunk/hornetq-ra/hornetq-ra-rar/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-ra/hornetq-ra-rar/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -2,17 +2,22 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-rar</artifactId>
<packaging>rar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ JMS RA</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms-client</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.hornetq</groupId>
@@ -39,12 +44,12 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-ra</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core-client</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.hornetq</groupId>
@@ -73,8 +78,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/hornetq-ra/pom.xml
===================================================================
--- trunk/hornetq-ra/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-ra/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,26 +1,31 @@
<project>
- <name>HornetQ RAR POM</name>
- <modelVersion>4.0.0</modelVersion>
+ <name>HornetQ RAR POM</name>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-rar-pom</artifactId>
- <version>2.2.3-SNAPSHOT</version>
- <packaging>pom</packaging>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-rar-pom</artifactId>
+ <packaging>pom</packaging>
- <modules>
- <module>hornetq-ra-jar</module>
- <module>hornetq-ra-rar</module>
- </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>hornetq-ra-jar</module>
+ <module>hornetq-ra-rar</module>
+ </modules>
</project>
Modified: trunk/hornetq-service-sar/pom.xml
===================================================================
--- trunk/hornetq-service-sar/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-service-sar/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -2,27 +2,32 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-service-sar</artifactId>
<packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ JBoss AS4 Integration</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jboss-as-integration</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
@@ -38,8 +43,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/hornetq-spring-integration/pom.xml
===================================================================
--- trunk/hornetq-spring-integration/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-spring-integration/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -15,42 +15,43 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-spring-integration</artifactId>
<packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ Spring Integration</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>3.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
- <version>3.0.3.RELEASE</version>
</dependency>
</dependencies>
@@ -60,8 +61,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/hornetq-twitter-integration/pom.xml
===================================================================
--- trunk/hornetq-twitter-integration/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/hornetq-twitter-integration/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -2,22 +2,26 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </parent>
+
<groupId>org.hornetq</groupId>
<artifactId>hornetq-twitter-integration</artifactId>
<packaging>jar</packaging>
- <version>2.2.3-SNAPSHOT</version>
<name>HornetQ Twitter Integration</name>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
- <version>2.1.6</version>
</dependency>
</dependencies>
@@ -27,8 +31,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.6</source>
+ <target>1.6</target>
</configuration>
</plugin>
</plugins>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
+++ trunk/pom.xml 2011-04-08 10:20:36 UTC (rev 10467)
@@ -1,378 +1,526 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright 2009 Red Hat, Inc.
- Red Hat licenses this file to you under the Apache License, version
- 2.0 (the "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-pom</artifactId>
+ <packaging>pom</packaging>
+ <version>2.2.3-SNAPSHOT</version>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.hornetq</groupId>
- <artifactId>messaging</artifactId>
- <packaging>pom</packaging>
- <version>2.2.3-SNAPSHOT</version>
+ <name>HornetQ</name>
+ <url>http://hornetq.org</url>
+ <description>
+ Putting the buzz in messaging
+ </description>
+ <organization>
+ <name>JBoss, a division of Red Hat</name>
+ <url>http://www.jboss.org/</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>ASL 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
<properties>
+ <netty.version>3.2.3.Final</netty.version>
+ <netty.version.string>3.2.3.Final</netty.version.string>
+ <hornetq.version.versionName>black'n'yellow</hornetq.version.versionName>
+ <hornetq.version.majorVersion>2</hornetq.version.majorVersion>
+ <hornetq.version.minorVersion>2</hornetq.version.minorVersion>
+ <hornetq.version.microVersion>3</hornetq.version.microVersion>
+ <hornetq.version.incrementingVersion>122</hornetq.version.incrementingVersion>
+ <hornetq.version.versionSuffix>SNAPSHOT</hornetq.version.versionSuffix>
+ <hornetq.version.versionTag>SNAPSHOT</hornetq.version.versionTag>
+ <HornetQ-Version>${hornetq.version.majorVersion}.${hornetq.version.minorVersion}.${hornetq.version.microVersion}.${hornetq.version.versionSuffix} (${hornetq.version.versionName}, ${hornetq.version.incrementingVersion})</HornetQ-Version>
+ <HornetQ-SVN-URL>https://svn.jboss.org/repos/hornetq/trunk</HornetQ-SVN-URL>
<resteasy.version>2.1.0.GA</resteasy.version>
</properties>
- <name>HornetQ</name>
- <url>http://hornetq.org</url>
- <description>
- Putting the buzz in messaging
- </description>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/hornetq/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hornetq/trunk</developerConnection>
+ </scm>
- <organization>
- <name>JBoss, a division of Red Hat</name>
- <url>http://www.jboss.org/</url>
- </organization>
+ <distributionManagement>
+ <repository>
+ <id>jboss-releases-repository</id>
+ <name>JBoss Releases Repository</name>
+ <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/messaging/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/messaging/trunk</developerConnection>
- </scm>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.com/jira/browse/HORNETQ</url>
+ </issueManagement>
+ <developers>
+ <developer>
+ <id>clebertsuconic</id>
+ <name>Clebert Suconic</name>
+ <email>csuconic(a)redhat.com</email>
+ <url>http://hornetq.com</url>
+ <roles>
+ <role>project-owner</role>
+ </roles>
+ <timezone>0</timezone>
+ </developer>
+ <developer>
+ <id>andytaylor</id>
+ <name>Andy Taylor</name>
+ <email>ataylor(a)redhat.com</email>
+ <url>http://hornetq.com</url>
+ <timezone>0</timezone>
+ </developer>
+ <developer>
+ <id>howardgao</id>
+ <name>Howard Gao</name>
+ <email>hgao(a)redhat.com</email>
+ <url>http://hornetq.com</url>
+ <timezone>0</timezone>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>Tim Fox</name>
+ </contributor>
+ <contributor>
+ <name>Jeff Mesnil</name>
+ </contributor>
+ </contributors>
+
<modules>
<module>hornetq-core</module>
+ <module>hornetq-core-client</module>
+ <module>hornetq-jms</module>
+ <module>hornetq-jms-client</module>
+ <module>hornetq-ra</module>
+ <module>hornetq-logging</module>
+ <module>hornetq-bootstrap</module>
+ <module>hornetq-jboss-as-integration</module>
+ <module>hornetq-twitter-integration</module>
+ <module>hornetq-service-sar</module>
+ <!--<module>tests</module>-->
</modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-buildmagic-thirdparty-plugin</artifactId>
- <executions>
- <execution>
- <id>build-thirdparty</id>
- <phase>initialize</phase>
- <goals>
- <goal>build-thirdparty</goal>
- </goals>
- <configuration>
- <outputDirectory>thirdparty</outputDirectory>
- <librariesEnt>thirdparty/libraries.ent</librariesEnt>
- <includedScopes>
- <scope>compile</scope>
- </includedScopes>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <!--without this dummy entry we get a npe, just ignore-->
- <mappedDependencies>
- <dependency>
- <groupId>id</groupId>
- <artifactId>art-id</artifactId>
- <mapping>
- <artifactId>1.0.0</artifactId>
- </mapping>
- </dependency>
- </mappedDependencies>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>clean</id>
- <phase>pre-clean</phase>
- <configuration>
- <tasks name="distro"/>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>distro</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <property name="maven.build" value="true"/>
- <ant target="distro"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-launcher</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>sun.jdk</groupId>
- <artifactId>tools</artifactId>
- <version>1.5</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- <dependency>
- <groupId>net.java.dev.javacc</groupId>
- <artifactId>javacc</artifactId>
- <version>4.0</version>
- </dependency>
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.9.1</version>
- </dependency>
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>resolver</artifactId>
- <version>2.9.1</version>
- </dependency>
- <dependency>
- <groupId>apache-xerces</groupId>
- <artifactId>xml-apis</artifactId>
- <version>2.9.1</version>
- </dependency>
- </dependencies>
- </plugin>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>net.java.dev.javacc</groupId>
+ <artifactId>javacc</artifactId>
+ <version>4.0</version>
+ </dependency>
+ <!-- needed to compile JMS-->
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ <version>1.1.0.GA</version>
+ </dependency>
+ <!-- needed to compile JavaEE examples-->
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ <version>3.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ <version>1.0.1.GA</version>
+ </dependency>
+ <!--this specifically for the JMS Bridge-->
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <version>5.1.0.GA</version>
+ </dependency>
+ <!--this for xa recovery-->
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjts</artifactId>
+ <version>4.6.1.GA</version>
+ </dependency>
+ <!--needed to compile security-->
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <version>2.0.3.SP1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ <version>2.0.3.SP1</version>
+ </dependency>
+ <!--needed to compile the bootstrap jar-->
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>2.0.6.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.14.GA</version>
+ </dependency>
+ <!--needed to compile transport jar-->
+ <dependency>
+ <groupId>org.jboss.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <!--needed to compile the logging jar-->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.1.0.GA</version>
+ </dependency>
+ <!--needed to compile twitter support-->
+ <dependency>
+ <groupId>org.twitter4j</groupId>
+ <artifactId>twitter4j-core</artifactId>
+ <version>2.1.2</version>
+ </dependency>
+ <!--needed to compile the spring support-->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>3.0.3.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>3.0.3.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>3.0.3.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ <version>3.0.3.RELEASE</version>
+ </dependency>
+ <!--needed for the rest support-->
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <version>${resteasy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxb-provider</artifactId>
+ <version>${resteasy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jackson-provider</artifactId>
+ <version>${resteasy.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-atom-provider</artifactId>
+ <version>${resteasy.version}</version>
+ </dependency>
+ <!-- needed to compile the tests-->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ </dependency>
+ <!--needed to compile the jms tests-->
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
- </plugins>
+ <!--needed to run the jms tests-->
+ <dependency>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>5.0.3.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossts-common</artifactId>
+ <version>4.6.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>apache-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.0.jboss</version>
+ </dependency>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxrs</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxb-provider</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <!--needed for the filters-->
- <dependency>
- <groupId>net.java.dev.javacc</groupId>
- <artifactId>javacc</artifactId>
- <version>4.0</version>
- </dependency>
- <!-- needed to compile JMS-->
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jms-api</artifactId>
- <version>1.1.0.GA</version>
- </dependency>
- <!-- needed to compile JavaEE examples-->
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-ejb-api</artifactId>
- <version>3.0.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- <version>1.0.1.GA</version>
- </dependency>
- <!--this specifically for the JMS Bridge-->
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <version>5.1.0.GA</version>
- </dependency>
- <!--this for xa recovery-->
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossjts</artifactId>
- <version>4.6.1.GA</version>
- </dependency>
- <!--needed to compile security-->
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <version>2.0.3.SP1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx</artifactId>
- <version>2.0.3.SP1</version>
- </dependency>
- <!--needed to compile the bootstrap jar-->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- <version>2.0.6.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <version>2.2.14.GA</version>
- </dependency>
- <!--needed to compile transport jar-->
- <dependency>
- <groupId>org.jboss.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.2.3.Final</version>
- </dependency>
- <!--needed to compile the logging jar-->
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>2.1.0.GA</version>
- </dependency>
- <!--needed to compile twitter support-->
- <dependency>
- <groupId>org.twitter4j</groupId>
- <artifactId>twitter4j-core</artifactId>
- <version>2.1.6</version>
- </dependency>
- <!-- needed to compile the tests-->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- </dependency>
- <!--needed to compile the jms tests-->
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- <version>1.0.0.GA</version>
- </dependency>
+ <!-- needed for javaee examples-->
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-ext-api</artifactId>
+ <version>1.0.0</version>
+ </dependency>
- <!--needed to run the jms tests-->
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossts-common</artifactId>
- <version>4.6.1.GA</version>
- </dependency>
- <dependency>
- <groupId>apache-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
- </dependency>
-
- <!-- needed for javaee examples-->
- <dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-ext-api</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <!-- needed for javadoc graphics-->
- <dependency>
- <groupId>org.jboss.apiviz</groupId>
- <artifactId>apiviz</artifactId>
- <version>1.3.0.GA</version>
- </dependency>
- <!-- needed for spring integration -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>3.0.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>3.0.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>3.0.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jms</artifactId>
- <version>3.0.3.RELEASE</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ <version>1.5.0.GA</version>
+ </dependency>
+ <!-- needed for javadoc graphics-->
+ <dependency>
+ <groupId>org.jboss.apiviz</groupId>
+ <artifactId>apiviz</artifactId>
+ <version>1.3.0.GA</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <repositories>
- <repository>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>interval:10080</updatePolicy>
- </releases>
- <id>jboss.release</id>
- <name>JBoss releases</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- </repository>
- </repositories>
+ <repositories>
+ <repository>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>interval:10080</updatePolicy>
+ </releases>
+ <id>jboss.release</id>
+ <name>JBoss releases</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>interval:10080</updatePolicy>
+ </releases>
+ <id>jboss.release</id>
+ <name>JBoss releases</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <minmemory>128m</minmemory>
+ <maxmemory>512m</maxmemory>
+ <quiet>false</quiet>
+ <aggregate>true</aggregate>
+ </configuration>
+ <executions>
+ <execution>
+ <id>javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
- <pluginRepositories>
- <pluginRepository>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>interval:10080</updatePolicy>
- </releases>
- <id>jboss.release</id>
- <name>JBoss releases</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
- </pluginRepository>
- </pluginRepositories>
- <!--<profiles>
- --><!-- This profile is used by the ant/buildmagic build --><!--
- <profile>
- <id>integrated-build</id>
- <activation>
- <property>
- <name>integrated-build</name>
- </property>
- </activation>
- <modules>
- <module>thirdparty</module>
- </modules>
- </profile>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>javacc</id>
+ <goals>
+ <goal>javacc</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-rar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>net.sf.maven-sar</groupId>
+ <artifactId>maven-sar-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.0-beta-5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.3.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.15</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
- </profiles>-->
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.3</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <createChecksum>true</createChecksum>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <linkXref>true</linkXref>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration/>
+ <executions>
+ <execution>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <configuration>
+ <createChecksum>true</createChecksum>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>html</format>
+ <format>xml</format>
+ </formats>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>
+ config/jboss_checks.xml
+ </configLocation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.1.1</version>
+ <configuration>
+ <xmlOutput>true</xmlOutput>
+ <effort>Max</effort>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <minmemory>128m</minmemory>
+ <maxmemory>1024m</maxmemory>
+ <quiet>false</quiet>
+ <aggregate>true</aggregate>
+ <excludePackageNames>com.restfully.*:org.jboss.resteasy.examples.*:org.jboss.resteasy.tests.*
+ </excludePackageNames>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>
+ maven-project-info-reports-plugin
+ </artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
-
13 years, 8 months
JBoss hornetq SVN: r10466 - in trunk: hornetq-ra and 12 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-08 03:26:27 -0400 (Fri, 08 Apr 2011)
New Revision: 10466
Added:
trunk/hornetq-ra/
trunk/hornetq-ra/hornetq-ra-jar/
trunk/hornetq-ra/hornetq-ra-jar/pom.xml
trunk/hornetq-ra/hornetq-ra-jar/src/
trunk/hornetq-ra/hornetq-ra-jar/src/main/
trunk/hornetq-ra/hornetq-ra-jar/src/main/java/
trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/
trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/
trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/
trunk/hornetq-ra/hornetq-ra-rar/
trunk/hornetq-ra/hornetq-ra-rar/pom.xml
trunk/hornetq-ra/hornetq-ra-rar/src/
trunk/hornetq-ra/hornetq-ra-rar/src/main/
trunk/hornetq-ra/hornetq-ra-rar/src/main/resources/
trunk/hornetq-ra/hornetq-ra-rar/src/main/resources/ra.xml
trunk/hornetq-ra/pom.xml
Removed:
trunk/src/config/ra.xml
trunk/src/main/org/hornetq/ra/
Modified:
trunk/build-hornetq.xml
trunk/hornetq.iml
Log:
mavenized hornetq ra
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2011-04-08 04:47:49 UTC (rev 10465)
+++ trunk/build-hornetq.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -103,6 +103,7 @@
<property name="hornetq.bootstrap.module.jar" value="hornetq-bootstrap"/>
<property name="hornetq.twitter.module.jar" value="hornetq-twitter-integration"/>
<property name="hornetq.service.module.jar" value="hornetq-service-sar"/>
+ <property name="hornetq.ra.rar.module.jar" value="hornetq-ra/hornetq-ra-rar"/>
<property name="target.core.jar.dir" value="${hornetq.core.module.jar}/target"/>
<property name="target.jms.jar.dir" value="${hornetq.jms.module.jar}/target"/>
<property name="target.jms.client.jar.dir" value="${hornetq.jms.client.module.jar}/target"/>
@@ -112,6 +113,7 @@
<property name="target.bootstrap.jar.dir" value="${hornetq.bootstrap.module.jar}/target"/>
<property name="target.twitter.jar.dir" value="${hornetq.twitter.module.jar}/target"/>
<property name="target.service.jar.dir" value="${hornetq.service.module.jar}/target"/>
+ <property name="target.ra.rar.jar.dir" value="${hornetq.ra.rar.module.jar}/target"/>
<property name="build.core.client.java5.classes.dir" value="${build.dir}/classes/core-client-java5"/>
<property name="build.jms.classes.dir" value="${build.dir}/classes/jms"/>
<property name="build.jms.java5.classes.dir" value="${build.dir}/classes/jms-java5"/>
@@ -626,26 +628,7 @@
<target name="compile-logging" depends="jar-logging">
</target>
- <target name="compile-ra" depends="init">
- <javac destdir="${build.ra.classes.dir}"
- target="${javac.target}"
- source="${javac.source}"
- optimize="${javac.optimize}"
- debug="${javac.debug}"
- depend="${javac.depend}"
- verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
- includeAntRuntime="${javac.include.ant.runtime}"
- includeJavaRuntime="${javac.include.java.runtime}"
- encoding="${javac.encoding}"
- failonerror="${javac.fail.onerror}">
- <src>
- <pathelement path="${build.src.dir}"/>
- <pathelement path="${src.main.dir}"/>
- </src>
- <include name="**org/hornetq/ra/**/*.java"/>
- <classpath refid="jms.compilation.classpath"/>
- </javac>
+ <target name="compile-ra" depends="jar-ra">
</target>
<target name="build-native" depends="jar">
@@ -1027,18 +1010,12 @@
</jar>
</target>
- <target name="jar-ra" depends="jar-core-client, jar-jms-client, compile-ra">
- <jar jarfile="${build.jars.dir}/${ra.jar.name}">
- <fileset dir="${build.ra.classes.dir}">
- <include name="org/hornetq/ra/**/*.class"/>
- </fileset>
- </jar>
- <jar jarfile="${build.jars.dir}/${ra.rar.name}">
- <metainf dir="${src.config.dir}" includes="ra.xml"/>
- <fileset file="${build.jars.dir}/${ra.jar.name}"/>
- <fileset file="${build.jars.dir}/${core.client.jar.name}"/>
- <fileset file="${build.jars.dir}/${jms.jar.name}"/>
- </jar>
+ <target name="jar-ra" depends="jar-core-client, jar-jms-client">
+ <ant antfile="build-thirdparty.xml" target="maven-install">
+ <property name="maven.opts" value="-Dmaven.test.skip=true"/>
+ <property name="maven.goal" value="install"/>
+ <property name="working.dir" value="hornetq-ra"/>
+ </ant>
</target>
<target name="jar-ra-sources">
@@ -1086,12 +1063,12 @@
<target name="jar-rest-init" depends="jar-jms">
<ant antfile="build-maven.xml" target="upload-local-target">
- <property name="artifact.id" value="hornetq-core"/>
- <property name="file-name" value="hornetq-core"/>
+ <property name="artifact.id" value="hornetq-core"/>
+ <property name="file-name" value="hornetq-core"/>
</ant>
<ant antfile="build-maven.xml" target="upload-local-target">
- <property name="artifact.id" value="hornetq-jms"/>
- <property name="file-name" value="hornetq-jms"/>
+ <property name="artifact.id" value="hornetq-jms"/>
+ <property name="file-name" value="hornetq-jms"/>
</ant>
</target>
@@ -1147,7 +1124,6 @@
<copy todir="${build.distro.lib.dir}">
<fileset dir="${build.jars.dir}">
<include name="${mc.jar.name}"/>
- <include name="${ra.rar.name}"/>
<include name="${core.client.java5.jar.name}"/>
<include name="${jms.client.java5.jar.name}"/>
<include name="${jnp.client.jar.name}"/>
@@ -1168,6 +1144,8 @@
<copy file="${target.bootstrap.jar.dir}/hornetq-bootstrap-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-bootstrap.jar"/>
<copy file="${target.twitter.jar.dir}/hornetq-twitter-integration-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-twitter-integration.jar"/>
<copy file="${target.service.jar.dir}/hornetq-service-sar-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-service.jar"/>
+ <copy file="${target.ra.rar.jar.dir}/hornetq-rar-2.2.3-SNAPSHOT.rar" tofile="${build.distro.lib.dir}/hornetq-rar.rar"/>
+
<copy file="${org.jboss.netty.lib}/${netty.jar.name}" tofile="${build.distro.lib.dir}/netty.jar"/>
<copy file="${org.twitter4j.lib}/${twitter4j.jar.name}" tofile="${build.distro.lib.dir}/${twitter4j.jar.name}"/>
<copy todir="${build.distro.config.dir}">
Added: trunk/hornetq-ra/hornetq-ra-jar/pom.xml
===================================================================
--- trunk/hornetq-ra/hornetq-ra-jar/pom.xml (rev 0)
+++ trunk/hornetq-ra/hornetq-ra-jar/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-ra</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2.3-SNAPSHOT</version>
+ <name>HornetQ RAR JAR</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ <version>1.5.0.GA</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: trunk/hornetq-ra/hornetq-ra-rar/pom.xml
===================================================================
--- trunk/hornetq-ra/hornetq-ra-rar/pom.xml (rev 0)
+++ trunk/hornetq-ra/hornetq-ra-rar/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -0,0 +1,83 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-rar</artifactId>
+ <packaging>rar</packaging>
+ <version>2.2.3-SNAPSHOT</version>
+ <name>HornetQ JMS RA</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms-client</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjts</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-ra</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core-client</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.2.3.Final</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-rar-plugin</artifactId>
+ <configuration>
+ <raXmlFile>src/main/resources/ra.xml</raXmlFile>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Copied: trunk/hornetq-ra/hornetq-ra-rar/src/main/resources/ra.xml (from rev 10460, trunk/src/config/ra.xml)
===================================================================
--- trunk/hornetq-ra/hornetq-ra-rar/src/main/resources/ra.xml (rev 0)
+++ trunk/hornetq-ra/hornetq-ra-rar/src/main/resources/ra.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ version="1.5">
+
+ <description>HornetQ 2.0 Resource Adapter</description>
+ <display-name>HornetQ 2.0 Resource Adapter</display-name>
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>JMS 1.1 Server</eis-type>
+ <resourceadapter-version>1.0</resourceadapter-version>
+
+ <license>
+ <description>
+Copyright 2009 Red Hat, Inc.
+ Red Hat licenses this file to you under the Apache License, version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied. See the License for the specific language governing
+ permissions and limitations under the License.
+ </description>
+ <license-required>true</license-required>
+ </license>
+
+ <resourceadapter>
+ <resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>
+ The transport type. Multiple connectors can be configured by using a comma separated list,
+ i.e. org.hornetq.core.remoting.impl.invm.InVMConnectorFactory,org.hornetq.core.remoting.impl.invm.InVMConnectorFactory.
+ </description>
+ <config-property-name>ConnectorClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the form of key=val;key=val;,
+ if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.
+ Each set of params maps to the connector classname specified.
+ </description>
+ <config-property-name>ConnectionParameters</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>server-id=0</config-property-value>
+ </config-property>
+ <!--
+ <config-property>
+ <description>Does we support HA</description>
+ <config-property-name>HA</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>false</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The method to use for locating the transactionmanager</description>
+ <config-property-name>TransactionManagerLocatorMethod</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>getTm</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Use A local Transaction instead of XA?</description>
+ <config-property-name>UseLocalTx</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>false</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The user name used to login to the JMS server</description>
+ <config-property-name>UserName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The password used to login to the JMS server</description>
+ <config-property-name>Password</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The discovery group address</description>
+ <config-property-name>DiscoveryAddress</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The discovery group port</description>
+ <config-property-name>DiscoveryPort</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The discovery refresh timeout</description>
+ <config-property-name>DiscoveryRefreshTimeout</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The discovery initial wait timeout</description>
+ <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The load balancing policy class name</description>
+ <config-property-name>LoadBalancingPolicyClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The client failure check period</description>
+ <config-property-name>ClientFailureCheckPeriod</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The connection TTL</description>
+ <config-property-name>ConnectionTTL</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The call timeout</description>
+ <config-property-name>CallTimeout</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The dups ok batch size</description>
+ <config-property-name>DupsOKBatchSize</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transaction batch size</description>
+ <config-property-name>TransactionBatchSize</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The consumer window size</description>
+ <config-property-name>ConsumerWindowSize</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The consumer max rate</description>
+ <config-property-name>ConsumerMaxRate</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The confirmation window size</description>
+ <config-property-name>ConfirmationWindowSize</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The producer max rate</description>
+ <config-property-name>ProducerMaxRate</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The min large message size</description>
+ <config-property-name>MinLargeMessageSize</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The block on acknowledge</description>
+ <config-property-name>BlockOnAcknowledge</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The block on non durable send</description>
+ <config-property-name>BlockOnNonDurableSend</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The block on durable send</description>
+ <config-property-name>BlockOnDurableSend</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The auto group</description>
+ <config-property-name>AutoGroup</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The max connections</description>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The pre acknowledge</description>
+ <config-property-name>PreAcknowledge</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The retry interval</description>
+ <config-property-name>RetryInterval</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The retry interval multiplier</description>
+ <config-property-name>RetryIntervalMultiplier</config-property-name>
+ <config-property-type>java.lang.Double</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The client id</description>
+ <config-property-name>ClientID</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>-->
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
+
+ <config-property>
+ <description>The default session type</description>
+ <config-property-name>SessionDefaultType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>javax.jms.Queue</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
+ <config-property-name>UseTryLock</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
+
+ <connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism>
+ <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+ <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
+ <required-config-property>
+ <config-property-name>destination</config-property-name>
+ </required-config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+
+ </resourceadapter>
+</connector>
Added: trunk/hornetq-ra/pom.xml
===================================================================
--- trunk/hornetq-ra/pom.xml (rev 0)
+++ trunk/hornetq-ra/pom.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -0,0 +1,26 @@
+<project>
+ <name>HornetQ RAR POM</name>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-rar-pom</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>hornetq-ra-jar</module>
+ <module>hornetq-ra-rar</module>
+ </modules>
+</project>
Modified: trunk/hornetq.iml
===================================================================
--- trunk/hornetq.iml 2011-04-08 04:47:49 UTC (rev 10465)
+++ trunk/hornetq.iml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -14,6 +14,7 @@
<sourceFolder url="file://$MODULE_DIR$/hornetq-spring-integration/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-jms/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-service-sar/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/hornetq-ra/hornetq-ra-jar/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build/api" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/jars" />
Deleted: trunk/src/config/ra.xml
===================================================================
--- trunk/src/config/ra.xml 2011-04-08 04:47:49 UTC (rev 10465)
+++ trunk/src/config/ra.xml 2011-04-08 07:26:27 UTC (rev 10466)
@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->
-
-<connector xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- version="1.5">
-
- <description>HornetQ 2.0 Resource Adapter</description>
- <display-name>HornetQ 2.0 Resource Adapter</display-name>
-
- <vendor-name>Red Hat Middleware LLC</vendor-name>
- <eis-type>JMS 1.1 Server</eis-type>
- <resourceadapter-version>1.0</resourceadapter-version>
-
- <license>
- <description>
-Copyright 2009 Red Hat, Inc.
- Red Hat licenses this file to you under the Apache License, version
- 2.0 (the "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
- </description>
- <license-required>true</license-required>
- </license>
-
- <resourceadapter>
- <resourceadapter-class>org.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
- <config-property>
- <description>
- The transport type. Multiple connectors can be configured by using a comma separated list,
- i.e. org.hornetq.core.remoting.impl.invm.InVMConnectorFactory,org.hornetq.core.remoting.impl.invm.InVMConnectorFactory.
- </description>
- <config-property-name>ConnectorClassName</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
- </config-property>
- <config-property>
- <description>The transport configuration. These values must be in the form of key=val;key=val;,
- if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.
- Each set of params maps to the connector classname specified.
- </description>
- <config-property-name>ConnectionParameters</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>server-id=0</config-property-value>
- </config-property>
- <!--
- <config-property>
- <description>Does we support HA</description>
- <config-property-name>HA</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>false</config-property-value>
- </config-property>
- <config-property>
- <description>The method to use for locating the transactionmanager</description>
- <config-property-name>TransactionManagerLocatorMethod</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>getTm</config-property-value>
- </config-property>
- <config-property>
- <description>Use A local Transaction instead of XA?</description>
- <config-property-name>UseLocalTx</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>false</config-property-value>
- </config-property>
- <config-property>
- <description>The user name used to login to the JMS server</description>
- <config-property-name>UserName</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The password used to login to the JMS server</description>
- <config-property-name>Password</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The discovery group address</description>
- <config-property-name>DiscoveryAddress</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The discovery group port</description>
- <config-property-name>DiscoveryPort</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The discovery refresh timeout</description>
- <config-property-name>DiscoveryRefreshTimeout</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The discovery initial wait timeout</description>
- <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The load balancing policy class name</description>
- <config-property-name>LoadBalancingPolicyClassName</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The client failure check period</description>
- <config-property-name>ClientFailureCheckPeriod</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The connection TTL</description>
- <config-property-name>ConnectionTTL</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The call timeout</description>
- <config-property-name>CallTimeout</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The dups ok batch size</description>
- <config-property-name>DupsOKBatchSize</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The transaction batch size</description>
- <config-property-name>TransactionBatchSize</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The consumer window size</description>
- <config-property-name>ConsumerWindowSize</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The consumer max rate</description>
- <config-property-name>ConsumerMaxRate</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The confirmation window size</description>
- <config-property-name>ConfirmationWindowSize</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The producer max rate</description>
- <config-property-name>ProducerMaxRate</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The min large message size</description>
- <config-property-name>MinLargeMessageSize</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The block on acknowledge</description>
- <config-property-name>BlockOnAcknowledge</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The block on non durable send</description>
- <config-property-name>BlockOnNonDurableSend</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The block on durable send</description>
- <config-property-name>BlockOnDurableSend</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The auto group</description>
- <config-property-name>AutoGroup</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The max connections</description>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The pre acknowledge</description>
- <config-property-name>PreAcknowledge</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The retry interval</description>
- <config-property-name>RetryInterval</config-property-name>
- <config-property-type>java.lang.Long</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The retry interval multiplier</description>
- <config-property-name>RetryIntervalMultiplier</config-property-name>
- <config-property-type>java.lang.Double</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The client id</description>
- <config-property-name>ClientID</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>-->
-
- <outbound-resourceadapter>
- <connection-definition>
- <managedconnectionfactory-class>org.hornetq.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
-
- <config-property>
- <description>The default session type</description>
- <config-property-name>SessionDefaultType</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>javax.jms.Queue</config-property-value>
- </config-property>
- <config-property>
- <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
- <config-property-name>UseTryLock</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value>0</config-property-value>
- </config-property>
-
- <connectionfactory-interface>org.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
- <connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
- <connection-interface>javax.jms.Session</connection-interface>
- <connection-impl-class>org.hornetq.ra.HornetQRASession</connection-impl-class>
- </connection-definition>
- <transaction-support>XATransaction</transaction-support>
- <authentication-mechanism>
- <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
- <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
- </authentication-mechanism>
- <reauthentication-support>false</reauthentication-support>
- </outbound-resourceadapter>
-
- <inbound-resourceadapter>
- <messageadapter>
- <messagelistener>
- <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
- <activationspec>
- <activationspec-class>org.hornetq.ra.inflow.HornetQActivationSpec</activationspec-class>
- <required-config-property>
- <config-property-name>destination</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- </messageadapter>
- </inbound-resourceadapter>
-
- </resourceadapter>
-</connector>
13 years, 8 months
JBoss hornetq SVN: r10465 - in branches/Branch_2_2_EAP: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-08 00:47:49 -0400 (Fri, 08 Apr 2011)
New Revision: 10465
Added:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
Log:
https://issues.jboss.org/browse/JBPAPP-6273 - fix for ack of prepared scheduled messages
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-08 04:39:58 UTC (rev 10464)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-08 04:47:49 UTC (rev 10465)
@@ -1142,6 +1142,8 @@
continue;
}
+
+ queue.pause();
Collection<AddMessageRecord> valueRecords = queueRecords.values();
@@ -1225,6 +1227,11 @@
{
messageJournal.perfBlast(perfBlastPages);
}
+
+ for (Queue queue : queues.values())
+ {
+ queue.resume();
+ }
if (System.getProperty("org.hornetq.opt.directblast") != null)
{
Added: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java (rev 0)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionWithDiscoveryTest.java 2011-04-08 04:47:49 UTC (rev 10465)
@@ -0,0 +1,206 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.integration.cluster.distribution;
+
+import java.util.ArrayList;
+
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.settings.impl.AddressSettings;
+
+/**
+ * A MessageRedistributionWithDiscoveryTest
+ *
+ * @author clebertsuconic
+ *
+ *
+ */
+public class MessageRedistributionWithDiscoveryTest extends ClusterTestBase
+{
+ private static final Logger log = Logger.getLogger(SymmetricClusterWithDiscoveryTest.class);
+
+ protected static final String groupAddress = getUDPDiscoveryAddress();
+
+ protected static final int groupPort = getUDPDiscoveryPort();
+
+ protected boolean isNetty()
+ {
+ return false;
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ setupCluster();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ for (int i = 0; i < servers.length; i++)
+ {
+ if (servers[i] != null)
+ {
+ servers[i].stop();
+ servers[i] = null;
+ }
+ }
+ super.tearDown();
+ }
+
+ protected void setupCluster() throws Exception
+ {
+ setupCluster(false);
+ }
+
+ protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ setServer(forwardWhenNoConsumers, i);
+ }
+ }
+
+ /**
+ * @param forwardWhenNoConsumers
+ */
+ protected void setServer(final boolean forwardWhenNoConsumers, int server)
+ {
+ setupLiveServerWithDiscovery(server,
+ SymmetricClusterWithDiscoveryTest.groupAddress,
+ SymmetricClusterWithDiscoveryTest.groupPort,
+ isFileStorage(),
+ isNetty(),
+ false);
+
+ AddressSettings setting = new AddressSettings();
+ setting.setRedeliveryDelay(0);
+ setting.setRedistributionDelay(0);
+
+ servers[server].getAddressSettingsRepository().addMatch("#", setting);
+
+ setupDiscoveryClusterConnection("cluster" + server, server, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+ }
+
+ public void testRedistributeWithPreparedAndRestart() throws Exception
+ {
+ startServers(0);
+
+ setupSessionFactory(0, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, true);
+
+ ClientSession session0 = sfs[0].createSession(false, false, false);
+
+ ClientProducer prod0 = session0.createProducer("queues.testaddress");
+
+ for (int i = 0; i < 100; i++)
+ {
+ ClientMessage msg = session0.createMessage(true);
+
+ msg.putIntProperty("key", i);
+
+ prod0.send(msg);
+
+ session0.commit();
+ }
+
+ session0.close();
+
+ session0 = sfs[0].createSession(true, false, false);
+
+ ClientConsumer consumer0 = session0.createConsumer("queue0");
+
+ session0.start();
+
+ ArrayList<Xid> xids = new ArrayList<Xid>();
+
+ for (int i = 0; i < 100; i++)
+ {
+ Xid xid = newXID();
+
+ session0.start(xid, XAResource.TMNOFLAGS);
+
+ ClientMessage msg = consumer0.receive(5000);
+
+ msg.acknowledge();
+
+ session0.end(xid, XAResource.TMSUCCESS);
+
+ session0.prepare(xid);
+
+ xids.add(xid);
+ }
+
+ session0.close();
+
+ sfs[0].close();
+ sfs[0] = null;
+
+ servers[0].stop();
+ servers[0] = null;
+
+ setServer(false, 0);
+
+ startServers(1, 2);
+
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ ClientSession session1 = sfs[1].createSession(false, false);
+
+ createQueue(1, "queues.testaddress", "queue0", null, true);
+ createQueue(2, "queues.testaddress", "queue0", null, true);
+
+ session1.start();
+ ClientConsumer consumer1 = session1.createConsumer("queue0");
+
+ startServers(0);
+
+ setupSessionFactory(0, isNetty());
+
+ waitForBindings(0, "queues.testaddress", 1, 0, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 1, false);
+
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 0, true);
+
+ waitForBindings(1, "queues.testaddress", 2, 0, false);
+ waitForBindings(2, "queues.testaddress", 2, 1, false);
+
+ session0 = sfs[0].createSession(true, false, false);
+
+ for (Xid xid : xids)
+ {
+ session0.rollback(xid);
+ }
+
+ for (int i = 0; i < 100; i++)
+ {
+ ClientMessage msg = consumer1.receive(15000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ }
+
+ session1.commit();
+
+ }
+
+}
13 years, 8 months
JBoss hornetq SVN: r10464 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-08 00:39:58 -0400 (Fri, 08 Apr 2011)
New Revision: 10464
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
Log:
just fixing a typo on logs
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-04-07 22:04:34 UTC (rev 10463)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2011-04-08 04:39:58 UTC (rev 10464)
@@ -749,7 +749,7 @@
if(clusterConnections.containsKey(config.getName()))
{
- log.warn("Clustwer Configuration '" + config.getConnectorName() + "' already exists. The cluster connection will not be deployed.");
+ log.warn("Cluster Configuration '" + config.getConnectorName() + "' already exists. The cluster connection will not be deployed.", new Exception ("trace"));
return;
}
13 years, 8 months
JBoss hornetq SVN: r10463 - in branches/Branch_2_2_EAP: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-04-07 18:04:34 -0400 (Thu, 07 Apr 2011)
New Revision: 10463
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionTest.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java
Log:
https://issues.jboss.org/browse/JBPAPP-6273 - Scheduled Messages Issue
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-07 18:52:30 UTC (rev 10462)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-04-07 22:04:34 UTC (rev 10463)
@@ -1144,10 +1144,18 @@
}
Collection<AddMessageRecord> valueRecords = queueRecords.values();
+
+ long currentTime = System.currentTimeMillis();
for (AddMessageRecord record : valueRecords)
{
long scheduledDeliveryTime = record.scheduledDeliveryTime;
+
+ if (scheduledDeliveryTime != 0 && scheduledDeliveryTime <= currentTime)
+ {
+ scheduledDeliveryTime = 0;
+ record.message.removeProperty(Message.HDR_SCHEDULED_DELIVERY_TIME);
+ }
if (scheduledDeliveryTime != 0)
{
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionTest.java 2011-04-07 18:52:30 UTC (rev 10462)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/distribution/MessageRedistributionTest.java 2011-04-07 22:04:34 UTC (rev 10463)
@@ -13,7 +13,18 @@
package org.hornetq.tests.integration.cluster.distribution;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
import org.hornetq.core.logging.Logger;
+import org.hornetq.core.message.impl.MessageImpl;
import org.hornetq.core.server.cluster.ClusterConnection;
import org.hornetq.core.server.cluster.MessageFlowRecord;
import org.hornetq.core.server.cluster.impl.ClusterConnectionImpl;
@@ -333,6 +344,118 @@
verifyReceiveAll(20, 1);
}
+ public void testRedistributeWithScheduling() throws Exception
+ {
+ setupCluster(false);
+
+ AddressSettings setting = new AddressSettings();
+ setting.setRedeliveryDelay(10000);
+ servers[0].getAddressSettingsRepository().addMatch("queues.testaddress", setting);
+ servers[0].getAddressSettingsRepository().addMatch("queue0", setting);
+ servers[1].getAddressSettingsRepository().addMatch("queue0", setting);
+ servers[1].getAddressSettingsRepository().addMatch("queues.testaddress", setting);
+
+ startServers(0);
+
+ setupSessionFactory(0, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+
+ ClientSession session0 = sfs[0].createSession(false, false, false);
+
+ ClientProducer prod0 = session0.createProducer("queues.testaddress");
+
+ for (int i = 0 ; i < 100; i++)
+ {
+ ClientMessage msg = session0.createMessage(true);
+ msg.putIntProperty("key", i);
+
+ byte[] bytes = new byte[24];
+
+ ByteBuffer bb = ByteBuffer.wrap(bytes);
+
+ bb.putLong((long)i);
+
+ msg.putBytesProperty(MessageImpl.HDR_BRIDGE_DUPLICATE_ID, bytes);
+
+ prod0.send(msg);
+
+ session0.commit();
+ }
+
+ session0.close();
+
+ session0 = sfs[0].createSession(true, false, false);
+
+ ClientConsumer consumer0 = session0.createConsumer("queue0");
+
+ session0.start();
+
+ ArrayList<Xid> xids = new ArrayList<Xid>();
+
+ for (int i = 0 ; i < 100; i++)
+ {
+ Xid xid = newXID();
+
+ session0.start(xid, XAResource.TMNOFLAGS);
+
+ ClientMessage msg = consumer0.receive(5000);
+
+ msg.acknowledge();
+
+ session0.end(xid, XAResource.TMSUCCESS);
+
+ session0.prepare(xid);
+
+ xids.add(xid);
+ }
+
+ session0.close();
+
+ sfs[0].close();
+ sfs[0] = null;
+
+
+ startServers(0, 1, 2);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+
+ ClientSession session1 = sfs[1].createSession(false, false);
+ session1.start();
+ ClientConsumer consumer1 = session1.createConsumer("queue0");
+
+ waitForBindings(0, "queues.testaddress", 1, 0, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 0, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 1, false);
+ waitForBindings(1, "queues.testaddress", 2, 0, false);
+ waitForBindings(2, "queues.testaddress", 2, 1, false);
+
+ session0 = sfs[0].createSession(true, false, false);
+
+ for (Xid xid: xids)
+ {
+ session0.rollback(xid);
+ }
+
+
+ for (int i = 0 ; i < 100; i++)
+ {
+ ClientMessage msg = consumer1.receive(15000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ }
+
+ session1.commit();
+
+ }
+
public void testRedistributionWhenConsumerIsClosedQueuesWithFilters() throws Exception
{
setupCluster(false);
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java 2011-04-07 18:52:30 UTC (rev 10462)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/scheduling/ScheduledMessageTest.java 2011-04-07 22:04:34 UTC (rev 10463)
@@ -12,6 +12,9 @@
*/
package org.hornetq.tests.integration.scheduling;
+import java.util.ArrayList;
+import java.util.concurrent.atomic.AtomicInteger;
+
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
@@ -32,6 +35,7 @@
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * @author <a href="mailto:clebert.suconic">Clebert Suconic</a>
*/
public class ScheduledMessageTest extends ServiceTestBase
{
@@ -52,6 +56,14 @@
{
super.setUp();
clearData();
+ startServer();
+ }
+
+ /**
+ * @throws Exception
+ */
+ protected void startServer() throws Exception
+ {
configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
configuration.setJournalMinFiles(2);
@@ -64,7 +76,7 @@
protected void tearDown() throws Exception
{
locator.close();
-
+
if (server != null)
{
try
@@ -282,10 +294,10 @@
session.createQueue(atestq, atestq, null, true);
ClientProducer producer = session.createProducer(atestq);
ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
- false,
- 0,
- System.currentTimeMillis(),
- (byte)1);
+ false,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
message.getBodyBuffer().writeString("testINVMCoreClient");
message.setDurable(true);
long time = System.currentTimeMillis();
@@ -484,6 +496,47 @@
session.close();
}
+
+ public void testManyMessagesSameTime() throws Exception
+ {
+
+ ClientSessionFactory sessionFactory = locator.createSessionFactory();
+ ClientSession session = sessionFactory.createSession(false, false, false);
+ session.createQueue(atestq, atestq, null, true);
+ ClientProducer producer = session.createProducer(atestq);
+ long time = System.currentTimeMillis();
+ time += 1000;
+
+ for (int i = 0; i < 1000; i++)
+ {
+ ClientMessage message = session.createMessage(true);
+ message.putIntProperty("value", i);
+ message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, time);
+ producer.send(message);
+ }
+
+ session.commit();
+
+
+ session.start();
+ ClientConsumer consumer = session.createConsumer(atestq);
+
+ for (int i = 0 ; i < 1000; i++)
+ {
+ ClientMessage message = consumer.receive(15000);
+ assertNotNull(message);
+ message.acknowledge();
+
+ assertEquals(i, message.getIntProperty("value").intValue());
+ }
+
+ session.commit();
+
+ Assert.assertNull(consumer.receiveImmediate());
+
+ session.close();
+ }
+
public void testScheduledAndNormalMessagesDeliveredCorrectly(final boolean recover) throws Exception
{
@@ -607,7 +660,76 @@
Assert.assertNull(consumer.receiveImmediate());
session.close();
}
+
+
+ public void testPendingACKOnPrepared() throws Exception
+ {
+
+ int NUMBER_OF_MESSAGES = 100;
+
+ ClientSessionFactory sessionFactory = locator.createSessionFactory();
+ ClientSession session = sessionFactory.createSession(true, false, false);
+ session.createQueue(atestq, atestq, null, true);
+ ClientProducer producer = session.createProducer(atestq);
+
+ long scheduled = System.currentTimeMillis() + 1000;
+ for (int i = 0 ; i < NUMBER_OF_MESSAGES; i++)
+ {
+ ClientMessage msg = session.createMessage(true);
+ msg.putIntProperty("value", i);
+ msg.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, scheduled);
+ producer.send(msg);
+ }
+
+ session.close();
+
+
+ for (int i = 0 ; i < NUMBER_OF_MESSAGES; i++)
+ {
+ Xid xid = newXID();
+
+ session = sessionFactory.createSession(true, false, false);
+
+ ClientConsumer consumer = session.createConsumer(atestq);
+
+ session.start();
+
+ session.start(xid, XAResource.TMNOFLAGS);
+
+ ClientMessage msg = consumer.receive(5000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ session.end(xid, XAResource.TMSUCCESS);
+
+ session.prepare(xid);
+
+ session.close();
+ }
+
+ sessionFactory.close();
+ locator.close();
+
+ server.stop();
+
+ startServer();
+
+ sessionFactory = locator.createSessionFactory();
+
+ session = sessionFactory.createSession(false, false);
+
+ ClientConsumer consumer = session.createConsumer(atestq);
+
+ session.start();
+
+ assertNull(consumer.receive(1000));
+
+ session.close();
+
+ sessionFactory.close();
+
+ }
+
public void testScheduledDeliveryTX() throws Exception
{
scheduledDelivery(true);
@@ -618,6 +740,116 @@
scheduledDelivery(false);
}
+ public void testRedeliveryAfterPrepare() throws Exception
+ {
+ AddressSettings qs = new AddressSettings();
+ qs.setRedeliveryDelay(5000l);
+ server.getAddressSettingsRepository().addMatch(atestq.toString(), qs);
+
+ ClientSessionFactory sessionFactory = locator.createSessionFactory();
+ ClientSession session = sessionFactory.createSession(false, false, false);
+
+ session.createQueue(atestq, atestq, true);
+
+ ClientProducer producer = session.createProducer(atestq);
+ for (int i = 0; i < 100; i++)
+ {
+ ClientMessage msg = session.createMessage(true);
+ msg.putIntProperty("key", i);
+ producer.send(msg);
+ session.commit();
+ }
+
+ session.close();
+
+ session = sessionFactory.createSession(true, false, false);
+
+ ClientConsumer consumer = session.createConsumer(atestq);
+
+ ArrayList<Xid> xids = new ArrayList<Xid>();
+
+ session.start();
+
+ for (int i = 0; i < 100; i++)
+ {
+ Xid xid = newXID();
+ session.start(xid, XAResource.TMNOFLAGS);
+ ClientMessage msg = consumer.receive(5000);
+ assertNotNull(msg);
+ msg.acknowledge();
+ session.end(xid, XAResource.TMSUCCESS);
+ session.prepare(xid);
+ xids.add(xid);
+ }
+
+ session.rollback(xids.get(0));
+ xids.set(0, null);
+ session.close();
+
+ server.stop();
+
+ configuration = createDefaultConfig();
+ configuration.setSecurityEnabled(false);
+ configuration.setJournalMinFiles(2);
+ configuration.getAddressesSettings().put(atestq.toString(), qs);
+
+ server = createServer(true, configuration);
+ server.start();
+
+ locator = createInVMNonHALocator();
+
+ final AtomicInteger count = new AtomicInteger(0);
+ Thread t = new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ ClientSessionFactory sf = locator.createSessionFactory();
+ ClientSession session = sf.createSession(false, false);
+ session.start();
+ ClientConsumer cons = session.createConsumer(atestq);
+ for (int i = 0; i < 100; i++)
+ {
+ ClientMessage msg = cons.receive(100000);
+ assertNotNull(msg);
+ System.out.println("Received message " + msg);
+ count.incrementAndGet();
+ msg.acknowledge();
+ session.commit();
+ }
+ session.close();
+ sf.close();
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ count.set(-1);
+ }
+ }
+ };
+
+ t.start();
+
+ sessionFactory = locator.createSessionFactory();
+
+ session = sessionFactory.createSession(true, false, false);
+
+ for (Xid xid : xids)
+ {
+ if (xid != null)
+ {
+ session.rollback(xid);
+ }
+ }
+
+ session.close();
+
+ t.join();
+
+ assertEquals(100, count.get());
+ }
+
// Private -------------------------------------------------------
private void scheduledDelivery(final boolean tx) throws Exception
@@ -770,10 +1002,10 @@
private ClientMessage createDurableMessage(final ClientSession session, final String body)
{
ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
- true,
- 0,
- System.currentTimeMillis(),
- (byte)1);
+ true,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
message.getBodyBuffer().writeString(body);
return message;
}
13 years, 8 months
JBoss hornetq SVN: r10462 - in trunk: hornetq-service-sar and 6 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-07 14:52:30 -0400 (Thu, 07 Apr 2011)
New Revision: 10462
Added:
trunk/hornetq-service-sar/
trunk/hornetq-service-sar/pom.xml
trunk/hornetq-service-sar/src/
trunk/hornetq-service-sar/src/main/
trunk/hornetq-service-sar/src/main/java/
trunk/hornetq-service-sar/src/main/java/org/
trunk/hornetq-service-sar/src/main/java/org/hornetq/
trunk/hornetq-service-sar/src/main/java/org/hornetq/service/
Removed:
trunk/src/main/org/hornetq/service/
Modified:
trunk/build-hornetq.xml
trunk/hornetq.iml
Log:
mavenized hornetq service
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2011-04-07 18:30:50 UTC (rev 10461)
+++ trunk/build-hornetq.xml 2011-04-07 18:52:30 UTC (rev 10462)
@@ -102,6 +102,7 @@
<property name="hornetq.integration.as.module.jar" value="hornetq-jboss-as-integration"/>
<property name="hornetq.bootstrap.module.jar" value="hornetq-bootstrap"/>
<property name="hornetq.twitter.module.jar" value="hornetq-twitter-integration"/>
+ <property name="hornetq.service.module.jar" value="hornetq-service-sar"/>
<property name="target.core.jar.dir" value="${hornetq.core.module.jar}/target"/>
<property name="target.jms.jar.dir" value="${hornetq.jms.module.jar}/target"/>
<property name="target.jms.client.jar.dir" value="${hornetq.jms.client.module.jar}/target"/>
@@ -110,6 +111,7 @@
<property name="target.integration.as.jar.dir" value="${hornetq.integration.as.module.jar}/target"/>
<property name="target.bootstrap.jar.dir" value="${hornetq.bootstrap.module.jar}/target"/>
<property name="target.twitter.jar.dir" value="${hornetq.twitter.module.jar}/target"/>
+ <property name="target.service.jar.dir" value="${hornetq.service.module.jar}/target"/>
<property name="build.core.client.java5.classes.dir" value="${build.dir}/classes/core-client-java5"/>
<property name="build.jms.classes.dir" value="${build.dir}/classes/jms"/>
<property name="build.jms.java5.classes.dir" value="${build.dir}/classes/jms-java5"/>
@@ -615,25 +617,7 @@
</target>
<!-- author: Lucas Amador -->
- <target name="compile-jboss-service" depends="compile-core">
- <javac destdir="${build.service.classes.dir}"
- target="${javac.target}"
- source="${javac.source}"
- optimize="${javac.optimize}"
- debug="${javac.debug}"
- depend="${javac.depend}"
- verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
- includeAntRuntime="${javac.include.ant.runtime}"
- includeJavaRuntime="${javac.include.java.runtime}"
- encoding="${javac.encoding}"
- failonerror="${javac.fail.onerror}">
- <src>
- <pathelement path="${src.main.dir}"/>
- </src>
- <include name="org/hornetq/service/**/*.java"/>
- <classpath refid="jboss.service.compilation.classpath"/>
- </javac>
+ <target name="compile-jboss-service" depends="jar-jboss-service">
</target>
<target name="compile-bootstrap" depends="jar-bootstrap">
@@ -890,12 +874,12 @@
</target>
<!-- author: Lucas Amador -->
- <target name="jar-jboss-service" depends="compile-jboss-service">
-
- <jar jarfile="${build.jars.dir}/${service.sar.name}">
- <fileset dir="${build.service.classes.dir}" includes="**"/>
- </jar>
-
+ <target name="jar-jboss-service" depends="jar-core">
+ <ant antfile="build-thirdparty.xml" target="maven-install">
+ <property name="maven.opts" value="-Dmaven.test.skip=true"/>
+ <property name="maven.goal" value="install"/>
+ <property name="working.dir" value="hornetq-service-sar"/>
+ </ant>
</target>
<target name="jar-jboss-service-sources">
@@ -1162,15 +1146,11 @@
</copy>
<copy todir="${build.distro.lib.dir}">
<fileset dir="${build.jars.dir}">
- <include name="${jms.jar.name}"/>
- <include name="${service.sar.name}"/>
<include name="${mc.jar.name}"/>
<include name="${ra.rar.name}"/>
<include name="${core.client.java5.jar.name}"/>
- <include name="${jms.client.jar.name}"/>
<include name="${jms.client.java5.jar.name}"/>
<include name="${jnp.client.jar.name}"/>
- <include name="${spring.integration.jar.name}"/>
</fileset>
<fileset dir="${org.jboss.naming.lib}">
<include name="jnpserver.jar"/>
@@ -1187,6 +1167,7 @@
<copy file="${target.integration.as.jar.dir}/hornetq-jboss-as-integration-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-jboss-as-integration.jar"/>
<copy file="${target.bootstrap.jar.dir}/hornetq-bootstrap-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-bootstrap.jar"/>
<copy file="${target.twitter.jar.dir}/hornetq-twitter-integration-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-twitter-integration.jar"/>
+ <copy file="${target.service.jar.dir}/hornetq-service-sar-2.2.3-SNAPSHOT.jar" tofile="${build.distro.lib.dir}/hornetq-service.jar"/>
<copy file="${org.jboss.netty.lib}/${netty.jar.name}" tofile="${build.distro.lib.dir}/netty.jar"/>
<copy file="${org.twitter4j.lib}/${twitter4j.jar.name}" tofile="${build.distro.lib.dir}/${twitter4j.jar.name}"/>
<copy todir="${build.distro.config.dir}">
Added: trunk/hornetq-service-sar/pom.xml
===================================================================
--- trunk/hornetq-service-sar/pom.xml (rev 0)
+++ trunk/hornetq-service-sar/pom.xml 2011-04-07 18:52:30 UTC (rev 10462)
@@ -0,0 +1,48 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-service-sar</artifactId>
+ <packaging>jar</packaging>
+ <version>2.2.3-SNAPSHOT</version>
+ <name>HornetQ JBoss AS4 Integration</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jboss-as-integration</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Modified: trunk/hornetq.iml
===================================================================
--- trunk/hornetq.iml 2011-04-07 18:30:50 UTC (rev 10461)
+++ trunk/hornetq.iml 2011-04-07 18:52:30 UTC (rev 10462)
@@ -13,6 +13,7 @@
<sourceFolder url="file://$MODULE_DIR$/hornetq-twitter-integration/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-spring-integration/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/hornetq-jms/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/hornetq-service-sar/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/build/api" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/jars" />
13 years, 8 months
JBoss hornetq SVN: r10461 - trunk/src/main/org/hornetq.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-04-07 14:30:50 -0400 (Thu, 07 Apr 2011)
New Revision: 10461
Removed:
trunk/src/main/org/hornetq/api/
trunk/src/main/org/hornetq/core/
trunk/src/main/org/hornetq/integration/
trunk/src/main/org/hornetq/jms/
Log:
removed empty dirs
13 years, 8 months