JBoss hornetq SVN: r10673 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/server/impl and 1 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-05-16 21:42:03 -0400 (Mon, 16 May 2011)
New Revision: 10673
Modified:
branches/Branch_2_2_EAP/.classpath
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
Log:
Adding logs
Modified: branches/Branch_2_2_EAP/.classpath
===================================================================
--- branches/Branch_2_2_EAP/.classpath 2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/.classpath 2011-05-17 01:42:03 UTC (rev 10673)
@@ -94,7 +94,7 @@
<classpathentry kind="src" path="examples/javaee/servlet-transport/src"/>
<classpathentry kind="src" path="examples/javaee/xarecovery/src"/>
<classpathentry kind="src" path="examples/soak/normal/src"/>
- <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar"/>
+ <classpathentry kind="lib" path="thirdparty/junit/lib/junit.jar" sourcepath="/home/clebert/.m2/repository/junit/junit/3.8.2/junit-3.8.2-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-logging/lib/commons-logging.jar"/>
<classpathentry kind="lib" path="thirdparty/apache-xerces/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-05-17 01:42:03 UTC (rev 10673)
@@ -1671,19 +1671,14 @@
int maxDeliveries = addressSettings.getMaxDeliveryAttempts();
- if (isTrace)
- {
- log.trace("Checking redelivery for reference = " + reference + " with maxDeliveries = " + maxDeliveries + " on queue " + address);
- }
-
// First check DLA
if (maxDeliveries > 0 && reference.getDeliveryCount() >= maxDeliveries)
{
if (isTrace)
{
- log.trace("Sending reference " + reference + " to DLA");
+ log.trace("Sending reference " + reference + " to DLA = " + addressSettings.getDeadLetterAddress() + " since ref.getDeliveryCount=" + reference.getDeliveryCount() + "and maxDeliveries=" + maxDeliveries + " from queue=" + this.getName());
}
- sendToDeadLetterAddress(reference);
+ sendToDeadLetterAddress(reference, addressSettings.getDeadLetterAddress());
return false;
}
@@ -1694,6 +1689,10 @@
if (redeliveryDelay > 0)
{
+ if (isTrace)
+ {
+ log.trace("Setting redeliveryDelay=" + redeliveryDelay + " on reference=" + reference);
+ }
reference.setScheduledDeliveryTime(timeBase + redeliveryDelay);
if (message.isDurable() && durable)
@@ -1774,10 +1773,14 @@
}
}
+
private void sendToDeadLetterAddress(final MessageReference ref) throws Exception
{
- SimpleString deadLetterAddress = addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress();
-
+ sendToDeadLetterAddress(ref, addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress());
+ }
+
+ private void sendToDeadLetterAddress(final MessageReference ref, final SimpleString deadLetterAddress) throws Exception
+ {
if (deadLetterAddress != null)
{
Bindings bindingList = postOffice.getBindingsForAddress(deadLetterAddress);
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-05-16 20:32:09 UTC (rev 10672)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-05-17 01:42:03 UTC (rev 10673)
@@ -3748,6 +3748,7 @@
clearData();
Configuration config = createDefaultConfig();
+ config.setMessageExpiryScanPeriod(500);
config.setJournalSyncNonTransactional(false);
14 years, 11 months
JBoss hornetq SVN: r10672 - in branches/Branch_2_2_EAP/src/main/org/hornetq: core/client/impl and 3 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-05-16 16:32:09 -0400 (Mon, 16 May 2011)
New Revision: 10672
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/client/ServerLocator.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/FileConfiguration.java
branches/Branch_2_2_EAP/src/main/org/hornetq/spi/core/remoting/ConnectorFactory.java
branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java
branches/Branch_2_2_EAP/src/main/org/hornetq/utils/VersionLoader.java
Log:
Fixing a few typos.. small fixes
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/client/ServerLocator.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/client/ServerLocator.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/client/ServerLocator.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -23,18 +23,18 @@
* A ServerLocator
*
* @author Tim Fox
- *
- *
*/
public interface ServerLocator
{
-
- /**
- * This method will disable any checks when a GarbageCollection happens leaving connections open.
- * The JMS Layer will make specific usage of this method, since the ConnectionFactory.finalize should release this.
- *
- * Warn: You may leave resources unnatended if you call this method and don't take care of cleaning the resources yourself.
- */
+
+ /**
+ * This method will disable any checks when a GarbageCollection happens
+ * leaving connections open. The JMS Layer will make specific usage of this
+ * method, since the ConnectionFactory.finalize should release this.
+ *
+ * Warning: You may leave resources unattended if you call this method and
+ * don't take care of cleaning the resources yourself.
+ */
void disableFinalizeCheck();
/**
@@ -244,20 +244,26 @@
*/
void setProducerMaxRate(int producerMaxRate);
- /**
- * Returns whether consumers created through this factory will block while sending message acknowledgements or do it asynchronously.
- *
- * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
- *
- * @return whether consumers will block while sending message acknowledgements or do it asynchronously
- */
+ /**
+ * Returns whether consumers created through this factory will block while
+ * sending message acknowledgments or do it asynchronously.
+ *
+ * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
+ *
+ * @return whether consumers will block while sending message
+ * acknowledgments or do it asynchronously
+ */
boolean isBlockOnAcknowledge();
- /**
- * Sets whether consumers created through this factory will block while sending message acknowledgements or do it asynchronously.
- *
- * @param blockOnAcknowledge <code>true</code> to block when sending message acknowledgements or <code>false</code> to send them asynchronously
- */
+ /**
+ * Sets whether consumers created through this factory will block while
+ * sending message acknowledgments or do it asynchronously.
+ *
+ * @param blockOnAcknowledge
+ * <code>true</code> to block when sending message
+ * acknowledgments or <code>false</code> to send them
+ * asynchronously
+ */
void setBlockOnAcknowledge(boolean blockOnAcknowledge);
/**
@@ -341,30 +347,34 @@
*/
boolean isPreAcknowledge();
- /**
- * Sets to <code>true</code> to pre-acknowledge consumed messages on the server before they are sent to consumers, else set to <code>false</code> to let
- * clients acknowledge the message they consume.
- *
- * @param preAcknowledge <code>true</code> to enable pre-acknowledgement, <code>false</code> else
- */
+ /**
+ * Sets to <code>true</code> to pre-acknowledge consumed messages on the
+ * server before they are sent to consumers, else set to <code>false</code>
+ * to let clients acknowledge the message they consume.
+ *
+ * @param preAcknowledge
+ * <code>true</code> to enable pre-acknowledgment,
+ * <code>false</code> else
+ */
void setPreAcknowledge(boolean preAcknowledge);
- /**
- * Returns the acknowledgements batch size.
- *
- * Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}.
- *
- * @return the acknowledgements batch size
- */
+ /**
+ * Returns the acknowledgments batch size.
+ *
+ * Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}.
+ *
+ * @return the acknowledgments batch size
+ */
int getAckBatchSize();
- /**
- * Sets the acknowledgements batch size.
- *
- * Value must be equal or greater than 0.
- *
- * @param ackBatchSize acknowledgements batch size
- */
+ /**
+ * Sets the acknowledgments batch size.
+ *
+ * Value must be equal or greater than 0.
+ *
+ * @param ackBatchSize
+ * acknowledgments batch size
+ */
void setAckBatchSize(int ackBatchSize);
/**
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -27,8 +27,6 @@
* until the buffer is filled up or the user set a streaming.
*
* @author clebertsuconic
- *
- *
*/
public class ClientLargeMessageImpl extends ClientMessageImpl implements ClientLargeMessageInternal
{
@@ -70,6 +68,7 @@
// Public --------------------------------------------------------
+ @Override
public int getEncodeSize()
{
if (bodyBuffer != null)
@@ -85,6 +84,7 @@
/**
* @return the largeMessage
*/
+ @Override
public boolean isLargeMessage()
{
return true;
@@ -95,6 +95,7 @@
largeMessageController = controller;
}
+ @Override
public HornetQBuffer getBodyBuffer()
{
checkBuffer();
@@ -102,6 +103,7 @@
return bodyBuffer;
}
+ @Override
public int getBodySize()
{
return getLongProperty(Message.HDR_LARGE_BODY_SIZE).intValue();
@@ -115,6 +117,7 @@
/* (non-Javadoc)
* @see org.hornetq.api.core.client.ClientMessage#saveToOutputStream(java.io.OutputStream)
*/
+ @Override
public void saveToOutputStream(final OutputStream out) throws HornetQException
{
if (bodyBuffer != null)
@@ -131,6 +134,7 @@
/* (non-Javadoc)
* @see org.hornetq.api.core.client.ClientMessage#setOutputStream(java.io.OutputStream)
*/
+ @Override
public void setOutputStream(final OutputStream out) throws HornetQException
{
if (bodyBuffer != null)
@@ -146,6 +150,7 @@
/* (non-Javadoc)
* @see org.hornetq.api.core.client.ClientMessage#waitOutputStreamCompletion()
*/
+ @Override
public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws HornetQException
{
if (bodyBuffer != null)
@@ -158,6 +163,7 @@
}
}
+ @Override
public void discardBody()
{
if (bodyBuffer != null)
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/FileConfiguration.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/FileConfiguration.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -23,8 +23,7 @@
import org.w3c.dom.Element;
/**
- * ConfigurationImpl
- * This class allows the Configuration class to be configured via a config file.
+ * A {@code FileConfiguration} reads configuration values from a file.
*
* @author <a href="ataylor(a)redhat.com">Andy Taylor</a>
* @author <a href="tim.fox(a)jboss.com">Tim Fox</a>
@@ -39,8 +38,7 @@
private static final String DEFAULT_CONFIGURATION_URL = "hornetq-configuration.xml";
- // For a bridge confirmations must be activated or send acknowledgements won't return
-
+ // For a bridge confirmations must be activated or send acknowledgments won't return
public static final int DEFAULT_CONFIRMATION_WINDOW_SIZE = 1024 * 1024;
// Static --------------------------------------------------------------------------
@@ -59,25 +57,25 @@
{
return;
}
-
-
+
+
URL url = getClass().getClassLoader().getResource(configurationUrl);
-
+
if (url == null)
{
// The URL is outside of the classloader. Trying a pure url now
url = new URL(configurationUrl);
}
-
+
FileConfiguration.log.debug("Loading server configuration from " + url);
Reader reader = new InputStreamReader(url.openStream());
String xml = org.hornetq.utils.XMLUtil.readerToString(reader);
xml = XMLUtil.replaceSystemProps(xml);
Element e = org.hornetq.utils.XMLUtil.stringToElement(xml);
-
+
FileConfigurationParser parser = new FileConfigurationParser();
-
+
// https://jira.jboss.org/browse/HORNETQ-478 - We only want to validate AIO when
// starting the server
// and we don't want to do it when deploying hornetq-queues.xml which uses the same parser and XML format
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/spi/core/remoting/ConnectorFactory.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/spi/core/remoting/ConnectorFactory.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/spi/core/remoting/ConnectorFactory.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -28,7 +28,7 @@
public interface ConnectorFactory
{
/**
- * creates a new instanc of a connector.
+ * creates a new instance of a connector.
*
* @param configuration the configuration
* @param handler the handler
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -38,24 +38,27 @@
/**
*
- * A TypedProperties
- *
+ * Property Value Conversion.
+ * <p>
+ * This implementation follows section 3.5.4 of the <i>Java Message Service<i>
+ * specification (Version 1.1 April 12, 2002).
+ * <p>
* TODO - should have typed property getters and do conversions herein
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
- *
+ * @see <i>Java Message Service<i> specification (Version 1.1 April 12, 2002), section 3.5.4.
*/
public class TypedProperties
{
private static final Logger log = Logger.getLogger(TypedProperties.class);
-
+
private static final SimpleString HQ_PROPNAME = new SimpleString("_HQ_");
private Map<SimpleString, PropertyValue> properties;
private volatile int size;
-
+
private boolean internalProperties;
public TypedProperties()
@@ -76,7 +79,7 @@
properties = other.properties == null ? null : new HashMap<SimpleString, PropertyValue>(other.properties);
size = other.size;
}
-
+
public boolean hasInternalProperties()
{
return internalProperties;
@@ -354,19 +357,17 @@
public Float getFloatProperty(final SimpleString key) throws PropertyConversionException
{
Object value = doGetProperty(key);
-
+ if (value == null)
+ return Float.valueOf(null);
if (value instanceof Float)
{
return ((Float)value).floatValue();
}
- else if (value instanceof SimpleString)
+ if (value instanceof SimpleString)
{
return Float.parseFloat(((SimpleString)value).toString());
}
- else
- {
- throw new PropertyConversionException("Invalid conversion " + key);
- }
+ throw new PropertyConversionException("Invalid conversion: " + key);
}
public SimpleString getSimpleStringProperty(final SimpleString key) throws PropertyConversionException
@@ -414,10 +415,7 @@
{
return new SimpleString(value.toString());
}
- else
- {
- throw new PropertyConversionException("Invalid conversion");
- }
+ throw new PropertyConversionException("Invalid conversion");
}
public Object removeProperty(final SimpleString key)
@@ -430,10 +428,10 @@
if (size == 0)
{
return false;
-
+
}
else
- {
+ {
return properties.containsKey(key);
}
}
@@ -442,7 +440,7 @@
{
if (size == 0)
{
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
else
{
@@ -461,7 +459,7 @@
else
{
int numHeaders = buffer.readInt();
-
+
properties = new HashMap<SimpleString, PropertyValue>(numHeaders);
size = 0;
@@ -619,7 +617,7 @@
{
internalProperties = true;
}
-
+
PropertyValue oldValue = properties.put(key, value);
if (oldValue != null)
{
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/utils/VersionLoader.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/utils/VersionLoader.java 2011-05-16 18:18:12 UTC (rev 10671)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/utils/VersionLoader.java 2011-05-16 20:32:09 UTC (rev 10672)
@@ -20,7 +20,6 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.version.Version;
import org.hornetq.core.version.impl.VersionImpl;
@@ -124,7 +123,7 @@
}
catch (IOException e)
{
- // if we get here then the messaging hasnt been built properly and the version.properties is skewed in some
+ // if we get here then the messaging hasn't been built properly and the version.properties is skewed in some
// way
throw new RuntimeException("unable to load " + VersionLoader.PROP_FILE_NAME, e);
}
14 years, 11 months
JBoss hornetq SVN: r10671 - in branches/Branch_2_2_EAP/tests/src/org/hornetq/tests: util and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-05-16 14:18:12 -0400 (Mon, 16 May 2011)
New Revision: 10671
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
Fixing tests
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-05-16 16:59:13 UTC (rev 10670)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingTest.java 2011-05-16 18:18:12 UTC (rev 10671)
@@ -120,7 +120,7 @@
{
locator.close();
- //super.tearDown();
+ super.tearDown();
}
public void testPreparePersistent() throws Exception
@@ -2806,6 +2806,8 @@
catch (Throwable ignored)
{
}
+
+ OperationContextImpl.clearContext();
}
}
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-05-16 16:59:13 UTC (rev 10670)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/util/UnitTestCase.java 2011-05-16 18:18:12 UTC (rev 10671)
@@ -860,6 +860,8 @@
protected void setUp() throws Exception
{
super.setUp();
+
+ OperationContextImpl.clearContext();
deleteDirectory(new File(getTestDir()));
14 years, 11 months
JBoss hornetq SVN: r10670 - trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/ssl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 12:59:13 -0400 (Mon, 16 May 2011)
New Revision: 10670
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/ssl/SSLSupportTest.java
Log:
Do not search for file at 'config'
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/ssl/SSLSupportTest.java
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/ssl/SSLSupportTest.java 2011-05-16 16:58:28 UTC (rev 10669)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/remoting/impl/ssl/SSLSupportTest.java 2011-05-16 16:59:13 UTC (rev 10670)
@@ -98,7 +98,8 @@
return;
}
- SSLSupport.createServerContext("config/hornetq.keystore", keyStorePassword, trustStorePath, trustStorePassword);
+ SSLSupport.createServerContext("hornetq.keystore", keyStorePassword,
+ trustStorePath, trustStorePassword);
}
public void testServerContextWithBadKeyStorePassword() throws Exception
14 years, 11 months
JBoss hornetq SVN: r10669 - in trunk/tests: integration-tests/src/test/resources and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 12:58:28 -0400 (Mon, 16 May 2011)
New Revision: 10669
Added:
trunk/tests/integration-tests/src/test/resources/spring-hornetq-config.xml
trunk/tests/integration-tests/src/test/resources/spring-hornetq-jms.xml
Removed:
trunk/tests/config/spring-hornetq-config.xml
trunk/tests/config/spring-hornetq-jms.xml
Log:
Files (probably) necessary by integration tests
Deleted: trunk/tests/config/spring-hornetq-config.xml
===================================================================
--- trunk/tests/config/spring-hornetq-config.xml 2011-05-16 16:57:50 UTC (rev 10668)
+++ trunk/tests/config/spring-hornetq-config.xml 2011-05-16 16:58:28 UTC (rev 10669)
@@ -1,34 +0,0 @@
-<configuration xmlns="urn:hornetq"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
-
- <persistence-enabled>false</persistence-enabled>
- <security-enabled>false</security-enabled>
- <!-- Connectors -->
-
- <connectors>
- <connector name="in-vm">
- <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
- </connector>
- </connectors>
-
- <acceptors>
- <acceptor name="in-vm">
- <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
- </acceptor>
- </acceptors>
-
- <!-- Other config -->
- <!--
- <security-settings>
- <security-setting match="#">
- <permission type="createDurableQueue" roles="guest"/>
- <permission type="deleteDurableQueue" roles="guest"/>
- <permission type="createNonDurableQueue" roles="guest"/>
- <permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
- </security-setting>
- </security-settings> -->
-
-</configuration>
Deleted: trunk/tests/config/spring-hornetq-jms.xml
===================================================================
--- trunk/tests/config/spring-hornetq-jms.xml 2011-05-16 16:57:50 UTC (rev 10668)
+++ trunk/tests/config/spring-hornetq-jms.xml 2011-05-16 16:58:28 UTC (rev 10669)
@@ -1,19 +0,0 @@
-<configuration xmlns="urn:hornetq"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
-
-</configuration>
Copied: trunk/tests/integration-tests/src/test/resources/spring-hornetq-config.xml (from rev 10668, trunk/tests/config/spring-hornetq-config.xml)
===================================================================
--- trunk/tests/integration-tests/src/test/resources/spring-hornetq-config.xml (rev 0)
+++ trunk/tests/integration-tests/src/test/resources/spring-hornetq-config.xml 2011-05-16 16:58:28 UTC (rev 10669)
@@ -0,0 +1,34 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <persistence-enabled>false</persistence-enabled>
+ <security-enabled>false</security-enabled>
+ <!-- Connectors -->
+
+ <connectors>
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+ </connectors>
+
+ <acceptors>
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ </acceptor>
+ </acceptors>
+
+ <!-- Other config -->
+ <!--
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createDurableQueue" roles="guest"/>
+ <permission type="deleteDurableQueue" roles="guest"/>
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings> -->
+
+</configuration>
Copied: trunk/tests/integration-tests/src/test/resources/spring-hornetq-jms.xml (from rev 10668, trunk/tests/config/spring-hornetq-jms.xml)
===================================================================
--- trunk/tests/integration-tests/src/test/resources/spring-hornetq-jms.xml (rev 0)
+++ trunk/tests/integration-tests/src/test/resources/spring-hornetq-jms.xml 2011-05-16 16:58:28 UTC (rev 10669)
@@ -0,0 +1,19 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+ <!--the connection factory used by the example-->
+ <connection-factory name="ConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <!--the queue used by the example-->
+ <queue name="exampleQueue">
+ <entry name="/queue/exampleQueue"/>
+ </queue>
+
+</configuration>
14 years, 11 months
JBoss hornetq SVN: r10668 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 12:57:50 -0400 (Mon, 16 May 2011)
New Revision: 10668
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Use class objects instead of hard-coding classnames
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 15:30:02 UTC (rev 10667)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 16:57:50 UTC (rev 10668)
@@ -33,6 +33,8 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
+import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -180,13 +182,13 @@
boolean result = false;
try
{
- server = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ server = SpawnedVMSupport.spawnVM(IncompatibleVersionTest.class.getCanonicalName(),
new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
"server",
serverStartedString);
Thread.sleep(2000);
- Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ Process client = SpawnedVMSupport.spawnVM(IncompatibleVersionTest.class.getCanonicalName(),
new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
"client");
@@ -216,7 +218,7 @@
{
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(false);
- conf.getAcceptorConfigurations().add(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory"));
+ conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getCanonicalName()));
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
server.start();
@@ -227,7 +229,7 @@
{
public void perform() throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"));
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
ClientSessionFactory sf = locator.createSessionFactory();
ClientSession session = sf.createSession(false, true, true);
log.info("### client: connected. server incrementingVersion = " + session.getVersion());
14 years, 11 months
JBoss hornetq SVN: r10667 - trunk/hornetq-core/src/main/java/org/hornetq/utils.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 11:30:02 -0400 (Mon, 16 May 2011)
New Revision: 10667
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/utils/TypedProperties.java
Log:
Document which are the specifications used, and revert last change.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/TypedProperties.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/TypedProperties.java 2011-05-16 15:29:31 UTC (rev 10666)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/TypedProperties.java 2011-05-16 15:30:02 UTC (rev 10667)
@@ -38,24 +38,27 @@
/**
*
- * A TypedProperties
- *
+ * Property Value Conversion.
+ * <p>
+ * This implementation follows section 3.5.4 of the <i>Java Message Service<i>
+ * specification (Version 1.1 April 12, 2002).
+ * <p>
* TODO - should have typed property getters and do conversions herein
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
- *
+ * @see <i>Java Message Service<i> specification (Version 1.1 April 12, 2002), section 3.5.4.
*/
public class TypedProperties
{
private static final Logger log = Logger.getLogger(TypedProperties.class);
-
+
private static final SimpleString HQ_PROPNAME = new SimpleString("_HQ_");
private Map<SimpleString, PropertyValue> properties;
private volatile int size;
-
+
private boolean internalProperties;
public TypedProperties()
@@ -76,7 +79,7 @@
properties = other.properties == null ? null : new HashMap<SimpleString, PropertyValue>(other.properties);
size = other.size;
}
-
+
public boolean hasInternalProperties()
{
return internalProperties;
@@ -354,19 +357,17 @@
public Float getFloatProperty(final SimpleString key) throws PropertyConversionException
{
Object value = doGetProperty(key);
-
+ if (value == null)
+ return Float.valueOf(null);
if (value instanceof Float)
{
return ((Float)value).floatValue();
}
- else if (value instanceof SimpleString)
+ if (value instanceof SimpleString)
{
return Float.parseFloat(((SimpleString)value).toString());
}
- else
- {
- throw new PropertyConversionException("Invalid conversion: " + key);
- }
+ throw new PropertyConversionException("Invalid conversion: " + key);
}
public SimpleString getSimpleStringProperty(final SimpleString key) throws PropertyConversionException
@@ -414,10 +415,7 @@
{
return new SimpleString(value.toString());
}
- else
- {
- throw new PropertyConversionException("Invalid conversion");
- }
+ throw new PropertyConversionException("Invalid conversion");
}
public Object removeProperty(final SimpleString key)
@@ -430,10 +428,10 @@
if (size == 0)
{
return false;
-
+
}
else
- {
+ {
return properties.containsKey(key);
}
}
@@ -442,7 +440,7 @@
{
if (size == 0)
{
- return Collections.EMPTY_SET;
+ return Collections.emptySet();
}
else
{
@@ -461,7 +459,7 @@
else
{
int numHeaders = buffer.readInt();
-
+
properties = new HashMap<SimpleString, PropertyValue>(numHeaders);
size = 0;
@@ -619,7 +617,7 @@
{
internalProperties = true;
}
-
+
PropertyValue oldValue = properties.put(key, value);
if (oldValue != null)
{
14 years, 11 months
JBoss hornetq SVN: r10666 - in trunk/hornetq-core/src/main/java/org/hornetq: spi/core/remoting and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 11:29:31 -0400 (Mon, 16 May 2011)
New Revision: 10666
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java
trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/ConnectorFactory.java
trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java
Log:
clean up & spell fixes
Modified: trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java 2011-05-16 10:37:38 UTC (rev 10665)
+++ trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java 2011-05-16 15:29:31 UTC (rev 10666)
@@ -23,18 +23,18 @@
* A ServerLocator
*
* @author Tim Fox
- *
- *
*/
public interface ServerLocator
{
-
- /**
- * This method will disable any checks when a GarbageCollection happens leaving connections open.
- * The JMS Layer will make specific usage of this method, since the ConnectionFactory.finalize should release this.
- *
- * Warn: You may leave resources unnatended if you call this method and don't take care of cleaning the resources yourself.
- */
+
+ /**
+ * This method will disable any checks when a GarbageCollection happens
+ * leaving connections open. The JMS Layer will make specific usage of this
+ * method, since the ConnectionFactory.finalize should release this.
+ *
+ * Warning: You may leave resources unattended if you call this method and
+ * don't take care of cleaning the resources yourself.
+ */
void disableFinalizeCheck();
/**
@@ -244,20 +244,26 @@
*/
void setProducerMaxRate(int producerMaxRate);
- /**
- * Returns whether consumers created through this factory will block while sending message acknowledgements or do it asynchronously.
- *
- * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
- *
- * @return whether consumers will block while sending message acknowledgements or do it asynchronously
- */
+ /**
+ * Returns whether consumers created through this factory will block while
+ * sending message acknowledgments or do it asynchronously.
+ *
+ * Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
+ *
+ * @return whether consumers will block while sending message
+ * acknowledgments or do it asynchronously
+ */
boolean isBlockOnAcknowledge();
- /**
- * Sets whether consumers created through this factory will block while sending message acknowledgements or do it asynchronously.
- *
- * @param blockOnAcknowledge <code>true</code> to block when sending message acknowledgements or <code>false</code> to send them asynchronously
- */
+ /**
+ * Sets whether consumers created through this factory will block while
+ * sending message acknowledgments or do it asynchronously.
+ *
+ * @param blockOnAcknowledge
+ * <code>true</code> to block when sending message
+ * acknowledgments or <code>false</code> to send them
+ * asynchronously
+ */
void setBlockOnAcknowledge(boolean blockOnAcknowledge);
/**
@@ -341,30 +347,34 @@
*/
boolean isPreAcknowledge();
- /**
- * Sets to <code>true</code> to pre-acknowledge consumed messages on the server before they are sent to consumers, else set to <code>false</code> to let
- * clients acknowledge the message they consume.
- *
- * @param preAcknowledge <code>true</code> to enable pre-acknowledgement, <code>false</code> else
- */
+ /**
+ * Sets to <code>true</code> to pre-acknowledge consumed messages on the
+ * server before they are sent to consumers, else set to <code>false</code>
+ * to let clients acknowledge the message they consume.
+ *
+ * @param preAcknowledge
+ * <code>true</code> to enable pre-acknowledgment,
+ * <code>false</code> else
+ */
void setPreAcknowledge(boolean preAcknowledge);
- /**
- * Returns the acknowledgements batch size.
- *
- * Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}.
- *
- * @return the acknowledgements batch size
- */
+ /**
+ * Returns the acknowledgments batch size.
+ *
+ * Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}.
+ *
+ * @return the acknowledgments batch size
+ */
int getAckBatchSize();
- /**
- * Sets the acknowledgements batch size.
- *
- * Value must be equal or greater than 0.
- *
- * @param ackBatchSize acknowledgements batch size
- */
+ /**
+ * Sets the acknowledgments batch size.
+ *
+ * Value must be equal or greater than 0.
+ *
+ * @param ackBatchSize
+ * acknowledgments batch size
+ */
void setAckBatchSize(int ackBatchSize);
/**
Modified: trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/ConnectorFactory.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/ConnectorFactory.java 2011-05-16 10:37:38 UTC (rev 10665)
+++ trunk/hornetq-core/src/main/java/org/hornetq/spi/core/remoting/ConnectorFactory.java 2011-05-16 15:29:31 UTC (rev 10666)
@@ -28,7 +28,7 @@
public interface ConnectorFactory
{
/**
- * creates a new instanc of a connector.
+ * creates a new instance of a connector.
*
* @param configuration the configuration
* @param handler the handler
Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java 2011-05-16 10:37:38 UTC (rev 10665)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java 2011-05-16 15:29:31 UTC (rev 10666)
@@ -20,7 +20,6 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.version.Version;
import org.hornetq.core.version.impl.VersionImpl;
@@ -124,7 +123,7 @@
}
catch (IOException e)
{
- // if we get here then the messaging hasnt been built properly and the version.properties is skewed in some
+ // if we get here then the messaging hasn't been built properly and the version.properties is skewed in some
// way
throw new RuntimeException("unable to load " + VersionLoader.PROP_FILE_NAME, e);
}
14 years, 11 months
JBoss hornetq SVN: r10665 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 06:37:38 -0400 (Mon, 16 May 2011)
New Revision: 10665
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Fix tests.
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 10:37:00 UTC (rev 10664)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 10:37:38 UTC (rev 10665)
@@ -14,14 +14,10 @@
package org.hornetq.tests.integration.client;
import static org.hornetq.tests.util.RandomUtil.randomString;
-import org.hornetq.tests.util.SpawnedVMSupport;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
@@ -37,20 +33,18 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.version.impl.VersionImpl;
import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.util.SpawnedVMSupport;
import org.hornetq.utils.VersionLoader;
/**
* A IncompatibleVersionTest
*
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
- *
- *
*/
public class IncompatibleVersionTest extends ServiceTestBase
{
@@ -87,9 +81,7 @@
protected void tearDown() throws Exception
{
connection.destroy();
-
locator.close();
-
server.stop();
}
@@ -181,7 +173,8 @@
prop.load(in);
prop.setProperty("hornetq.version.compatibleVersionList", verList);
prop.setProperty("hornetq.version.incrementingVersion", Integer.toString(ver));
- prop.store(new FileOutputStream("tests/tmpfiles/" + propFileName), null);
+ FileOutputStream out = new FileOutputStream("target/" + propFileName);
+ prop.store(out, null);
Process server = null;
boolean result = false;
14 years, 11 months
JBoss hornetq SVN: r10664 - trunk/.settings.
by do-not-reply@jboss.org
Author: borges
Date: 2011-05-16 06:37:00 -0400 (Mon, 16 May 2011)
New Revision: 10664
Removed:
trunk/.settings/org.eclipse.ltk.core.refactoring.prefs
Log:
Remove checked in Eclipse file (configuration is being generated)
Deleted: trunk/.settings/org.eclipse.ltk.core.refactoring.prefs
===================================================================
--- trunk/.settings/org.eclipse.ltk.core.refactoring.prefs 2011-05-16 10:36:36 UTC (rev 10663)
+++ trunk/.settings/org.eclipse.ltk.core.refactoring.prefs 2011-05-16 10:37:00 UTC (rev 10664)
@@ -1,3 +0,0 @@
-#Wed Sep 17 15:45:12 BST 2008
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
14 years, 11 months