JBoss hornetq SVN: r12315 - in branches/Branch_2_2_AS7: hornetq-rest and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-03-21 12:43:48 -0400 (Wed, 21 Mar 2012)
New Revision: 12315
Modified:
branches/Branch_2_2_AS7/build-maven.xml
branches/Branch_2_2_AS7/hornetq-rest/pom.xml
Log:
changing the version ids so hudson builds using it will not mess up with other builds
Modified: branches/Branch_2_2_AS7/build-maven.xml
===================================================================
--- branches/Branch_2_2_AS7/build-maven.xml 2012-03-19 20:18:19 UTC (rev 12314)
+++ branches/Branch_2_2_AS7/build-maven.xml 2012-03-21 16:43:48 UTC (rev 12315)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.13.Final"/>
+ <property name="hornetq.version" value="2.2.snapshot"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
Modified: branches/Branch_2_2_AS7/hornetq-rest/pom.xml
===================================================================
--- branches/Branch_2_2_AS7/hornetq-rest/pom.xml 2012-03-19 20:18:19 UTC (rev 12314)
+++ branches/Branch_2_2_AS7/hornetq-rest/pom.xml 2012-03-21 16:43:48 UTC (rev 12315)
@@ -10,7 +10,7 @@
<properties>
<resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.6.Final</hornetq.version>
+ <hornetq.version>2.2.snapshot</hornetq.version>
</properties>
<licenses>
12 years, 1 month
JBoss hornetq SVN: r12313 - in trunk: tests/integration-tests/src/test/java/org/hornetq/tests/integration/client and 7 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-19 07:45:00 -0400 (Mon, 19 Mar 2012)
New Revision: 12313
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingOrderTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/SessionTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/RemoteProcessHornetQServer.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/NIOBufferedJournalCompactTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java
Log:
Improve tearDown of tests leaving locators/server running, add messages to assertions to make failure reason clearer.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationManagerImpl.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -279,17 +279,13 @@
}
}
- /* (non-Javadoc)
- * @see org.hornetq.core.server.HornetQComponent#isStarted()
- */
+ @Override
public synchronized boolean isStarted()
{
return started;
}
- /* (non-Javadoc)
- * @see org.hornetq.core.server.HornetQComponent#start()
- */
+ @Override
public synchronized void start() throws Exception
{
if (started)
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingOrderTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingOrderTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingOrderTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -63,26 +63,6 @@
public class PagingOrderTest extends ServiceTestBase
{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public PagingOrderTest(final String name)
- {
- super(name);
- }
-
- public PagingOrderTest()
- {
- super();
- }
-
private static final int PAGE_MAX = 100 * 1024;
private static final int PAGE_SIZE = 10 * 1024;
@@ -218,8 +198,6 @@
final int numberOfMessages = 500;
- try
- {
ServerLocator locator = createInVMNonHALocator();
locator.setClientFailureCheckPeriod(1000);
@@ -349,31 +327,14 @@
assertNotNull(q2);
- assertEquals(numberOfMessages, q2.getMessageCount());
- assertEquals(numberOfMessages, q2.getMessagesAdded());
- assertEquals(0, q1.getMessageCount());
+ assertEquals("q2 msg count", numberOfMessages, q2.getMessageCount());
+ assertEquals("q2 msgs added", numberOfMessages, q2.getMessagesAdded());
+ assertEquals("q1 msg count", 0, q1.getMessageCount());
// 0, since nothing was sent to the queue after the server was restarted
- assertEquals(0, q1.getMessagesAdded());
+ assertEquals("q1 msgs added", 0, q1.getMessagesAdded());
}
- catch (Throwable e)
- {
- e.printStackTrace();
- throw e;
- }
- finally
- {
- try
- {
- server.stop();
- }
- catch (Throwable ignored)
- {
- }
- }
- }
-
public void testPageCounter2() throws Throwable
{
boolean persistentMessages = true;
@@ -390,8 +351,6 @@
final int numberOfMessages = 500;
- try
- {
ServerLocator locator = createInVMNonHALocator();
locator.setClientFailureCheckPeriod(1000);
@@ -489,24 +448,6 @@
assertEquals(numberOfMessages, q2.getMessagesAdded());
assertEquals(numberOfMessages - 100, q1.getMessageCount());
assertEquals(numberOfMessages, q2.getMessagesAdded());
-
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- throw e;
- }
- finally
- {
- try
- {
- server.stop();
- }
- catch (Throwable ignored)
- {
- }
- }
-
}
public void testOrderOverRollback() throws Throwable
@@ -525,8 +466,6 @@
final int numberOfMessages = 3000;
- try
- {
ServerLocator locator = createInVMNonHALocator();
locator.setClientFailureCheckPeriod(1000);
@@ -609,24 +548,6 @@
}
session.commit();
-
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- throw e;
- }
- finally
- {
- try
- {
- server.stop();
- }
- catch (Throwable ignored)
- {
- }
- }
-
}
public void testOrderOverRollback2() throws Throwable
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/SessionTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/SessionTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/SessionTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -116,7 +116,7 @@
}
}
- // Closing a session if the underlying remoting connection is deaad should cleanly
+ // Closing a session if the underlying remoting connection is dead should cleanly
// release all resources
public void testCloseSessionOnDestroyedConnection() throws Exception
{
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -111,12 +111,8 @@
clearData();
createConfigs();
-
-
liveServer.setIdentity(this.getClass().getSimpleName() + "/liveServer");
-
liveServer.start();
-
waitForServer(liveServer.getServer());
if (backupServer != null)
@@ -298,12 +294,12 @@
}
}
- /**
- * @param sessionFactory
- * @param seconds
- * @param waitForSync
- * @param actualServer
- */
+ /**
+ * @param sessionFactory
+ * @param seconds
+ * @param waitForSync
+ * @param backup
+ */
public static void waitForRemoteBackup(ClientSessionFactoryInternal sessionFactory,
int seconds,
boolean waitForSync,
@@ -321,8 +317,10 @@
}
if (System.currentTimeMillis() > (time + toWait))
{
- fail("backup server never started (" + actualServer.isStarted() + "), or never finished synchronizing (" +
- actualServer.isRemoteBackupUpToDate() + ")");
+ fail("backup never started (" + actualServer.isStarted() + "), or never finished synchronizing (" +
+ actualServer.isRemoteBackupUpToDate() + "), or sessionFactory!=null ? " +
+ (sessionFactory != null) + " || sessionFactory.getBackupConnector()==" +
+ (sessionFactory != null ? sessionFactory.getBackupConnector() : "not-applicable"));
}
try
{
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -186,6 +186,7 @@
locator.addClusterTopologyListener(topListener);
sf = (ClientSessionFactoryInternal)locator.createSessionFactory();
+ addSessionFactory(sf);
boolean ok = countDownLatch.await(5, TimeUnit.SECONDS);
locator.removeClusterTopologyListener(topListener);
@@ -207,7 +208,7 @@
{
configs[i] = createTransportConfiguration(isNetty(), false, generateParams(nodes[i], isNetty()));
}
- return new ServerLocatorImpl(true, configs);
+ return addServerLocator(new ServerLocatorImpl(true, configs));
}
// Private -------------------------------------------------------
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -44,7 +44,6 @@
*/
public class PagingFailoverTest extends FailoverTestBase
{
-
// Constants -----------------------------------------------------
private static final SimpleString ADDRESS = new SimpleString("SimpleAddress");
@@ -71,15 +70,8 @@
@Override
protected void tearDown() throws Exception
{
- try
- {
- if (session != null)
- session.close();
- }
- finally
- {
- super.tearDown();
- }
+ addClientSession(session);
+ super.tearDown();
}
public void testPageFailBeforeConsume() throws Exception
@@ -134,12 +126,9 @@
if (failBeforeConsume)
{
crash(session);
- waitForBackup(sf, 60);
+ waitForBackup(null, 30);
}
-
-
-
session.close();
session = sf.createSession(!transacted, !transacted, 0);
@@ -192,7 +181,7 @@
Assert.assertEquals(i, result);
}
}
-
+
public void testExpireMessage() throws Exception
{
locator.setBlockOnNonDurableSend(true);
@@ -200,13 +189,10 @@
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator, 2);
- ClientSession session = sf.createSession(true, true, 0);
+ session = sf.createSession(true, true, 0);
- try
- {
+ session.createQueue(PagingFailoverTest.ADDRESS, PagingFailoverTest.ADDRESS, true);
- session.createQueue(PagingFailoverTest.ADDRESS, PagingFailoverTest.ADDRESS, true);
-
ClientProducer prod = session.createProducer(PagingFailoverTest.ADDRESS);
final int TOTAL_MESSAGES = 1000;
@@ -222,41 +208,20 @@
crash(session);
session.close();
-
+
Queue queue = backupServer.getServer().locateQueue(ADDRESS);
-
+
long timeout = System.currentTimeMillis() + 60000;
- System.out.println("Starting now");
+
while (timeout > System.currentTimeMillis() && queue.getPageSubscription().isPaging())
{
Thread.sleep(100);
// Simulating what would happen on expire
queue.expireReferences();
}
-
- try
- {
- assertFalse(queue.getPageSubscription().isPaging());
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- System.exit(-1);
- }
- }
- finally
- {
- try
- {
- session.close();
- }
- catch (Exception ignored)
- {
- }
-
- locator.close();
- }
+ assertFalse(queue.getPageSubscription().isPaging());
+
}
@@ -288,9 +253,4 @@
{
return new SameProcessHornetQServer(createServer(true, config));
}
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -117,31 +117,21 @@
@Override
protected void tearDown() throws Exception
{
+ closeAllSessionFactories();
+ closeAllServerLocatorsFactories();
for (TestableServer testableServer : servers.values())
{
try
{
- stopComponent(testableServer);
+ addServer(testableServer.getServer());
testableServer.destroy();
}
catch (Exception e)
{
- e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace();
}
}
servers.clear();
-
- try
- {
- if (sf != null)
- {
- sf.close();
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
super.tearDown();
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -192,6 +192,7 @@
@Override
protected void tearDown() throws Exception
{
+ closeServerLocator(locator);
for (TestableServer server : servers.values())
{
try
@@ -204,7 +205,6 @@
}
}
servers.clear();
- closeServerLocator(locator);
super.tearDown();
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/RemoteProcessHornetQServer.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/RemoteProcessHornetQServer.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/RemoteProcessHornetQServer.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -153,42 +153,18 @@
}
}
-
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
public void setStarted(boolean init)
{
started = true;
}
- /* (non-Javadoc)
- * @see org.hornetq.tests.integration.cluster.util.TestableServer#getServer()
- */
+ @Override
public HornetQServer getServer()
{
return null;
}
- /* (non-Javadoc)
- * @see org.hornetq.tests.integration.cluster.util.TestableServer#setIdentity(java.lang.String)
- */
+ @Override
public void setIdentity(String identity)
{
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -27,8 +27,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.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.core.server.HornetQServers;
@@ -40,26 +38,32 @@
*/
public class CoreClientOverHttpTest extends UnitTestCase
{
- public void testCoreHttpClient() throws Exception
+ private static final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue");
+ private Configuration conf;
+ private HornetQServer server;
+ private ServerLocator locator;
+
+ @Override
+ public void setUp() throws Exception
{
- final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue");
+ super.setUp();
+ conf = createDefaultConfig();
- Configuration conf = createDefaultConfig();
-
conf.setSecurityEnabled(false);
-
HashMap<String, Object> params = new HashMap<String, Object>();
params.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
- conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName(), params));
+ conf.getAcceptorConfigurations().add(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, params));
- HornetQServer server = HornetQServers.newHornetQServer(conf, false);
+ server = addServer(HornetQServers.newHornetQServer(conf, false));
server.start();
+ locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params));
+ addServerLocator(locator);
+ }
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(),
- params));
+ public void testCoreHttpClient() throws Exception
+ {
ClientSessionFactory sf = locator.createSessionFactory();
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false);
@@ -93,32 +97,12 @@
}
session.close();
-
- locator.close();
-
- server.stop();
}
public void testCoreHttpClientIdle() throws Exception
{
- final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue");
-
- Configuration conf = createDefaultConfig();
-
- conf.setSecurityEnabled(false);
-
- HashMap<String, Object> params = new HashMap<String, Object>();
- params.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
- conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName(), params));
-
- HornetQServer server = HornetQServers.newHornetQServer(conf, false);
-
- server.start();
-
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(),
- params));
locator.setConnectionTTL(500);
- ClientSessionFactory sf = locator.createSessionFactory();
+ ClientSessionFactory sf = createSessionFactory(locator);
ClientSession session = sf.createSession(false, true, true);
@@ -129,33 +113,12 @@
Thread.sleep(500 * 5);
session.close();
-
- locator.close();
-
- server.stop();
}
// https://issues.jboss.org/browse/JBPAPP-5542
public void testCoreHttpClient8kPlus() throws Exception
{
- final SimpleString QUEUE = new SimpleString("CoreClientOverHttpTestQueue");
-
- Configuration conf = createDefaultConfig();
-
- conf.setSecurityEnabled(false);
-
- HashMap<String, Object> params = new HashMap<String, Object>();
- params.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
- conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName(), params));
-
- HornetQServer server = HornetQServers.newHornetQServer(conf, false);
-
- server.start();
-
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(),
- params));
- ClientSessionFactory sf = locator.createSessionFactory();
-
+ ClientSessionFactory sf = createSessionFactory(locator);
ClientSession session = sf.createSession(false, true, true);
session.createQueue(QUEUE, QUEUE, null, false);
@@ -192,10 +155,6 @@
}
session.close();
-
- locator.close();
-
- server.stop();
}
private String getFixedSizeString(int size)
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -46,8 +46,6 @@
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.postoffice.QueueBinding;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.replication.ReplicationEndpoint;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -93,16 +91,16 @@
private static String toCSV(final Object[] objects)
{
- String str = "";
+ StringBuilder str = new StringBuilder();
for (int i = 0; i < objects.length; i++)
{
if (i > 0)
{
- str += ", ";
+ str.append(", ");
}
- str += objects[i];
+ str.append(objects[i]);
}
- return str;
+ return str.toString();
}
// Constructors --------------------------------------------------
@@ -405,8 +403,8 @@
checkResource(ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(topicName));
Topic topic = (Topic)context.lookup(topicJNDIBinding);
assertNotNull(topic);
- HornetQConnectionFactory cf = new HornetQConnectionFactory(false,
- new TransportConfiguration(InVMConnectorFactory.class.getName()));
+ HornetQConnectionFactory cf =
+ new HornetQConnectionFactory(false, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
Connection connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// create a consumer will create a Core queue bound to the topic address
@@ -722,12 +720,12 @@
conf.setJMXManagementEnabled(true);
conf.setPersistenceEnabled(true);
- conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName()));
+ conf.getAcceptorConfigurations().add(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY));
conf.getAcceptorConfigurations().add(new TransportConfiguration(INVM_ACCEPTOR_FACTORY));
- conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ conf.getConnectorConfigurations().put("netty", new TransportConfiguration(NETTY_CONNECTOR_FACTORY));
conf.getConnectorConfigurations().put("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
- server = HornetQServers.newHornetQServer(conf, mbeanServer, true);
+ server = addServer(HornetQServers.newHornetQServer(conf, mbeanServer, true));
serverManager = new JMSServerManagerImpl(server);
context = new InVMContext();
@@ -743,9 +741,14 @@
@Override
protected void tearDown() throws Exception
{
- stopServer();
-
- super.tearDown();
+ try
+ {
+ stopServer();
+ }
+ finally
+ {
+ super.tearDown();
+ }
}
/**
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/NIOBufferedJournalCompactTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/NIOBufferedJournalCompactTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/NIOBufferedJournalCompactTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -28,19 +28,6 @@
public class NIOBufferedJournalCompactTest extends NIOJournalCompactTest
{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
@Override
protected SequentialFileFactory getFileFactory() throws Exception
{
@@ -53,8 +40,4 @@
return new NIOSequentialFileFactory(getTestDir(), true);
}
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationOrderTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationOrderTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationOrderTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -26,8 +26,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.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.impl.invm.TransportConstants;
import org.hornetq.tests.integration.cluster.failover.FailoverTestBase;
import org.hornetq.tests.util.RandomUtil;
@@ -69,9 +67,10 @@
String address = RandomUtil.randomString();
String queue = RandomUtil.randomString();
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true));
+ addServerLocator(locator);
locator.setBlockOnNonDurableSend(false);
locator.setBlockOnDurableSend(false);
- ClientSessionFactory csf = locator.createSessionFactory();
+ ClientSessionFactory csf = createSessionFactory(locator);
ClientSession session = null;
if (transactional)
{
@@ -81,6 +80,7 @@
{
session = csf.createSession(true, true);
}
+ addClientSession(session);
session.createQueue(address, queue, true);
ClientProducer producer = session.createProducer(address);
boolean durable = false;
@@ -108,8 +108,8 @@
}
session.close();
- locator = HornetQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true));
- csf = locator.createSessionFactory();
+ locator = addServerLocator(HornetQClient.createServerLocatorWithoutHA(getConnectorTransportConfiguration(true)));
+ csf = createSessionFactory(locator);
session = csf.createSession(true, true);
session.start();
ClientConsumer consumer = session.createConsumer(queue);
@@ -135,13 +135,13 @@
@Override
protected TransportConfiguration getConnectorTransportConfiguration(final boolean live)
{
- return createTransportConfiguration(InVMConnectorFactory.class.getName(), live);
+ return createTransportConfiguration(INVM_CONNECTOR_FACTORY, live);
}
@Override
protected TransportConfiguration getAcceptorTransportConfiguration(final boolean live)
{
- return createTransportConfiguration(InVMAcceptorFactory.class.getName(), live);
+ return createTransportConfiguration(INVM_ACCEPTOR_FACTORY, live);
}
private static TransportConfiguration createTransportConfiguration(String name, final boolean live)
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -40,7 +40,6 @@
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.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.journal.EncodingSupport;
@@ -69,8 +68,8 @@
import org.hornetq.core.replication.impl.ReplicatedJournal;
import org.hornetq.core.replication.impl.ReplicationManagerImpl;
import org.hornetq.core.server.HornetQComponent;
+import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.ServerMessage;
-import org.hornetq.core.server.impl.HornetQServerImpl;
import org.hornetq.core.server.impl.ServerMessageImpl;
import org.hornetq.core.settings.HierarchicalRepository;
import org.hornetq.core.settings.impl.AddressSettings;
@@ -95,21 +94,16 @@
private ExecutorFactory factory;
private ScheduledExecutorService scheduledExecutor;
- private HornetQServerImpl backupServer;
+ private HornetQServer backupServer;
/** This field is not always used. */
- private HornetQServerImpl liveServer;
+ private HornetQServer liveServer;
private ServerLocator locator;
private ReplicationManager manager;
private static final SimpleString ADDRESS = new SimpleString("foobar123");
- // Static --------------------------------------------------------
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
private void setupServer(boolean backup, boolean netty, String... interceptors) throws Exception
{
@@ -131,13 +125,13 @@
liveConnector);
if (backup)
{
- liveServer = new HornetQServerImpl(liveConfig);
+ liveServer = createServer(liveConfig);
liveServer.start();
waitForComponent(liveServer);
}
- backupServer = new HornetQServerImpl(backupConfig);
- locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(INVM_CONNECTOR_FACTORY));
+ backupServer = createServer(backupConfig);
+ locator = createInVMNonHALocator();
backupServer.start();
if (backup)
{
@@ -173,16 +167,17 @@
public void testConnectIntoNonBackup() throws Exception
{
setupServer(false, false);
-
try
{
- manager = new ReplicationManagerImpl(locator.createSessionFactory().getConnection(), factory);
+ ClientSessionFactory sf = createSessionFactory(locator);
+ manager = new ReplicationManagerImpl(sf.getConnection(), factory);
+ addHornetQComponent(manager);
manager.start();
Assert.fail("Exception was expected");
}
catch (HornetQException expected)
{
- // expected
+ assertEquals(HornetQException.NOT_CONNECTED, expected.getCode());
}
}
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java 2012-03-16 15:24:14 UTC (rev 12312)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java 2012-03-19 11:45:00 UTC (rev 12313)
@@ -33,21 +33,18 @@
import org.hornetq.core.journal.impl.ExportJournal;
import org.hornetq.core.journal.impl.ImportJournal;
import org.hornetq.core.journal.impl.JournalImpl;
-import org.hornetq.core.logging.Logger;
import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.ReusableLatch;
/**
- *
+ *
* A JournalImplTestBase
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
public abstract class JournalImplTestBase extends UnitTestCase
{
- private static final Logger log = Logger.getLogger(JournalImplTestBase.class);
-
protected List<RecordInfo> records = new LinkedList<RecordInfo>();
protected TestableJournal journal;
@@ -70,9 +67,9 @@
protected SequentialFileFactory fileFactory;
- private ReusableLatch latchDone = new ReusableLatch(0);
+ private final ReusableLatch latchDone = new ReusableLatch(0);
- private ReusableLatch latchWait = new ReusableLatch(0);
+ private final ReusableLatch latchWait = new ReusableLatch(0);
private Thread compactThread;
@@ -93,16 +90,7 @@
@Override
protected void tearDown() throws Exception
{
- if (journal != null)
- {
- try
- {
- journal.stop();
- }
- catch (Exception ignore)
- {
- }
- }
+ stopComponent(journal);
if (fileFactory != null)
{
@@ -181,6 +169,7 @@
latchWait.setCount(1);
this.compactThread = new Thread()
{
+ @Override
public void run()
{
try
12 years, 1 month
JBoss hornetq SVN: r12312 - trunk/tests/integration-tests.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:24:14 -0400 (Fri, 16 Mar 2012)
New Revision: 12312
Modified:
trunk/tests/integration-tests/pom.xml
Log:
HORNETQ-720 Reenable replication tests
Modified: trunk/tests/integration-tests/pom.xml
===================================================================
--- trunk/tests/integration-tests/pom.xml 2012-03-16 15:24:07 UTC (rev 12311)
+++ trunk/tests/integration-tests/pom.xml 2012-03-16 15:24:14 UTC (rev 12312)
@@ -112,12 +112,6 @@
<excludes>
<exclude>**/ReplicatedJMSFailoverTest.java</exclude>
<exclude>org/hornetq/tests/util/*.java</exclude>
- <!-- exclude some replication tests for now -->
- <exclude>**/cluster/failover/Remote*.java</exclude>
- <exclude>**/failover/remote/**.java</exclude>
- <exclude>**/Replicated*.java</exclude>
- <exclude>**/replication/**.java</exclude>
- <exclude>**/*Replicated**.java</exclude>
</excludes>
<argLine>-Djava.library.path=${project.build.directory}/../../../distribution/hornetq/src/main/resources/bin -Djava.util.logging.config.file=${project.build.directory}/../../../distribution/hornetq/src/main/resources/config/stand-alone/non-clustered/logging.properties</argLine>
</configuration>
12 years, 1 month
JBoss hornetq SVN: r12311 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:24:07 -0400 (Fri, 16 Mar 2012)
New Revision: 12311
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java
Log:
HORNETQ-720 Fix hanging tests: Wait before crashing live on paged replicated tests
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java 2012-03-16 15:23:54 UTC (rev 12310)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailoverTest.java 2012-03-16 15:24:07 UTC (rev 12311)
@@ -2,6 +2,7 @@
import java.util.HashMap;
+import org.hornetq.api.core.client.ClientSession;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.NodeManager;
@@ -22,4 +23,11 @@
{
// paged messages are not available for browsing
}
+
+ @Override
+ protected void crash(ClientSession... sessions) throws Exception
+ {
+ Thread.sleep(100);
+ super.crash(sessions);
+ }
}
12 years, 1 month
JBoss hornetq SVN: r12310 - in trunk/hornetq-core/src/main/java/org/hornetq/core: transaction/impl and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:23:54 -0400 (Fri, 16 Mar 2012)
New Revision: 12310
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/TransactionImpl.java
Log:
Better error handling on IOAsyncTask's
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16 15:23:41 UTC (rev 12309)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16 15:23:54 UTC (rev 12310)
@@ -462,15 +462,26 @@
store.afterCompleteOperations(new IOAsyncTask()
{
+ volatile String error = "";
+ @Override
public void onError(final int errorCode, final String errorMessage)
{
+ error = " errorCode=" + errorCode + ", msg=" + errorMessage;
+ log.error(this + error);
}
+ @Override
public void done()
{
processACK(position);
}
+
+ @Override
+ public String toString()
+ {
+ return IOAsyncTask.class.getSimpleName() + "(" + PageSubscriptionImpl.class.getSimpleName() + ") " + error;
+ }
});
}
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/TransactionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/TransactionImpl.java 2012-03-16 15:23:41 UTC (rev 12309)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/transaction/impl/TransactionImpl.java 2012-03-16 15:23:54 UTC (rev 12310)
@@ -31,7 +31,7 @@
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:andy.taylor@jboss.org>Andy Taylor</a>
- *
+ *
*/
public class TransactionImpl implements Transaction
{
@@ -48,7 +48,7 @@
private final Xid xid;
private final long id;
-
+
/**
* if the appendCommit has to be done only after the current operations are completed
*/
@@ -135,7 +135,7 @@
{
containsPersistent = true;
}
-
+
public boolean isContainsPersistent()
{
return containsPersistent;
@@ -155,7 +155,7 @@
{
return createTime;
}
-
+
public boolean hasTimedOut(final long currentTime,final int defaultTimeout)
{
if(timeoutSeconds == - 1)
@@ -232,7 +232,7 @@
if (state == State.ROLLBACK_ONLY)
{
rollback();
-
+
if (exception != null)
{
throw exception;
@@ -258,7 +258,7 @@
throw new IllegalStateException("Transaction is in invalid state " + state);
}
}
-
+
beforeCommit();
if (containsPersistent || xid != null && state == State.PREPARED)
@@ -302,17 +302,18 @@
}
/**
- *
+ *
*/
protected void asyncAppendCommit()
{
- final OperationContext ctx = storageManager.getContext();
+ final OperationContext ctx = storageManager.getContext();
storageManager.afterCompleteOperations(new IOAsyncTask()
{
public void onError(int errorCode, String errorMessage)
{
+ log.error("Error=" + errorCode + ", message=" + errorMessage);
}
-
+
public void done()
{
OperationContext originalCtx = storageManager.getContext();
@@ -330,6 +331,12 @@
storageManager.setContext(originalCtx);
}
}
+
+ @Override
+ public String toString()
+ {
+ return IOAsyncTask.class.getName() + "(" + TransactionImpl.class.getName() + "-AsyncAppendCommit)";
+ }
});
storageManager.lineUpContext();
}
@@ -406,7 +413,7 @@
{
this.state = state;
}
-
+
public boolean isWaitBeforeCommit()
{
return waitBeforeCommit;
@@ -445,11 +452,11 @@
return operations.size();
}
- public synchronized List<TransactionOperation> getAllOperations()
+ public synchronized List<TransactionOperation> getAllOperations()
{
return new ArrayList<TransactionOperation>(operations);
}
-
+
public void putProperty(final int index, final Object property)
{
if (index >= properties.length)
12 years, 1 month
JBoss hornetq SVN: r12309 - trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:23:41 -0400 (Fri, 16 Mar 2012)
New Revision: 12309
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
Log:
HORNETQ-720 Avoid dead-locks on isPaging(), and make it faster
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2012-03-16 15:23:31 UTC (rev 12308)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2012-03-16 15:23:41 UTC (rev 12309)
@@ -54,15 +54,14 @@
import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.Transaction;
-import org.hornetq.core.transaction.Transaction.State;
import org.hornetq.core.transaction.TransactionOperation;
import org.hornetq.core.transaction.TransactionPropertyIndexes;
import org.hornetq.utils.Future;
/**
- *
+ *
* @see PagingStore
- *
+ *
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
@@ -116,6 +115,7 @@
private volatile Page currentPage;
+ private final Object pagingGuard = new Object();
private volatile boolean paging = false;
private final PageCursorProvider cursorProvider;
@@ -208,7 +208,7 @@
pageSize = addressSettings.getPageSizeBytes();
addressFullMessagePolicy = addressSettings.getAddressFullMessagePolicy();
-
+
if (cursorProvider != null)
{
cursorProvider.setCacheMaxSize(addressSettings.getPageCacheMaxSize());
@@ -286,7 +286,7 @@
{
return pageSize;
}
-
+
public String getFolder()
{
SequentialFileFactory factoryUsed = this.fileFactory;
@@ -302,28 +302,19 @@
public boolean isPaging()
{
- lock.readLock().lock();
-
- try
+ synchronized (pagingGuard)
{
if (addressFullMessagePolicy == AddressFullMessagePolicy.BLOCK)
{
return false;
}
- else if (addressFullMessagePolicy == AddressFullMessagePolicy.DROP)
+ if (addressFullMessagePolicy == AddressFullMessagePolicy.DROP)
{
return isFull();
}
- else
- {
- return paging;
- }
- }
- finally
- {
- lock.readLock().unlock();
- }
- }
+ return paging;
+ }
+ }
public int getNumberOfPages()
{
@@ -527,7 +518,10 @@
lock.writeLock().lock();
try
{
- paging = false;
+ synchronized (pagingGuard)
+ {
+ paging = false;
+ }
}
finally
{
@@ -542,18 +536,13 @@
return false;
}
- lock.readLock().lock();
- try
+ synchronized (pagingGuard)
{
if (paging)
{
return false;
}
}
- finally
- {
- lock.readLock().unlock();
- }
// if the first check failed, we do it again under a global currentPageLock
// (writeLock) this time
@@ -561,6 +550,8 @@
try
{
+ synchronized (pagingGuard)
+ {
if (paging)
{
return false;
@@ -584,6 +575,7 @@
paging = true;
return true;
+ }
}
finally
{
@@ -595,7 +587,7 @@
{
return currentPage;
}
-
+
public boolean checkPageFileExists(final int pageNumber)
{
String fileName = createFileName(pageNumber);
@@ -827,9 +819,7 @@
}
- private
- boolean
- page(ServerMessage message, final RoutingContext ctx, RouteContextList listCtx, final boolean sync)
+ private boolean page(ServerMessage message, final RoutingContext ctx, RouteContextList listCtx, final boolean sync)
throws Exception
{
if (!running)
@@ -849,7 +839,7 @@
PagingStoreImpl.log.warn("Messages are being dropped on address " + getStoreName());
}
-
+
if (log.isDebugEnabled())
{
log.debug("Message " + message + " beig dropped for fullAddressPolicy==DROP");
@@ -869,20 +859,13 @@
}
// We need to ensure a read lock, as depage could change the paging state
- lock.readLock().lock();
+ synchronized (pagingGuard) {
- try
- {
// First check done concurrently, to avoid synchronization and increase throughput
- if (!paging)
- {
+ if (!paging) {
return false;
}
- }
- finally
- {
- lock.readLock().unlock();
- }
+ }
Transaction tx = ctx.getTransaction();
@@ -890,9 +873,12 @@
try
{
- if (!paging)
+ synchronized (pagingGuard)
{
- return false;
+ if (!paging)
+ {
+ return false;
+ }
}
if (!message.isDurable())
@@ -904,7 +890,7 @@
PagedMessage pagedMessage = new PagedMessageImpl(message, routeQueues(tx, listCtx), tx == null ? -1 : tx.getID());
-
+
if (message.isLargeMessage())
{
((LargeServerMessage)message).setPaged();
@@ -918,16 +904,16 @@
openNewPage();
currentPageSize.addAndGet(bytesToWrite);
}
-
+
currentPage.write(pagedMessage);
if (isTrace)
{
- log.trace("Paging message " + pagedMessage + " on pageStore " + this.getStoreName() +
+ log.trace("Paging message " + pagedMessage + " on pageStore " + this.getStoreName() +
" pageId=" + currentPage.getPageId());
}
-
-
+
+
if (tx != null)
{
installPageTransaction(tx, listCtx);
@@ -990,15 +976,15 @@
private static class FinishPageMessageOperation implements TransactionOperation
{
public final PageTransactionInfo pageTransaction;
-
+
private final StorageManager storageManager;
-
+
private final PagingManager pagingManager;
-
+
private final Set<PagingStore> usedStores = new HashSet<PagingStore>();
private boolean stored = false;
-
+
public void addStore(PagingStore store)
{
this.usedStores.add(store);
@@ -1123,9 +1109,9 @@
}
/**
- *
+ *
* Note: Decimalformat is not thread safe, Use synchronization before calling this method
- *
+ *
* @param pageID
* @return
*/
@@ -1144,6 +1130,7 @@
{
return maxSize > 0 && getAddressSize() > maxSize;
}
+
@Override
public Collection<Integer> getCurrentIds() throws Exception
{
12 years, 1 month
JBoss hornetq SVN: r12308 - in trunk/hornetq-core/src/main/java/org/hornetq: utils and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:23:31 -0400 (Fri, 16 Mar 2012)
New Revision: 12308
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/utils/Future.java
Log:
Avoid using Object.wait() and Object.notify()
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16 15:23:12 UTC (rev 12307)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16 15:23:31 UTC (rev 12308)
@@ -264,10 +264,8 @@
while (!future.await(10000))
{
- log.warn("Waiting cursor provider " + this + " to finish executors" + executor);
-
+ log.warn("Waiting cursor provider " + this + " to finish " + future + ", running on executor " + executor);
}
-
}
public void flushExecutors()
Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/Future.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/Future.java 2012-03-16 15:23:12 UTC (rev 12307)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/Future.java 2012-03-16 15:23:31 UTC (rev 12308)
@@ -12,47 +12,38 @@
*/
package org.hornetq.utils;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
/**
* A Future
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
public class Future implements Runnable
{
- private boolean done;
+ private final CountDownLatch latch = new CountDownLatch(1);
- public synchronized boolean await(final long timeout)
+ public boolean await(final long timeout)
{
- long toWait = timeout;
-
- long start = System.currentTimeMillis();
-
- while (!done && toWait > 0)
+ try {
+ return latch.await(timeout, TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e)
{
- try
- {
- wait(toWait);
- }
- catch (InterruptedException e)
- {
- }
-
- long now = System.currentTimeMillis();
-
- toWait -= now - start;
-
- start = now;
+ return false;
}
-
- return done;
}
- public synchronized void run()
+ public void run()
{
- done = true;
-
- notify();
+ latch.countDown();
}
+ @Override
+ public String toString()
+ {
+ return "Future(latch=" + latch + ")";
+ }
}
12 years, 1 month
JBoss hornetq SVN: r12307 - in trunk: hornetq-core/src/main/java/org/hornetq/core/persistence and 2 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 11:23:12 -0400 (Fri, 16 Mar 2012)
New Revision: 12307
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java
Log:
Javadoc spelling, and other clean ups.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -265,6 +265,7 @@
while (!future.await(10000))
{
log.warn("Waiting cursor provider " + this + " to finish executors" + executor);
+
}
}
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -305,24 +305,18 @@
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString()
{
return "PageSubscriptionImpl [cursorId=" + cursorId + ", queue=" + queue + ", filter = " + filter + "]";
}
-
private PagedReference getReference(PagePosition pos) throws Exception
{
return cursorProvider.newReference(pos, cursorProvider.getMessage(pos), this);
}
- /* (non-Javadoc)
- * @see org.hornetq.core.paging.cursor.PageCursor#iterator()
- */
+ @Override
public LinkedListIterator<PagedReference> iterator()
{
return new CursorIterator();
@@ -773,7 +767,7 @@
// Private -------------------------------------------------------
- // To be called only after the ACK has been processed and guaranteed to be on storae
+ // To be called only after the ACK has been processed and guaranteed to be on storage
// The only exception is on non storage events such as not matching messages
private PageCursorInfo processACK(final PagePosition pos)
{
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -51,9 +51,9 @@
import org.hornetq.core.transaction.Transaction;
/**
- *
+ *
* A StorageManager
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
* @author <a href="mailto:andy.taylor@jboss.org>Andy Taylor</a>
@@ -64,19 +64,19 @@
/** Get the context associated with the thread for later reuse */
OperationContext getContext();
-
+
void lineUpContext();
/** It just creates an OperationContext without associating it */
OperationContext newContext(Executor executor);
-
+
OperationContext newSingleThreadContext();
/** Set the context back to the thread */
void setContext(OperationContext context);
-
+
/**
- *
+ *
* @param ioCriticalError is the server being stopped due to an IO critical error
*/
void stop(boolean ioCriticalError) throws Exception;
@@ -91,48 +91,48 @@
void afterCompleteOperations(IOAsyncTask run);
- /** Block until the operations are done.
+ /** Block until the operations are done.
* Warning: Don't use it inside an ordered executor, otherwise the system may lock up
* in case of the pools are full
* @throws Exception */
boolean waitOnOperations(long timeout) throws Exception;
- /** Block until the operations are done.
+ /** Block until the operations are done.
* Warning: Don't use it inside an ordered executor, otherwise the system may lock up
* in case of the pools are full
* @throws Exception */
void waitOnOperations() throws Exception;
-
+
/**
- * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
- * otherwise the system may become irrensponsive if too many destinations are reading all the same time.
+ * We need a safeguard in place to avoid too much concurrent IO happening on Paging, otherwise
+ * the system may become unresponsive if too many destinations are reading all the same time.
* This is called before we read, so we can limit concurrent reads
* @throws Exception
*/
void beforePageRead() throws Exception;
-
+
/**
- * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
- * otherwise the system may become irrensponsive if too many destinations are reading all the same time.
+ * We need a safeguard in place to avoid too much concurrent IO happening on Paging, otherwise
+ * the system may become unresponsive if too many destinations are reading all the same time.
* This is called after we read, so we can limit concurrent reads
* @throws Exception
*/
void afterPageRead() throws Exception;
-
-
+
+
/** AIO has an optimized buffer which has a method to release it
instead of the way NIO will release data based on GC.
These methods will use that buffer if the inner method supports it */
ByteBuffer allocateDirectBuffer(int size);
-
+
/** AIO has an optimized buffer which has a method to release it
instead of the way NIO will release data based on GC.
These methods will use that buffer if the inner method supports it */
void freeDirectBuffer(ByteBuffer buffer);
-
+
void clearContext();
-
+
long generateUniqueID();
long getCurrentUniqueID();
@@ -150,7 +150,7 @@
void deleteMessage(long messageID) throws Exception;
void storeAcknowledge(long queueID, long messageID) throws Exception;
-
+
void storeCursorAcknowledge(long queueID, PagePosition position) throws Exception;
void updateDeliveryCount(MessageReference ref) throws Exception;
@@ -168,7 +168,7 @@
void storeAcknowledgeTransactional(long txID, long queueID, long messageID) throws Exception;
void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position) throws Exception;
-
+
void deleteCursorAcknowledgeTransactional(long txID, long ackID) throws Exception;
void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws Exception;
@@ -182,12 +182,12 @@
LargeServerMessage createLargeMessage();
/**
- *
+ *
* @param id
- * @param message This is a temporary message that holds the parsed properties.
+ * @param message This is a temporary message that holds the parsed properties.
* The remoting layer can't create a ServerMessage directly, then this will be replaced.
* @return
- * @throws Exception
+ * @throws Exception
*/
LargeServerMessage createLargeMessage(long id, MessageInternal message) throws Exception;
@@ -200,15 +200,15 @@
void commit(long txID, boolean lineUpContext) throws Exception;
void rollback(long txID) throws Exception;
-
+
void rollbackBindings(long txID) throws Exception;
-
+
void commitBindings(long txID) throws Exception;
void storePageTransaction(long txID, PageTransactionInfo pageTransaction) throws Exception;
-
+
void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depage) throws Exception;
-
+
/** FIXME Unused */
void updatePageTransaction(PageTransactionInfo pageTransaction, int depage) throws Exception;
@@ -238,40 +238,40 @@
void addGrouping(GroupBinding groupBinding) throws Exception;
void deleteGrouping(GroupBinding groupBinding) throws Exception;
-
+
void storeAddressSetting(PersistedAddressSetting addressSetting) throws Exception;
-
+
void deleteAddressSetting(SimpleString addressMatch) throws Exception;
-
+
List<PersistedAddressSetting> recoverAddressSettings() throws Exception;
-
+
void storeSecurityRoles(PersistedRoles persistedRoles) throws Exception;
-
+
void deleteSecurityRoles(SimpleString addressMatch) throws Exception;
List<PersistedRoles> recoverPersistedRoles() throws Exception;
-
- /**
+
+ /**
* @return The ID with the stored counter
*/
long storePageCounter(long txID, long queueID, long value) throws Exception;
-
+
void deleteIncrementRecord(long txID, long recordID) throws Exception;
-
+
void deletePageCounter(long txID, long recordID) throws Exception;
/**
* @return the ID with the increment record
- * @throws Exception
+ * @throws Exception
*/
long storePageCounterInc(long txID, long queueID, int add) throws Exception;
-
+
/**
* @return the ID with the increment record
- * @throws Exception
+ * @throws Exception
*/
long storePageCounterInc(long queueID, int add) throws Exception;
-
+
/**
* @return the bindings journal
*/
@@ -284,7 +284,7 @@
/**
* TODO: Find a way to not depend on ClusterConnection and TransportConfiguration here
- *
+ *
* @param replicationManager
* @param pagingManager
* @param nodeID
@@ -297,9 +297,9 @@
throws Exception;
/**
- *
+ *
* TODO: RoutingContext should only be used on PostOffice
- *
+ *
* Adds message to page if we are paging.
* @return whether we added the message to a page or not.
*/
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -4218,9 +4218,7 @@
}
}
- /* (non-Javadoc)
- * @see org.hornetq.core.transaction.TransactionOperation#getRelatedMessageReferences()
- */
+ @Override
public List<MessageReference> getRelatedMessageReferences()
{
return null;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -253,16 +253,15 @@
}
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.hornetq.core.replication.ReplicationToken#complete()
*/
public void complete()
{
}
- /* (non-Javadoc)
- * @see org.hornetq.core.asyncio.AIOCallback#onError(int, java.lang.String)
- */
+ @Override
public synchronized void onError(final int errorCode, final String errorMessage)
{
this.errorCode = errorCode;
@@ -311,17 +310,13 @@
}
}
- /* (non-Javadoc)
- * @see org.hornetq.core.persistence.OperationContext#waitCompletion()
- */
+ @Override
public void waitCompletion() throws Exception
{
waitCompletion(0);
}
- /* (non-Javadoc)
- * @see org.hornetq.core.persistence.OperationContext#waitCompletion(long)
- */
+ @Override
public boolean waitCompletion(final long timeout) throws Exception
{
SimpleWaitIOCallback waitCallback = new SimpleWaitIOCallback();
@@ -338,9 +333,6 @@
}
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString()
{
@@ -379,7 +371,4 @@
", executor=" + this.executor +
"]" + buffer.toString();
}
-
-
-
}
Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -39,7 +39,7 @@
@Override
public String toString()
{
- return "simpleWaitIOCallback";
+ return SimpleWaitIOCallback.class.getName();
}
public void done()
Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java 2012-03-16 09:01:01 UTC (rev 12306)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java 2012-03-16 15:23:12 UTC (rev 12307)
@@ -421,8 +421,8 @@
{
while (!closed)
{
- // We flush on the timer if there are pending syncs there and we've waited waited at least one
- // timeout since the time of the last flush
+ // We flush on the timer if there are pending syncs there and we've waited at least one
+ // timeout since the time of the last flush.
// Effectively flushing "resets" the timer
if (pendingSync && bufferObserver != null && System.nanoTime() > lastFlushTime.get() + timeout)
12 years, 1 month
JBoss hornetq SVN: r12306 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-16 05:01:01 -0400 (Fri, 16 Mar 2012)
New Revision: 12306
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedWithDelayFailoverTest.java
Log:
HORNETQ-720 Fix hang on test delaying 'in-sync' message for Backup.
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedWithDelayFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedWithDelayFailoverTest.java 2012-03-15 14:32:31 UTC (rev 12305)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedWithDelayFailoverTest.java 2012-03-16 09:01:01 UTC (rev 12306)
@@ -23,4 +23,12 @@
syncDelay.deliverUpToDateMsg();
super.crash(sessions);
}
+
+ @Override
+ protected void crash(boolean waitFailure, ClientSession... sessions) throws Exception
+ {
+ syncDelay.deliverUpToDateMsg();
+ waitForBackup(null, 5);
+ super.crash(waitFailure, sessions);
+ }
}
12 years, 1 month
JBoss hornetq SVN: r12305 - in branches/i18n_logging: hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap and 14 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2012-03-15 10:32:31 -0400 (Thu, 15 Mar 2012)
New Revision: 12305
Added:
branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapBundle.java
branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapLogger.java
branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilBundle.java
branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilLogger.java
branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossBundle.java
branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossLogger.java
branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSBundle.java
branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSLogger.java
branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/
branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalBundle.java
branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalLogger.java
branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRABundle.java
branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRALogger.java
branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestBundle.java
branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestLogger.java
branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceBundle.java
branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceLogger.java
branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/
branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringBundle.java
branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringLogger.java
branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/
branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterBundle.java
branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterLogger.java
Modified:
branches/i18n_logging/hornetq-bootstrap/pom.xml
branches/i18n_logging/hornetq-commons/pom.xml
branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQLogger.java
branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQMessageBundle.java
Log:
added remaining loggers
Modified: branches/i18n_logging/hornetq-bootstrap/pom.xml
===================================================================
--- branches/i18n_logging/hornetq-bootstrap/pom.xml 2012-03-15 13:11:37 UTC (rev 12304)
+++ branches/i18n_logging/hornetq-bootstrap/pom.xml 2012-03-15 14:32:31 UTC (rev 12305)
@@ -26,6 +26,14 @@
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </dependency>
</dependencies>
</project>
Added: branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapBundle.java
===================================================================
--- branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.integration.bootstrap;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 10
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit should be 9
+ *
+ * so 109000 to 109999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQBootstrapBundle
+{
+}
Added: branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapLogger.java
===================================================================
--- branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.integration.bootstrap;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 10
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 101000 to 101999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQBootstrapLogger
+{
+}
Modified: branches/i18n_logging/hornetq-commons/pom.xml
===================================================================
--- branches/i18n_logging/hornetq-commons/pom.xml 2012-03-15 13:11:37 UTC (rev 12304)
+++ branches/i18n_logging/hornetq-commons/pom.xml 2012-03-15 14:32:31 UTC (rev 12305)
@@ -26,6 +26,14 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </dependency>
</dependencies>
Added: branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilBundle.java
===================================================================
--- branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.utils;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 20
+ *
+ * each message id must be 6 digits long starting with 20, the 3rd digit should be 9
+ *
+ * so 209000 to 209999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQUtilBundle
+{
+}
Added: branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilLogger.java
===================================================================
--- branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.utils;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 20
+ *
+ * each message id must be 6 digits long starting with 20, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 201000 to 201999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQUtilLogger
+{
+}
Modified: branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQLogger.java
===================================================================
--- branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQLogger.java 2012-03-15 13:11:37 UTC (rev 12304)
+++ branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -24,6 +24,19 @@
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* 3/8/12
+ *
+ * Logger Code 11
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 101000 to 101999
*/
import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
@@ -47,156 +60,156 @@
HornetQLogger LOGGER = Logger.getMessageLogger(HornetQLogger.class, HornetQLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1001, value = "{0} server is starting with configuration {1}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111001, value = "{0} server is starting with configuration {1}", format = Message.Format.MESSAGE_FORMAT)
void serverStarting(String type, Configuration configuration);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1002, value = "{0} is already started, ignoring the call to start..", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111002, value = "{0} is already started, ignoring the call to start..", format = Message.Format.MESSAGE_FORMAT)
void serverAlreadyStarted(String type);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1003, value = "HornetQ Server version {0} [{1}] {2}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111003, value = "HornetQ Server version {0} [{1}] {2}", format = Message.Format.MESSAGE_FORMAT)
void serverStarted(String fullVersion, SimpleString nodeId, String identity);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1004, value = "HornetQ Server version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111004, value = "HornetQ Server version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT)
void serverStopped(String version, SimpleString nodeId);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1005, value = "trying to deploy queue {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111005, value = "trying to deploy queue {0}", format = Message.Format.MESSAGE_FORMAT)
void deployQueue(SimpleString queueName);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1006, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111006, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
void dumpServerInfo(String serverInfo);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1007, value = "Deleting pending large message as it wasn't completed: {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111007, value = "Deleting pending large message as it wasn't completed: {0}", format = Message.Format.MESSAGE_FORMAT)
void deletingPendingMessage(Pair<Long, Long> msgToDelete);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1008, value = "Waiting to obtain live lock", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111008, value = "Waiting to obtain live lock", format = Message.Format.MESSAGE_FORMAT)
void awaitingLiveLock();
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1009, value = "Server is now live", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111009, value = "Server is now live", format = Message.Format.MESSAGE_FORMAT)
void serverIsLive();
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1010, value = "live server wants to restart, restarting server in backup" , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111010, value = "live server wants to restart, restarting server in backup" , format = Message.Format.MESSAGE_FORMAT)
void awaitFailBack();
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1011, value = "HornetQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active",
+ @Message(id = 1111, value = "HornetQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active",
format = Message.Format.MESSAGE_FORMAT)
void backupServerStarted(String version, SimpleString nodeID);
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1012, value = "Backup Server is now live", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111012, value = "Backup Server is now live", format = Message.Format.MESSAGE_FORMAT)
void backupServerIsLive();
@LogMessage(level = Logger.Level.INFO)
- @Message(id = 1013, value = "Server {0} is now live", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 111013, value = "Server {0} is now live", format = Message.Format.MESSAGE_FORMAT)
void serverIsLive(String identity);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2001, value = "HornetQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope" ,
+ @Message(id = 112001, value = "HornetQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope" ,
format = Message.Format.MESSAGE_FORMAT)
void serverFinalisedWIthoutBeingSTopped();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2002, value = "Error closing sessions while stopping server" , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112002, value = "Error closing sessions while stopping server" , format = Message.Format.MESSAGE_FORMAT)
void errorClosingSessionsWhileStoppingServer(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2003, value = "Timed out waiting for pool to terminate {0}. Interrupting all its threads!", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112003, value = "Timed out waiting for pool to terminate {0}. Interrupting all its threads!", format = Message.Format.MESSAGE_FORMAT)
void timedOutStoppingThreadpool(ExecutorService service);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2004, value = "Must specify a name for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112004, value = "Must specify a name for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
void divertWithNoName();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2005, value = "Must specify an address for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112005, value = "Must specify an address for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
void divertWithNoAddress();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2006, value = "Must specify a forwarding address for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112006, value = "Must specify a forwarding address for each divert. This one will not be deployed." , format = Message.Format.MESSAGE_FORMAT)
void divertWithNoForwardingAddress();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2007, value = "Binding already exists with name {0}, divert will not be deployed", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112007, value = "Binding already exists with name {0}, divert will not be deployed", format = Message.Format.MESSAGE_FORMAT)
void divertBindingNotExists(SimpleString bindingName);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2008, value = "Security risk! HornetQ is running with the default cluster admin user and default password. "
+ @Message(id = 112008, value = "Security risk! HornetQ is running with the default cluster admin user and default password. "
+ "Please see the HornetQ user guide, cluster chapter, for instructions on how to change this." , format = Message.Format.MESSAGE_FORMAT)
void clusterSecurityRisk();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2009, value = "unable to restart server, please kill and restart manually", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112009, value = "unable to restart server, please kill and restart manually", format = Message.Format.MESSAGE_FORMAT)
void serverRestartWarning();
@LogMessage(level = Logger.Level.WARN)
void serverRestartWarning(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2010, value = "Unable to announce backup for replication. Trying to stop the server.", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112010, value = "Unable to announce backup for replication. Trying to stop the server.", format = Message.Format.MESSAGE_FORMAT)
void replicationStartProblem(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2011, value = "Critical IO Error, shutting down the server. code={0}, message={1}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112011, value = "Critical IO Error, shutting down the server. code={0}, message={1}", format = Message.Format.MESSAGE_FORMAT)
void ioErrorShutdownServer(int code, String message);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2012, value = "Error stopping server", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112012, value = "Error stopping server", format = Message.Format.MESSAGE_FORMAT)
void errorStoppingServer(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2013, value = "Timed out waiting for backup activation to exit", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112013, value = "Timed out waiting for backup activation to exit", format = Message.Format.MESSAGE_FORMAT)
void backupActivationProblem();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2014, value = "Error when trying to start replication", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112014, value = "Error when trying to start replication", format = Message.Format.MESSAGE_FORMAT)
void errorStartingReplication(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2015, value = "Error when trying to stop replication", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112015, value = "Error when trying to stop replication", format = Message.Format.MESSAGE_FORMAT)
void errorStoppingReplication(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 2016, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 112016, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
void warn(String message);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3001, value = "Server already started!", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113001, value = "Server already started!", format = Message.Format.MESSAGE_FORMAT)
void serverAlreadyStarted();
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3002, value = "Starting server {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113002, value = "Starting server {0}", format = Message.Format.MESSAGE_FORMAT)
void startingServer(HornetQServer server);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3003, value = "Cancelled the execution of {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113003, value = "Cancelled the execution of {0}", format = Message.Format.MESSAGE_FORMAT)
void cancelExecution(Runnable runnable);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3004, value = "First part initialization on {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113004, value = "First part initialization on {0}", format = Message.Format.MESSAGE_FORMAT)
void initializeFirstPart(Runnable runnable);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3005, value = "announcing backup to the former live {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113005, value = "announcing backup to the former live {0}", format = Message.Format.MESSAGE_FORMAT)
void announceBackupToFormerLive(Runnable runnable);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3006, value = "{0} ::Stopping live node in favor of failback", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113006, value = "{0} ::Stopping live node in favor of failback", format = Message.Format.MESSAGE_FORMAT)
void stoppingLiveNodeInFavourOfFailback(HornetQServerImpl server);
@LogMessage(level = Logger.Level.DEBUG)
- @Message(id = 3007, value = "{0} ::Starting backup node now after failback", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 113007, value = "{0} ::Starting backup node now after failback", format = Message.Format.MESSAGE_FORMAT)
void startingBackupAfterFailure(HornetQServerImpl server);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 4001, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 114001, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
void initializationError(@Cause Throwable e);
}
Modified: branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQMessageBundle.java
===================================================================
--- branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQMessageBundle.java 2012-03-15 13:11:37 UTC (rev 12304)
+++ branches/i18n_logging/hornetq-core/src/main/java/org/hornetq/core/server/HornetQMessageBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -30,24 +30,30 @@
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* 3/12/12
+ *
+ * Logger Code 11
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit should be 9
+ *
+ * so 119000 to 119999
*/
@MessageBundle(projectCode = "HQ")
public interface HornetQMessageBundle
{
HornetQMessageBundle MESSAGES = Messages.getBundle(HornetQMessageBundle.class);
- @Message(id = 9001, value = "Generating thread dump because - {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 119001, value = "Generating thread dump because - {0}", format = Message.Format.MESSAGE_FORMAT)
String generatingThreadDump(String reason);
- @Message(id = 9002, value = "End Thread dump", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 119002, value = "End Thread dump", format = Message.Format.MESSAGE_FORMAT)
String endThreadDump();
- @Message(id = 9003, value = "Thread {0} name {1} id {2} group {3}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 119003, value = "Thread {0} name {1} id {2} group {3}", format = Message.Format.MESSAGE_FORMAT)
String threadInfo(Thread key, String name, Long id, ThreadGroup group);
- @Message(id = 9004, value = "Connected server is not a backup server", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 119004, value = "Connected server is not a backup server", format = Message.Format.MESSAGE_FORMAT)
HornetQException notABackupServer(@Property Integer code);
- @Message(id = 9005, value = "Backup replication server is already connected to another server", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 119005, value = "Backup replication server is already connected to another server", format = Message.Format.MESSAGE_FORMAT)
String backupServerAlreadyConnectingToLive();
}
Added: branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossBundle.java
===================================================================
--- branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.integration.jboss;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 13
+ *
+ * each message id must be 6 digits long starting with 13, the 3rd digit should be 9
+ *
+ * so 139000 to 139999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQJBossBundle
+{
+}
Added: branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossLogger.java
===================================================================
--- branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.integration.jboss;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 13
+ *
+ * each message id must be 6 digits long starting with 13, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 131000 to 131999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQJBossLogger
+{
+}
Added: branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSBundle.java
===================================================================
--- branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.jms;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 12
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit should be 9
+ *
+ * so 129000 to 129999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQJMSBundle
+{
+}
Added: branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSLogger.java
===================================================================
--- branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-jms/src/main/java/org/hornetq/jms/HornetQJMSLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.jms;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 12
+ *
+ * each message id must be 6 digits long starting with 12, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 121000 to 121999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQJMSLogger
+{
+}
Added: branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalBundle.java
===================================================================
--- branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.journal;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 14
+ *
+ * each message id must be 6 digits long starting with 14, the 3rd digit should be 9
+ *
+ * so 149000 to 149999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQJournalBundle
+{
+}
Added: branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalLogger.java
===================================================================
--- branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.journal;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 14
+ *
+ * each message id must be 6 digits long starting with 14, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 141000 to 141999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQJournalLogger
+{
+}
Added: branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRABundle.java
===================================================================
--- branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRABundle.java (rev 0)
+++ branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRABundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.ra;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 15
+ *
+ * each message id must be 6 digits long starting with 15, the 3rd digit should be 9
+ *
+ * so 159000 to 159999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQRABundle
+{
+}
Added: branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRALogger.java
===================================================================
--- branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRALogger.java (rev 0)
+++ branches/i18n_logging/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRALogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.ra;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 15
+ *
+ * each message id must be 6 digits long starting with 15, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 151000 to 151999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQRALogger
+{
+}
Added: branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestBundle.java
===================================================================
--- branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.rest;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 19
+ *
+ * each message id must be 6 digits long starting with 19, the 3rd digit should be 9
+ *
+ * so 199000 to 199999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQRestBundle
+{
+}
Added: branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestLogger.java
===================================================================
--- branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.rest;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 19
+ *
+ * each message id must be 6 digits long starting with 19, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 191000 to 191999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQRestLogger
+{
+}
Added: branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceBundle.java
===================================================================
--- branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.service;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 16
+ *
+ * each message id must be 6 digits long starting with 16, the 3rd digit should be 9
+ *
+ * so 169000 to 169999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQServiceBundle
+{
+}
Added: branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceLogger.java
===================================================================
--- branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.service;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 16
+ *
+ * each message id must be 6 digits long starting with 16, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 161000 to 161999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQServiceLogger
+{
+}
Added: branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringBundle.java
===================================================================
--- branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.spring;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 17
+ *
+ * each message id must be 6 digits long starting with 17, the 3rd digit should be 9
+ *
+ * so 179000 to 179999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQSpringBundle
+{
+}
Added: branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringLogger.java
===================================================================
--- branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.spring;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 17
+ *
+ * each message id must be 6 digits long starting with 17, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 171000 to 171999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQSpringLogger
+{
+}
Added: branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterBundle.java
===================================================================
--- branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterBundle.java (rev 0)
+++ branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterBundle.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,19 @@
+package org.hornetq.twitter;
+
+
+import org.jboss.logging.MessageBundle;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/12/12
+ *
+ * Logger Code 18
+ *
+ * each message id must be 6 digits long starting with 18, the 3rd digit should be 9
+ *
+ * so 189000 to 189999
+ */
+@MessageBundle(projectCode = "HQ")
+public class HornetQTwitterBundle
+{
+}
Added: branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterLogger.java
===================================================================
--- branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterLogger.java (rev 0)
+++ branches/i18n_logging/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterLogger.java 2012-03-15 14:32:31 UTC (rev 12305)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2010, Red Hat, Inc., and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.hornetq.twitter;
+
+import org.jboss.logging.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/15/12
+ *
+ * Logger Code 18
+ *
+ * each message id must be 6 digits long starting with 18, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 181000 to 181999
+ */
+@MessageLogger(projectCode = "HQ")
+public class HornetQTwitterLogger
+{
+}
12 years, 1 month