Author: timfox
Date: 2009-10-09 08:26:24 -0400 (Fri, 09 Oct 2009)
New Revision: 8075
Modified:
trunk/build-hornetq.xml
trunk/docs/user-manual/en/configuration-index.xml
trunk/docs/user-manual/en/configuring-transports.xml
trunk/docs/user-manual/en/management.xml
trunk/docs/user-manual/en/queue-attributes.xml
trunk/docs/user-manual/en/send-guarantees.xml
trunk/src/config/common/schema/hornetq-configuration.xsd
trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java
trunk/src/main/org/hornetq/core/server/ServerMessage.java
trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
Log:
some docs changes plus set block on persistent and non transactional to default to true
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2009-10-09 02:45:05 UTC (rev 8074)
+++ trunk/build-hornetq.xml 2009-10-09 12:26:24 UTC (rev 8075)
@@ -569,6 +569,7 @@
<target name="jar"
depends="jar-core, jar-core-client, jar-jms, jar-jms-client,
jar-transports, jar-jboss-integration, jar-bootstrap, jar-logging, jar-ra, jar-mc,
jar-jnp-client">
</target>
+
<target name="jar-jnp-client" depends="init">
<jar jarfile="${build.jars.dir}/${jnp.client.jar.name}">
<zipfileset src="${org.jboss.naming.lib}/jnpserver.jar">
Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml 2009-10-09 02:45:05 UTC (rev 8074)
+++ trunk/docs/user-manual/en/configuration-index.xml 2009-10-09 12:26:24 UTC (rev 8075)
@@ -195,7 +195,7 @@
<entry>Boolean</entry>
<entry>if true wait for non transaction data to be
synced to the journal
before returning response to client.</entry>
- <entry>false</entry>
+ <entry>true</entry>
</row>
<row>
<entry><link
linkend="configuring.message.journal.journal-type"
@@ -213,9 +213,10 @@
</row>
<row>
<entry><link
linkend="management.jmx.configuration"
- >jmx-domain</link></entry>
+ >jmx-domain</link></entry>
<entry>String</entry>
- <entry>the JMX domain used to registered HornetQ MBeans
in the MBeanServer</entry>
+ <entry>the JMX domain used to registered HornetQ MBeans
in the
+ MBeanServer</entry>
<entry>org.hornetq</entry>
</row>
<row>
@@ -842,7 +843,7 @@
connection-factory.block-on-persistent-send</link></entry>
<entry>Boolean</entry>
<entry>whether or not persistent messages are sent
synchronously</entry>
- <entry>false</entry>
+ <entry>true</entry>
</row>
<row>
<entry>connection-factory.call-timeout</entry>
Modified: trunk/docs/user-manual/en/configuring-transports.xml
===================================================================
--- trunk/docs/user-manual/en/configuring-transports.xml 2009-10-09 02:45:05 UTC (rev
8074)
+++ trunk/docs/user-manual/en/configuring-transports.xml 2009-10-09 12:26:24 UTC (rev
8075)
@@ -204,7 +204,9 @@
name or IP address to connect to (when configuring a connector)
or to listen
on (when configuring an acceptor). The default value for this
property is
<literal>localhost</literal>. When configuring
acceptors, multiple hosts
- or IP addresses can be specified by separating them with
commas.</para>
+ or IP addresses can be specified by separating them with commas.
It's not
+ valid to specify multiple addresses when specifying the host for
a
+ connector; a connector makes a connection to one specific
address.</para>
<note>
<para>Don't forget to specify a host name or ip
address! If you want your
server able to accept connections from other nodes you must
specify a
@@ -212,6 +214,11 @@
incoming connections. The default is localhost which of
course is not
accessible from remote nodes!</para>
</note>
+ <note>
+ <para>Although an address 0.0.0.0 is sometimes used by
other systems to mean
+ "bind to all available addresses", this is not a
valid address for a
+ Netty acceptor to bind to.</para>
+ </note>
</listitem>
<listitem>
<para><literal>hornetq.remoting.netty.port</literal>. This specified the
port to
Modified: trunk/docs/user-manual/en/management.xml
===================================================================
--- trunk/docs/user-manual/en/management.xml 2009-10-09 02:45:05 UTC (rev 8074)
+++ trunk/docs/user-manual/en/management.xml 2009-10-09 12:26:24 UTC (rev 8075)
@@ -76,8 +76,8 @@
<itemizedlist>
<listitem>
<para>Listing, creating, deploying and destroying
queues</para>
- <para>A list of deployed core queues can be retrieved using the
- <literal>getQueueNames()</literal>
method.</para>
+ <para>A list of deployed core queues can be retrieved using the
<literal
+ >getQueueNames()</literal> method.</para>
<para>Core queues can be created or destroyed using the
management operations
<literal>createQueue()</literal> or
<literal>deployQueue()</literal> or
<literal>destroyQueue()</literal>)on the <literal
@@ -88,6 +88,13 @@
<literal>deployQueue</literal> will do
nothing.</para>
</listitem>
<listitem>
+ <para>Pausing and resuming Queues</para>
+ <para>The <literal>QueueControl</literal> can pause
and resume the underlying
+ queue. When a queue is paused, it will receive messages but will not
deliver
+ them. When it's resumed, it'll begin delivering the queued
messages, if any.
+ </para>
+ </listitem>
+ <listitem>
<para>Listing and closing remote connections</para>
<para>Client's remote addresses can be retrieved using
<literal
listRemoteAddresses()</literal>. It is also possible to close
the
@@ -106,9 +113,9 @@
Strings.) To commit or rollback a given prepared transaction, the
<literal
commitPreparedTransaction</literal>() or <literal
rollbackPreparedTransaction()</literal> method can be used to resolve
-
heuristic transactions. Heuristically completed transactions can be listed
using
- the
<literal>listHeuristicCommittedTransactions()</literal> and
- <literal>listHeuristicRolledBackTransactions</literal>
methods.</para>
+ heuristic transactions. Heuristically completed transactions can be
listed
+ using the
<literal>listHeuristicCommittedTransactions()</literal> and <literal
+ >listHeuristicRolledBackTransactions</literal>
methods.</para>
</listitem>
<listitem>
<para>Enabling and resetting Message counters</para>
@@ -177,9 +184,10 @@
<para>Messages can also be removed from the queue by using the
<literal
removeMessages()</literal> method which returns a <literal
boolean</literal> for the single message ID variant or the number of
-
removed messages for the filter variant. The
<literal>removeMessages()</literal>
- method takes a <literal>filter</literal> argument to
remove only filtered messages. Setting
- the filter to an empty string will in effect remove all
messages.</para>
+ removed messages for the filter variant. The <literal
+ >removeMessages()</literal> method takes a
<literal>filter</literal>
+ argument to remove only filtered messages. Setting the filter to an
empty
+ string will in effect remove all messages.</para>
</listitem>
<listitem>
<para>Counting messages</para>
@@ -211,12 +219,12 @@
if it was created with one,
<literal>isDurable()</literal> to know wether the
queue is durable or not, etc.)</para>
</listitem>
- <listitem>
+ <listitem>
<para>Pausing and resuming Queues</para>
- <para>The <literal>QueueControl</literal> can pause
and resume the underlying queue.
- When a queue is paused, it will receive messages but will not deliver them. When
it's resume, it'll begin
- delivering the queued messages, if any.
- </para>
+ <para>The <literal>QueueControl</literal> can pause
and resume the underlying
+ queue. When a queue is paused, it will receive messages but will not
deliver
+ them. When it's resume, it'll begin delivering the queued
messages, if any.
+ </para>
</listitem>
</itemizedlist>
</section>
@@ -310,8 +318,8 @@
<itemizedlist>
<listitem>
<para>Listing, creating, destroying connection
factories</para>
- <para>Names of the deployed connection factories can be retrieved
by the
- <literal>getConnectionFactoryNames()</literal> method.</para>
+ <para>Names of the deployed connection factories can be retrieved
by the <literal
+ >getConnectionFactoryNames()</literal>
method.</para>
<para>JMS connection factories can be created or destroyed using
the <literal
createConnectionFactory()</literal> methods or <literal
destroyConnectionFactory()</literal> methods. These connection factories
@@
-328,8 +336,8 @@
</listitem>
<listitem>
<para>Listing, creating, destroying queues</para>
- <para>Names of the deployed JMS queues can be retrieved by the
- <literal>getQueueNames()</literal> method.</para>
+ <para>Names of the deployed JMS queues can be retrieved by the
<literal
+ >getQueueNames()</literal> method.</para>
<para>JMS queues can be created or destroyed using the
<literal
createQueue()</literal> methods or
<literal>destroyQueue()</literal>
methods. These
queues are bound to JNDI so that JMS clients can look them
@@ -337,8 +345,8 @@
</listitem>
<listitem>
<para>Listing, creating/destroying topics</para>
- <para>Names of the deployed topics can be retrieved by the
- <literal>getTopicNames()</literal> method.</para>
+ <para>Names of the deployed topics can be retrieved by the
<literal
+ >getTopicNames()</literal> method.</para>
<para>JMS topics can be created or destroyed using the
<literal
createTopic()</literal> or
<literal>destroyTopic()</literal> methods. These
topics are bound to JNDI so that JMS clients can look them up</para>
@@ -407,10 +415,10 @@
<para>Messages can also be removed from the queue by using the
<literal
removeMessages()</literal> method which returns a <literal
boolean</literal> for the single message ID variant or the number of
-
removed messages for the filter variant.
- The <literal>removeMessages()</literal>
- method takes a <literal>filter</literal> argument to
remove only filtered messages. Setting
- the filter to an empty string will in effect remove all
messages.</para>
+ removed messages for the filter variant. The <literal
+ >removeMessages()</literal> method takes a
<literal>filter</literal>
+ argument to remove only filtered messages. Setting the filter to an
empty
+ string will in effect remove all messages.</para>
</listitem>
<listitem>
<para>Counting messages</para>
@@ -440,12 +448,12 @@
is temporary or not, <literal>isDurable()</literal> to
know wether the queue is
durable or not, etc.)</para>
</listitem>
- <listitem>
+ <listitem>
<para>Pausing and resuming queues</para>
- <para>The <literal>JMSQueueControl</literal> can
pause and resume the underlying queue.
- When the queue is paused it will continue to receive messages but will not deliver
them.
- When resumed again it will deliver the enqueued messages, if any.
- </para>
+ <para>The <literal>JMSQueueControl</literal> can
pause and resume the underlying
+ queue. When the queue is paused it will continue to receive messages
but will
+ not deliver them. When resumed again it will deliver the enqueued
messages, if
+ any. </para>
</listitem>
</itemizedlist>
</section>
@@ -519,10 +527,10 @@
Java Management guide</ulink> to configure the server for remote
management (system
properties must be set in
<literal>run.sh</literal> or <literal>run.bat</literal>
scripts).</para>
- <para>By default, HornetQ server uses the JMX domain
"org.hornetq". To manage several HornetQ servers
- from the <emphasis>same</emphasis> MBeanServer, the JMX domain
can be configured for each individual
- HornetQ server by setting <literal>jmx-domain</literal> in
<literal>hornetq-configuration.xml</literal>:
- </para>
+ <para>By default, HornetQ server uses the JMX domain
"org.hornetq". To manage several
+ HornetQ servers from the <emphasis>same</emphasis> MBeanServer,
the JMX domain can be
+ configured for each individual HornetQ server by setting
<literal>jmx-domain</literal>
+ in <literal>hornetq-configuration.xml</literal>: </para>
<programlisting>
<!-- use a specific JMX domain for HornetQ MBeans -->
<jmx-domain>my.org.hornetq</jmx-domain>
Modified: trunk/docs/user-manual/en/queue-attributes.xml
===================================================================
--- trunk/docs/user-manual/en/queue-attributes.xml 2009-10-09 02:45:05 UTC (rev 8074)
+++ trunk/docs/user-manual/en/queue-attributes.xml 2009-10-09 12:26:24 UTC (rev 8075)
@@ -86,9 +86,9 @@
</section>
<section id="queue-attributes.address-settings">
<title>Configuring Queues Via Address Settings</title>
- <para>There are some attributes that are defined against a queue rather
than a specific
- queue. Here an example of an <literal>address-setting</literal>
entry that would be
- found in the <literal>hornetq-configuration.xml</literal>
file.</para>
+ <para>There are some attributes that are defined against an address
wildcard rather than a
+ specific queue. Here an example of an
<literal>address-setting</literal> entry that
+ would be found in the
<literal>hornetq-configuration.xml</literal> file.</para>
<programlisting><address-settings>
<address-setting match="jms.queue.exampleQueue">
<dead-letter-address>jms.queue.deadLetterQueue</dead-letter-address>
@@ -100,9 +100,17 @@
<max-size-bytes>100000</max-size-bytes>
<page-size-bytes>20000</page-size-bytes>
<redistribution-delay>0</redistribution-delay>
+ <send-to-dla-on-no-route>true</send-to-dla-on-no-route>
</address-setting>
</address-settings></programlisting>
- <para>These are explained fully throughout the user manual, howvere here is
a brief
+ <para>The idea with address settings, is you can provide a block of
settings which will be
+ applied against any adresses that match the string in the
<literal>match</literal> attribute. In the
+ above example the settings would only be applied to any addresses which
exactly match
+ the address <literal>jms.queue.exampleQueue</literal>, but you
can also use wildcards to apply sets of
+ configuration against many addresses. The wildcard syntax used is described
<link linkend="wildcard-syntax">here</link>.</para>
+ <para>For example, if you used the <literal>match</literal>
string <literal>jms.queue.#</literal> the settings would be applied
+ to all addresses which start with <literal>jms.queue.</literal> which
would be all JMS queues.</para>
+ <para>The meaning of the specific settings are explained fully throughout
the user manual, however here is a brief
description with a link to the appropriate chapter if available.
</para>
<para><literal>max-delivery-attempts</literal> defines how many
time a cancelled message can
be redelivered before sending to the
<literal>dead-letter-address</literal>. A full
@@ -115,7 +123,7 @@
see <link
linkend="message-expiry.configuring">here</link>.</para>
<para><literal>last-value-queue</literal> defines whether a
queue only uses last values or
not. see <link
linkend="last-value-queues">here</link>.</para>
- <para><literal>distribution-policy-class</literal> define the
class to use for distribution
+ <para><literal>distribution-policy-class</literal> defines the
class to use for distribution
of messages by a queue to consumers. By default this is <literal
org.hornetq.core.server.impl.RoundRobinDistributor</literal>.</para>
<para><literal>max-size-bytes</literal> and
<literal>page-size-bytes</literal> are used to
@@ -123,5 +131,9 @@
<para><literal>redistribution-delay</literal> defines how long
to wait when the last
consumer is closed on a queue before redistributing any messages. see
<link
linkend="clusters.message-redistribution">here</link>.</para>
+ <para><literal>send-to-dla-on-no-route</literal>. If a message
is sent to an address, but the server does not route it to any queues,
+ for example, there might be no queues bound to that address, or none of the
queues have filters that match, then normally that message
+ would be discarded. However if this parameter is set to true for that address, if
the message is not routed to any queues it will instead
+ be sent to the dead letter address (DLA) for that address, if it
exists.</para>
</section>
</chapter>
Modified: trunk/docs/user-manual/en/send-guarantees.xml
===================================================================
--- trunk/docs/user-manual/en/send-guarantees.xml 2009-10-09 02:45:05 UTC (rev 8074)
+++ trunk/docs/user-manual/en/send-guarantees.xml 2009-10-09 12:26:24 UTC (rev 8075)
@@ -50,7 +50,7 @@
<para><literal>BlockOnPersistentSend</literal>. If this
is set to <literal
true</literal> then all calls to send for persistent messages on
non
transacted sessions will block until the message has
reached the server, and a
- response has been sent back. The default value is
<literal>false</literal>.
+ response has been sent back. The default value is
<literal>true</literal>.
</para>
</listitem>
<listitem>
@@ -85,7 +85,7 @@
journal-sync-non-transactional</literal> is set to
<literal>true</literal> the
server will not send a response
back to the client until the message has been persisted
and the server has a guarantee that the data has been persisted to disk. The
default
- value for this parameter is
<literal>false</literal>.</para>
+ value for this parameter is
<literal>true</literal>.</para>
</section>
<section id="send-guarantees.nontrans.acks">
<title>Guarantees of Non Transactional Acknowledgements</title>
Modified: trunk/src/config/common/schema/hornetq-configuration.xsd
===================================================================
--- trunk/src/config/common/schema/hornetq-configuration.xsd 2009-10-09 02:45:05 UTC (rev
8074)
+++ trunk/src/config/common/schema/hornetq-configuration.xsd 2009-10-09 12:26:24 UTC (rev
8075)
@@ -450,6 +450,8 @@
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0"
name="redistribution-delay" type="xsd:long">
</xsd:element>
+ <xsd:element maxOccurs="1" minOccurs="0"
name="send-to-dla-on-no-route" type="boolean">
+ </xsd:element>
</xsd:all>
<xsd:attribute name="match" type="xsd:string"
use="required"/>
</xsd:complexType>
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-10-09
02:45:05 UTC (rev 8074)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2009-10-09
12:26:24 UTC (rev 8075)
@@ -79,7 +79,7 @@
public static final boolean DEFAULT_BLOCK_ON_ACKNOWLEDGE = false;
- public static final boolean DEFAULT_BLOCK_ON_PERSISTENT_SEND = false;
+ public static final boolean DEFAULT_BLOCK_ON_PERSISTENT_SEND = true;
public static final boolean DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND = false;
Modified: trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2009-10-09 02:45:05
UTC (rev 8074)
+++ trunk/src/main/org/hornetq/core/config/impl/ConfigurationImpl.java 2009-10-09 12:26:24
UTC (rev 8075)
@@ -89,7 +89,7 @@
public static final boolean DEFAULT_JOURNAL_SYNC_TRANSACTIONAL = true;
- public static final boolean DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL = false;
+ public static final boolean DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL = true;
public static final int DEFAULT_JOURNAL_FILE_SIZE = 10485760;
Modified: trunk/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java
===================================================================
--- trunk/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java 2009-10-09
02:45:05 UTC (rev 8074)
+++ trunk/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java 2009-10-09
12:26:24 UTC (rev 8075)
@@ -28,7 +28,6 @@
public class AddressSettingsDeployer extends XmlDeployer
{
private static final Logger log = Logger.getLogger(AddressSettingsDeployer.class);
-
private static final String DEAD_LETTER_ADDRESS_NODE_NAME =
"dead-letter-address";
@@ -51,6 +50,8 @@
private static final String LVQ_NODE_NAME = "last-value-queue";
private static final String REDISTRIBUTION_DELAY_NODE_NAME =
"redistribution-delay";
+
+ private static final String SEND_TO_DLA_ON_NO_ROUTE =
"send-to-dla-on-no-route";
private final HierarchicalRepository<AddressSettings>
addressSettingsRepository;
@@ -139,6 +140,10 @@
{
addressSettings.setRedistributionDelay(Long.valueOf(child.getTextContent().trim()));
}
+ else if (SEND_TO_DLA_ON_NO_ROUTE.equalsIgnoreCase(child.getNodeName()))
+ {
+
addressSettings.setSendToDLAOnNoRoute(Boolean.valueOf(child.getTextContent().trim()));
+ }
}
addressSettingsRepository.addMatch(match, addressSettings);
Modified: trunk/src/main/org/hornetq/core/server/ServerMessage.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/ServerMessage.java 2009-10-09 02:45:05 UTC (rev
8074)
+++ trunk/src/main/org/hornetq/core/server/ServerMessage.java 2009-10-09 12:26:24 UTC (rev
8075)
@@ -53,6 +53,5 @@
ServerMessage makeCopyForExpiryOrDLA(long newID, boolean expiry) throws Exception;
- void setOriginalHeaders(ServerMessage other, boolean expiry);
-
+ void setOriginalHeaders(ServerMessage other, boolean expiry);
}
Modified: trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2009-10-09
02:45:05 UTC (rev 8074)
+++ trunk/src/main/org/hornetq/core/server/cluster/impl/BridgeImpl.java 2009-10-09
12:26:24 UTC (rev 8075)
@@ -642,6 +642,7 @@
csf.setRetryInterval(retryInterval);
csf.setRetryIntervalMultiplier(retryIntervalMultiplier);
csf.setReconnectAttempts(reconnectAttempts);
+ csf.setBlockOnPersistentSend(false);
// Session is pre-acknowledge
session = (ClientSessionInternal)csf.createSession(clusterUser, clusterPassword,
false, true, true, true, 1);