Author: borges
Date: 2011-05-24 11:04:43 -0400 (Tue, 24 May 2011)
New Revision: 10723
Modified:
branches/HORNETQ-698_SplitJournal/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileConfigurationParser.java
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalImplTest.java
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
branches/HORNETQ-698_SplitJournal/tests/stress-tests/src/test/java/org/hornetq/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
Log:
Fix references to constants
Modified:
branches/HORNETQ-698_SplitJournal/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileConfigurationParser.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -33,6 +33,7 @@
import org.hornetq.core.config.impl.FileConfiguration;
import org.hornetq.core.config.impl.Validators;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.security.Role;
import org.hornetq.core.server.JournalType;
@@ -139,7 +140,7 @@
/**
* @param validateAIO the validateAIO to set
*/
- public void setValidateAIO(boolean validateAIO)
+ public void setValidateAIO(final boolean validateAIO)
{
this.validateAIO = validateAIO;
}
@@ -479,14 +480,14 @@
int journalBufferTimeout = XMLConfigurationUtil.getInteger(e,
"journal-buffer-timeout",
- config.getJournalType()
== JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO
-
: ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
+ config.getJournalType()
== JournalType.ASYNCIO ? JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO
+
: JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
Validators.GT_ZERO);
int journalBufferSize = XMLConfigurationUtil.getInteger(e,
"journal-buffer-size",
- config.getJournalType() ==
JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO
-
: ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
+ config.getJournalType() ==
JournalType.ASYNCIO ? JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO
+
: JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
Validators.GT_ZERO);
int journalMaxIO = XMLConfigurationUtil.getInteger(e,
@@ -1206,7 +1207,7 @@
mainConfig.getBridgeConfigurations().add(config);
}
- private void getStaticConnectors(List<String> staticConnectorNames, Node child)
+ private void getStaticConnectors(final List<String> staticConnectorNames, final
Node child)
{
NodeList children2 =
((Element)child).getElementsByTagName("connector-ref");
Modified:
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalCompactTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -17,9 +17,9 @@
import junit.framework.TestSuite;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.journal.SequentialFileFactory;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.tests.util.UnitTestCase;
/**
@@ -60,7 +60,7 @@
file.mkdir();
return new AIOSequentialFileFactory(getTestDir(),
-
ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
+
JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
1000000,
false);
}
Modified:
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalImplTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalImplTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/AIOJournalImplTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -19,20 +19,20 @@
import junit.framework.TestSuite;
import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.journal.SequentialFileFactory;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.core.logging.Logger;
import org.hornetq.tests.unit.core.journal.impl.JournalImplTestUnit;
import org.hornetq.tests.util.UnitTestCase;
/**
- *
+ *
* A RealJournalImplTest
* you need to define -Djava.library.path=${project-root}/native/src/.libs when calling
the JVM
* If you are running this test in eclipse you should do:
* I - Run->Open Run Dialog
- * II - Find the class on the list (you will find it if you already tried running this
testcase before)
+ * II - Find the class on the list (you will find it if you already tried running this
testcase before)
* III - Add -Djava.library.path=<your project place>/native/src/.libs
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
@@ -72,7 +72,7 @@
file.mkdir();
return new AIOSequentialFileFactory(getTestDir(),
-
ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
+
JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
1000000,
false);
}
Modified:
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/integration-tests/src/test/java/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -21,13 +21,13 @@
import junit.framework.Assert;
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;
import org.hornetq.core.journal.SequentialFileFactory;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.core.journal.impl.JournalImpl;
import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
import org.hornetq.core.logging.Logger;
@@ -35,9 +35,9 @@
import org.hornetq.tests.util.UnitTestCase;
/**
- *
+ *
* This test spawns a remote VM, as we want to "crash" the VM right after the
journal is filled with data
- *
+ *
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert
Suconic</a>
*
*/
@@ -400,8 +400,8 @@
if (factoryType.equals("aio"))
{
return new AIOSequentialFileFactory(directory,
-
ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
-
ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
+
JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
+
JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
false);
}
else if (factoryType.equals("nio2"))
Modified:
branches/HORNETQ-698_SplitJournal/tests/stress-tests/src/test/java/org/hornetq/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/stress-tests/src/test/java/org/hornetq/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/stress-tests/src/test/java/org/hornetq/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -15,9 +15,9 @@
import java.io.File;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.journal.SequentialFileFactory;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
+import org.hornetq.core.journal.impl.JournalConstants;
/**
* A NIOAllPossibilitiesCompactStressTest
@@ -56,7 +56,7 @@
file.mkdir();
return new AIOSequentialFileFactory(getTestDir(),
-
ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
+
JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
1000000,
false);
}
Modified:
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -23,6 +23,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.core.server.JournalType;
import org.hornetq.tests.util.RandomUtil;
import org.hornetq.tests.util.UnitTestCase;
@@ -87,10 +88,10 @@
Assert.assertEquals(ConfigurationImpl.DEFAULT_PAGING_DIR,
conf.getPagingDirectory());
Assert.assertEquals(ConfigurationImpl.DEFAULT_LARGE_MESSAGES_DIR,
conf.getLargeMessagesDirectory());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_PERCENTAGE,
conf.getJournalCompactPercentage());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE,
conf.isLogJournalWriteRate());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES,
conf.getJournalPerfBlastPages());
Assert.assertEquals(ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_ENABLED,
conf.isMessageCounterEnabled());
Modified:
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
===================================================================
---
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2011-05-24
12:02:21 UTC (rev 10722)
+++
branches/HORNETQ-698_SplitJournal/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2011-05-24
15:04:43 UTC (rev 10723)
@@ -20,6 +20,7 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.journal.impl.JournalConstants;
/**
*
@@ -109,16 +110,13 @@
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO,
conf.getJournalMaxIO_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
-
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO,
conf.getJournalMaxIO_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
-
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
-
Assert.assertEquals(ConfigurationImpl.DEFAULT_CREATE_BINDINGS_DIR,
conf.isCreateBindingsDir());
Assert.assertEquals(ConfigurationImpl.DEFAULT_CREATE_JOURNAL_DIR,
conf.isCreateJournalDir());