JBoss hornetq SVN: r8596 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 11:38:36 -0500 (Sun, 06 Dec 2009)
New Revision: 8596
Added:
tags/hornetq_2_0_0_CR1/
Log:
tagged JBM 2.0.0.CR1
Copied: tags/hornetq_2_0_0_CR1 (from rev 8595, tags/hornetq_2_0_0_CR1_pending)
15 years, 1 month
JBoss hornetq SVN: r8595 - in trunk: tests/src/org/hornetq/tests/integration/journal and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2009-12-06 11:30:57 -0500 (Sun, 06 Dec 2009)
New Revision: 8595
Modified:
trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
Log:
HORNETQ-237 - Fix for tmp files on the journal
Modified: trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-12-06 14:16:57 UTC (rev 8594)
+++ trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-12-06 16:30:57 UTC (rev 8595)
@@ -2904,16 +2904,11 @@
trace("Creating file " + fileName);
}
- SequentialFile sequentialFile = fileFactory.createSequentialFile(fileName, maxAIO);
+ String tmpFileName = fileName + ".tmp";
+
+ SequentialFile sequentialFile = fileFactory.createSequentialFile(tmpFileName, maxAIO);
- if (multiAIO)
- {
- sequentialFile.open();
- }
- else
- {
- sequentialFile.open(1, false);
- }
+ sequentialFile.open(1, false);
if (fill)
{
@@ -2928,14 +2923,25 @@
sequentialFile.writeDirect(bb, true);
}
- JournalFile info = new JournalFileImpl(sequentialFile, fileID);
- if (!keepOpened)
+ sequentialFile.close();
+
+ sequentialFile.renameTo(fileName);
+
+ if (keepOpened)
{
- sequentialFile.close();
+
+ if (multiAIO)
+ {
+ sequentialFile.open();
+ }
+ else
+ {
+ sequentialFile.open(1, false);
+ }
}
- return info;
+ return new JournalFileImpl(sequentialFile, fileID);
}
private void openFile(final JournalFile file, final boolean multiAIO) throws Exception
@@ -3233,8 +3239,20 @@
controlFile.delete();
}
- List<String> leftFiles = fileFactory.listFiles(getFileExtension() + ".cmp");
+ cleanupTmpFiles(".cmp");
+ cleanupTmpFiles(".tmp");
+
+ return;
+ }
+
+ /**
+ * @throws Exception
+ */
+ private void cleanupTmpFiles(final String extension) throws Exception
+ {
+ List<String> leftFiles = fileFactory.listFiles(getFileExtension() + extension);
+
if (leftFiles.size() > 0)
{
log.warn("Compacted files were left unnatended on journal directory, deleting invalid files now");
@@ -3246,8 +3264,6 @@
file.delete();
}
}
-
- return;
}
private static boolean isInvalidSize(final int fileSize, final int bufferPos, final int size)
Modified: trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-12-06 14:16:57 UTC (rev 8594)
+++ trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-12-06 16:30:57 UTC (rev 8595)
@@ -301,9 +301,6 @@
try
{
Journal journal = appendData(journalType, journalDir, numberOfElements, transactionSize, numberOfThreads);
-
- journal.stop();
-
}
catch (Exception e)
{
@@ -313,7 +310,7 @@
System.exit(OK);
}
-
+
public static JournalImpl appendData(String journalType,
String journalDir,
long numberOfElements,
15 years, 1 month
JBoss hornetq SVN: r8594 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 09:16:57 -0500 (Sun, 06 Dec 2009)
New Revision: 8594
Added:
tags/hornetq_2_0_0_CR1_pending/
Log:
created pending tag for HornetQ 2.0.0.CR1
Copied: tags/hornetq_2_0_0_CR1_pending (from rev 8593, trunk)
15 years, 1 month
JBoss hornetq SVN: r8593 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 09:12:46 -0500 (Sun, 06 Dec 2009)
New Revision: 8593
Removed:
tags/hornetq_2_0_0_CR1_pending/
Log:
tag not needed
15 years, 1 month
JBoss hornetq SVN: r8592 - trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 09:09:07 -0500 (Sun, 06 Dec 2009)
New Revision: 8592
Modified:
trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
Log:
example fix
Modified: trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
===================================================================
--- trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-06 13:33:31 UTC (rev 8591)
+++ trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-06 14:09:07 UTC (rev 8592)
@@ -72,7 +72,7 @@
for (int i = 0; i < numMessages; i++)
{
TextMessage message = session.createTextMessage("This is text message " + i);
-
+ producer.send(message);
System.out.println("Sent message: " + message.getText());
}
15 years, 1 month
JBoss hornetq SVN: r8591 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 08:33:31 -0500 (Sun, 06 Dec 2009)
New Revision: 8591
Added:
tags/hornetq_2_0_0_CR1_pending/
Log:
created pending tag for HornetQ 2.0.0.CR1
Copied: tags/hornetq_2_0_0_CR1_pending (from rev 8590, trunk)
15 years, 1 month
JBoss hornetq SVN: r8590 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-06 08:32:35 -0500 (Sun, 06 Dec 2009)
New Revision: 8590
Modified:
trunk/docs/user-manual/en/logging.xml
Log:
doc fix
Modified: trunk/docs/user-manual/en/logging.xml
===================================================================
--- trunk/docs/user-manual/en/logging.xml 2009-12-06 12:54:46 UTC (rev 8589)
+++ trunk/docs/user-manual/en/logging.xml 2009-12-06 13:32:35 UTC (rev 8590)
@@ -21,7 +21,7 @@
<para>HornetQ has its own Logging Delegate that has no dependencies on any particular logging
framework. The default Delegate delegates all its logs to the standard <ulink
url="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/">JDK logging</ulink>,
- (a.k.a Java-Util-Logging: JUL). By default the server picks up its JUL configuration from a
+ (a.k.a Java-Util-Logging: JUL). By default the server picks up its JUL configuration from a
<literal>logging.properties</literal> file found in the config directories. This is
configured to use our own HornetQ logging formatter and will log to the console as well as a
log file. For more information on configuring JUL visit Suns website.</para>
@@ -42,8 +42,8 @@
default that uses
JUL.</para></listitem><listitem><para>org.hornetq.integration.logging.Log4jLogDelegateFactory
- which uses Log4J</para></listitem></orderedlist></para>
- <para>If you want configure your client's logging, make sure you provide a <literal
- >logging.properties</literal> file and set the <literal
+ <para>If you configure your client's logging to use the JUL delegate, make sure you provide a
+ <literal>logging.properties</literal> file and set the <literal
>java.util.logging.config.file</literal> property on client startup</para>
<section>
<title>Logging With The JBoss Application Server</title>
15 years, 1 month
JBoss hornetq SVN: r8589 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-06 07:54:46 -0500 (Sun, 06 Dec 2009)
New Revision: 8589
Modified:
trunk/docs/user-manual/en/ha.xml
Log:
small tweak on docs
Modified: trunk/docs/user-manual/en/ha.xml
===================================================================
--- trunk/docs/user-manual/en/ha.xml 2009-12-06 11:34:53 UTC (rev 8588)
+++ trunk/docs/user-manual/en/ha.xml 2009-12-06 12:54:46 UTC (rev 8589)
@@ -222,7 +222,7 @@
<para>Sometimes you want a client to failover onto a backup server even if the live
server is just cleanly shutdown rather than having crashed or the connection failed.
To configure this you can set the property <literal
- >FailoverOnServerShutdown</literal> to false either on the <literal
+ >FailoverOnServerShutdown</literal> to true either on the <literal
>HornetQConnectionFactory</literal> if you're using JMS or in the <literal
>hornetq-jms.xml</literal> file when you define the connection factory, or if
using core by setting the property directly on the <literal
@@ -334,7 +334,7 @@
<para>If the session is non transactional, messages or acknowledgements can be lost
in the event of failover.</para>
<para>If you wish to provide <emphasis role="italic">once and only once</emphasis>
- delivery guarantees for non transacted sessions too, enabled duplicate
+ delivery guarantees for non transacted sessions too, enabled duplicate
detection, and catch unblock exceptions as described in <xref
linkend="ha.automatic.failover.blockingcalls"/></para>
</section>
15 years, 1 month
JBoss hornetq SVN: r8588 - trunk/tests/src/org/hornetq/tests/integration/journal.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-06 06:34:53 -0500 (Sun, 06 Dec 2009)
New Revision: 8588
Modified:
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
Log:
Fixed TransactionHealthTest
Modified: trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-12-06 08:17:19 UTC (rev 8587)
+++ trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-12-06 11:34:53 UTC (rev 8588)
@@ -20,6 +20,7 @@
import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.journal.Journal;
import org.hornetq.core.journal.LoaderCallback;
import org.hornetq.core.journal.PreparedTransactionInfo;
import org.hornetq.core.journal.RecordInfo;
@@ -27,6 +28,7 @@
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
import org.hornetq.core.journal.impl.JournalImpl;
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
+import org.hornetq.core.logging.Logger;
import org.hornetq.tests.util.SpawnedVMSupport;
import org.hornetq.tests.util.UnitTestCase;
@@ -42,6 +44,9 @@
// Constants -----------------------------------------------------
+ private static final Logger log = Logger.getLogger(ValidateTransactionHealthTest.class);
+
+
// Attributes ----------------------------------------------------
private static final int OK = 10;
@@ -114,8 +119,6 @@
internalTest("nio2", getTestDir(), 10000, 0, true, true, 1);
}
-
-
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
@@ -297,7 +300,9 @@
try
{
- appendData(journalType, journalDir, numberOfElements, transactionSize, numberOfThreads);
+ Journal journal = appendData(journalType, journalDir, numberOfElements, transactionSize, numberOfThreads);
+
+ journal.stop();
}
catch (Exception e)
@@ -342,17 +347,17 @@
}
});
- LocalThreads threads[] = new LocalThreads[numberOfThreads];
+ LocalThread threads[] = new LocalThread[numberOfThreads];
final AtomicLong sequenceTransaction = new AtomicLong();
for (int i = 0; i < numberOfThreads; i++)
{
- threads[i] = new LocalThreads(journal, numberOfElements, transactionSize, sequenceTransaction);
+ threads[i] = new LocalThread(journal, numberOfElements, transactionSize, sequenceTransaction);
threads[i].start();
}
Exception e = null;
- for (LocalThreads t : threads)
+ for (LocalThread t : threads)
{
t.join();
@@ -403,7 +408,7 @@
}
}
- static class LocalThreads extends Thread
+ static class LocalThread extends Thread
{
final JournalImpl journal;
@@ -415,7 +420,7 @@
Exception e;
- public LocalThreads(JournalImpl journal, long numberOfElements, int transactionSize, AtomicLong nextID)
+ public LocalThread(JournalImpl journal, long numberOfElements, int transactionSize, AtomicLong nextID)
{
super();
this.journal = journal;
15 years, 1 month
JBoss hornetq SVN: r8587 - trunk/src/main/org/hornetq/core/paging/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2009-12-06 03:17:19 -0500 (Sun, 06 Dec 2009)
New Revision: 8587
Modified:
trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
Log:
tweak on my last fix to fix BasicXATest
Modified: trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2009-12-06 06:58:34 UTC (rev 8586)
+++ trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2009-12-06 08:17:19 UTC (rev 8587)
@@ -949,14 +949,6 @@
final long transactionIdDuringPaging = pagedMessage.getTransactionID();
- postOffice.route(message, depageTransaction);
-
- // This means the page is duplicated. So we need to ignore this
- if (depageTransaction.getState() == State.ROLLBACK_ONLY)
- {
- break;
- }
-
PageTransactionInfo pageUserTransaction = null;
if (transactionIdDuringPaging >= 0)
@@ -1003,6 +995,15 @@
}
+ postOffice.route(message, depageTransaction);
+
+ // This means the page is duplicated. So we need to ignore this
+ if (depageTransaction.getState() == State.ROLLBACK_ONLY)
+ {
+ break;
+ }
+
+
// Update information about transactions
// This needs to be done after routing because of duplication detection
if (pageUserTransaction != null && message.isDurable())
15 years, 1 month