[hornetq-commits] JBoss hornetq SVN: r9149 - in trunk: src/main/org/hornetq/ra/inflow and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Apr 22 10:57:33 EDT 2010
Author: jmesnil
Date: 2010-04-22 10:57:31 -0400 (Thu, 22 Apr 2010)
New Revision: 9149
Modified:
trunk/docs/user-manual/en/appserver-integration.xml
trunk/docs/user-manual/en/configuration-index.xml
trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-326: Improve documentation on configuring MDBs and resource adapter
* update Resource Adapter configuration documentation
* removed MinSession and MaxMessages properties from HornetQActivationSpec (but kept setters for backwards compatibility)
Modified: trunk/docs/user-manual/en/appserver-integration.xml
===================================================================
--- trunk/docs/user-manual/en/appserver-integration.xml 2010-04-22 13:33:30 UTC (rev 9148)
+++ trunk/docs/user-manual/en/appserver-integration.xml 2010-04-22 14:57:31 UTC (rev 9149)
@@ -371,18 +371,21 @@
</listitem>
</orderedlist>
<section>
- <title>Adapter Global properties</title>
+ <title>Global Properties</title>
<para>The first element you see is <literal>resourceadapter-class</literal> which should
be left unchanged. This is the HornetQ resource adapter class.</para>
<para>After that there is a list of configuration properties. This will be where most of
the configuration is done. The first 2 configure the transport used by the adapter
- and the rest configure the connection factory itself.<note><para>All connection
- factory properties will use the defaults when not provided. This is accept
- for the <literal>reconnectAttempts</literal> which will default to -1 which
- signifies that the connection should attempt to reconnect on connection
- failure indefinately. This is only used when the adapter is configured to
- connect to a remote server as an InVM connector can never
- fail.</para></note></para>
+ and the rest configure the connection factory itself.
+ </para>
+ <note>
+ <para>All connection factory properties will use the defaults if they are not provided, except
+ for the <literal>reconnectAttempts</literal> which will default to -1. This
+ signifies that the connection should attempt to reconnect on connection
+ failure indefinitely. This is only used when the adapter is configured to
+ connect to a remote server as an InVM connector can never fail.
+ </para>
+ </note>
<para>The following table explains what each property is for.</para>
<table frame="topbot" border="2">
<title>Global Configuration Properties</title>
@@ -401,15 +404,14 @@
<row>
<entry>ConnectorClassName</entry>
<entry>String</entry>
- <entry>The Connector class name see <xref
- linkend="configuring-transports"/> for info on available
- connectors</entry>
+ <entry>The Connector class name (see <xref
+ linkend="configuring-transports"/> for more information)</entry>
</row>
<row>
<entry>ConnectionParameters</entry>
<entry>String</entry>
- <entry>The transport configuration. These values must be in the form of
- key=val;key=val; and will be specific to the connector used</entry>
+ <entry>The transport configuration. These parameters must be in the form of
+ <literal>key1=val1;key2=val2;</literal> and will be specific to the connector used</entry>
</row>
<row>
<entry>useLocalTx</entry>
@@ -417,11 +419,6 @@
<entry>True will enable local transaction optimisation.</entry>
</row>
<row>
- <entry>UseXA</entry>
- <entry>boolean</entry>
- <entry>Whether XA should be used</entry>
- </row>
- <row>
<entry>UserName</entry>
<entry>String</entry>
<entry>The user name to use when making a connection </entry>
@@ -432,174 +429,237 @@
<entry>The password to use when making a connection</entry>
</row>
<row>
- <entry>BackUpTransportType</entry>
+ <entry>BackupConnectorClassName</entry>
<entry>String</entry>
- <entry>The back up transport to use on failure.</entry>
+ <entry>The backup transport to use in case of failure of the live node</entry>
</row>
<row>
- <entry>TransportConfiguration</entry>
+ <entry>BackupConnectionParameters</entry>
<entry>String</entry>
- <entry>The back up transport configuration</entry>
+ <entry>The backup transport configuration parameters</entry>
</row>
<row>
- <entry>DiscoveryGroupAddress</entry>
+ <entry>
+ <link linkend="configuration.discovery-group.group-address">DiscoveryAddress</link></entry>
<entry>String</entry>
<entry>The discovery group address to use to autodetect a server</entry>
</row>
<row>
- <entry>DiscoveryGroupPort</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.discovery-group.group-port">DiscoveryPort</link></entry>
+ <entry>Integer</entry>
<entry>The port to use for discovery</entry>
</row>
<row>
- <entry>DiscoveryRefreshTimeout</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.discovery-group.refresh-timeout">DiscoveryRefreshTimeout</link></entry>
+ <entry>Long</entry>
<entry>The timeout, in milli seconds, to refresh.</entry>
</row>
<row>
- <entry>DiscoveryInitialWaitTimeout</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.discovery-initial-wait-timeout">
+ DiscoveryInitialWaitTimeout
+ </link>
+ </entry>
+ <entry>Long</entry>
<entry>The initial time to wait for discovery.</entry>
</row>
<row>
- <entry>LoadBalancingPolicyClassName</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.connection-load-balancing-policy-class-name">
+ ConnectionLoadBalancingPolicyClassName</link>
+ </entry>
<entry>String</entry>
<entry>The load balancing policy class to use.</entry>
</row>
<row>
- <entry>PingPeriod</entry>
- <entry>long</entry>
- <entry>The period, in milliseconds, to ping the server for
- failure.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.connection-ttl">ConnectionTTL</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>The time to live (in milliseconds) for the connection.</entry>
</row>
<row>
- <entry>ConnectionTTL</entry>
- <entry>long</entry>
- <entry>The time to live for the connection.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.call-timeout">CallTimeout</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>the call timeout (in milliseconds) for each packet sent.</entry>
</row>
<row>
- <entry>CallTimeout</entry>
- <entry>long</entry>
- <entry>the call timeout, in milli seconds, for each packet sent.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.dups-ok-batch-size">DupsOKBatchSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the batch size (in bytes) between acknowledgements when using
+ DUPS_OK_ACKNOWLEDGE mode</entry>
</row>
<row>
- <entry>DupsOKBatchSize</entry>
- <entry>integer</entry>
- <entry>The batch size of message acks to use if Dups ok is used.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.transaction-batch-size">TransactionBatchSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the batch size (in bytes) between acknowledgements when using a
+ transactional session</entry>
</row>
- </tbody>
- </tgroup>
- </table>
- <para>continued..</para>
- <informaltable frame="topbot">
- <tgroup cols="3">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <tbody>
<row>
- <entry>TransactionBatchSize</entry>
- <entry>integer</entry>
- <entry>The batch size to use for sending messages within a
- transaction</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.consumer-window-size">ConsumerWindowSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the window size (in bytes) for consumer flow control</entry>
</row>
<row>
- <entry>ConsumerWindowSize</entry>
- <entry>integer</entry>
- <entry>The window size for the consumers internal buffer.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.consumer-max-rate">ConsumerMaxRate</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the fastest rate a consumer may consume messages per second</entry>
</row>
<row>
- <entry>ConsumerMaxRate</entry>
- <entry>integer</entry>
- <entry>The max rate a consumer can receive.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.confirmation-window-size">ConfirmationWindowSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the window size (in bytes) for reattachment confirmations</entry>
</row>
<row>
- <entry>ConfirmationWindowSize</entry>
- <entry>integer</entry>
- <entry>The window size for confirmations.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.producer-max-rate">ProducerMaxRate</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the maximum rate of messages per second that can be sent</entry>
</row>
<row>
- <entry>ProducerMaxRate</entry>
- <entry>integer</entry>
- <entry>The max rate a producer can send messages.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.min-large-message-size">MinLargeMessageSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the size (in bytes) before a message is treated as large </entry>
</row>
<row>
- <entry>MinLargeMessageSize</entry>
- <entry>integer</entry>
- <entry>The size a message can be, in bytes, before it is sent as a multi
- part large message.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-acknowledge">BlockOnAcknowledge</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether or not messages are acknowledged synchronously</entry>
</row>
<row>
- <entry>BlockOnAcknowledge</entry>
- <entry>boolean</entry>
- <entry>If true then block on acknowledge of messages.</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-non-durable-send">BlockOnNonDurableSend</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether or not non-durable messages are sent synchronously</entry>
</row>
<row>
- <entry>BlockOnNonDurableSend</entry>
- <entry>boolean</entry>
- <entry>If true then block when sending non-durable messages</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-durable-send">BlockOnDurableSend</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether or not durable messages are sent synchronously</entry>
</row>
<row>
- <entry>BlockOnDurableSend</entry>
- <entry>boolean</entry>
- <entry>If true then block when sending durable messages</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.auto-group">AutoGroup</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether or not message grouping is automatically used</entry>
</row>
<row>
- <entry>AutoGroup</entry>
- <entry>boolean</entry>
- <entry>If true then auto group messages</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.pre-acknowledge">PreAcknowledge</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether messages are pre acknowledged by the server before
+ sending</entry>
</row>
<row>
- <entry>PreAcknowledge</entry>
- <entry>boolean</entry>
- <entry>Whether to pre acknowledge messages before sending to
- consumer</entry>
- </row>
- <row>
- <entry>reconnectAttempts</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.reconnect-attempts">ReconnectAttempts</link>
+ </entry>
<entry>Integer</entry>
- <entry>How attemts to try at reconnecting, default is -1</entry>
+ <entry>maximum number of retry attempts, default for the resource adpater is -1 (infinite attempts)</entry>
</row>
<row>
- <entry>RetryInterval</entry>
- <entry>long</entry>
- <entry>How long to wait , in milli seconds, before retrying a failed
- connection</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.retry-interval">RetryInterval</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>the time (in milliseconds) to retry a connection after failing</entry>
</row>
<row>
- <entry>RetryIntervalMultiplier</entry>
- <entry>double</entry>
- <entry>Used for calculating the retry interval</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.retry-interval-multiplier">RetryIntervalMultiplier</link>
+ </entry>
+ <entry>Double</entry>
+ <entry>multiplier to apply to successive retry intervals</entry>
</row>
<row>
- <entry>FailoverOnServerShutdown</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.failover-on-server-shutdown">FailoverOnServerShutdown</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>If true client will reconnect to another server if
available</entry>
</row>
<row>
- <entry>ClientID</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.client-id">ClientID</link>
+ </entry>
<entry>String</entry>
- <entry>The client ID of the connection</entry>
+ <entry>the pre-configured client ID for the connection factory</entry>
</row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.client-failure-check-period">ClientFailureCheckPeriod</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>the period (in ms) after which the client will consider the
+ connection failed after not receiving packets from the
+ server</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.use-global-pools">UseGlobalPools</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>whether or not to use a global thread pool for threads</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.scheduled-thread-pool-max-size">ScheduledThreadPoolMaxSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the size of the <emphasis>scheduled thread</emphasis> pool</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.thread-pool-max-size">ThreadPoolMaxSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>the size of the thread pool</entry>
+ </row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
</section>
<section>
- <title>Adapter Outbound configuration</title>
+ <title>Adapter Outbound Configuration</title>
<para>The outbound configuration should remain unchanged as they define connection
factories that are used by Java EE components. These Connection Factories can be
defined inside a configuration file that matches the name <literal
>*-ds.xml</literal>. You'll find a default <literal>jms-ds.xml</literal>
- configuration under the <literal>hornetq.sar</literal> directory in the Jboss AS
- deployment. The connection factories defined in the config file inherit their
+ configuration under the <literal>hornetq</literal> directory in the JBoss AS
+ deployment. The connection factories defined in this file inherit their
properties from the main <literal>ra.xml</literal> configuration but can also be
- overridden, the following example show how to define one.</para>
- <para>Please note that this configuration only applies to install the HornetQ resource
- adapter in the JBoss Application Server. If you are using another JEE application
+ overridden. The following example shows how to override them.</para>
+ <note>
+ <para>Please note that this configuration only applies when HornetQ resource adapter is installed in
+ JBoss Application Server. If you are using another JEE application
server please refer to your application servers documentation for how to do
this.</para>
+ </note>
<programlisting><tx-connection-factory>
<jndi-name>RemoteJmsXA</jndi-name>
<xa-transaction/>
@@ -618,19 +678,115 @@
<para>In this example the connection factory will be bound to JNDI with the name
<literal>RemoteJmsXA</literal> and can be looked up in the usual way using JNDI
or defined within the EJB or MDB as such:</para>
- <programlisting>@Resource(mappedName="java:RemoteJmsXA")
+ <programlisting>@Resource(mappedName="java:/RemoteJmsXA")
private ConnectionFactory connectionFactory;</programlisting>
- <para>The <literal>config-property</literal> elements are what over rides those in the
- <literal>ra.xml</literal> config. Any of the elements pertaining to the
- connection factory can be over ridden here.</para>
+ <para>The <literal>config-property</literal> elements are what overrides those in the
+ <literal>ra.xml</literal> configuration file. Any of the elements pertaining to the
+ connection factory can be overridden here.</para>
+ <para>The outbound configuration also defines additional properties in addition to the global configuration properties.</para>
+
+ <table frame="topbot" border="2">
+ <title>Outbound Configuration Properties</title>
+ <tgroup cols="3">
+ <colspec colname="c1" colnum="1"/>
+ <colspec colname="c2" colnum="2"/>
+ <colspec colname="c3" colnum="3"/>
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Property Type</entry>
+ <entry>Property Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>SessionDefaultType</entry>
+ <entry>String</entry>
+ <entry>the default session type</entry>
+ </row>
+ <row>
+ <entry>UseTryLock</entry>
+ <entry>Integer</entry>
+ <entry>try to obtain a lock within specified number of seconds. less
+ than or equal to 0 disable this functionality</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
<section>
- <title>Adapter Inbound configuration</title>
+ <title>Adapter Inbound Configuration</title>
<para>The inbound configuration should again remain unchanged. This controls what
- forwards messages onto MDB's. It is possible to override properties on the MDB by
+ forwards messages onto MDBs. It is possible to override properties on the MDB by
adding an activation configuration to the MDB itself. This could be used to
- configure the MDB to consume from a different server. The next section demonstrates
- over riding the configuration.</para>
+ configure the MDB to consume from a different server.</para>
+ <para>The inbound configuration also defines additional properties in addition to the global configuration properties.</para>
+
+ <table frame="topbot" border="2">
+ <title>Inbound Configuration Properties</title>
+ <tgroup cols="3">
+ <colspec colname="c1" colnum="1"/>
+ <colspec colname="c2" colnum="2"/>
+ <colspec colname="c3" colnum="3"/>
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Property Type</entry>
+ <entry>Property Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Destination</entry>
+ <entry>String</entry>
+ <entry>JNDI name of the destination</entry>
+ </row>
+ <row>
+ <entry>DestinationType</entry>
+ <entry>String</entry>
+ <entry>type of the destination, either <literal>javax.jms.Queue</literal> or <literal>javax.jms.Topic</literal>
+ (default is javax.jms.Queue)</entry>
+ </row>
+ <row>
+ <entry>AcknowledgeMode</entry>
+ <entry>String</entry>
+ <entry>The Acknowledgment mode, either <literal>Auto-acknowledge</literal> or <literal>Dups-ok-acknowledge</literal>
+ (default is Auto-acknowledge). <literal>AUTO_ACKNOWLEDGE</literal> and <literal>DUPS_OK_ACKNOWLEDGE</literal> are acceptable values.</entry>
+ </row>
+ <row>
+ <entry>MaxSession</entry>
+ <entry>Integer</entry>
+ <entry>Maximum number of session created by this inbound configuration (default is 15)</entry>
+ </row>
+ <row>
+ <entry>MessageSelector</entry>
+ <entry>String</entry>
+ <entry>the message selector of the consumer</entry>
+ </row>
+ <row>
+ <entry>SubscriptionDurability</entry>
+ <entry>String</entry>
+ <entry>Type of the subscription, either <literal>Durable</literal> or <literal>NonDurable</literal></entry>
+ </row>
+ <row>
+ <entry>SubscriptionName</entry>
+ <entry>String</entry>
+ <entry>Name of the subscription</entry>
+ </row>
+ <row>
+ <entry>TransactionTimeout</entry>
+ <entry>Long</entry>
+ <entry>The transaction timeout in milliseconds (default is 0, the transaction does not timeout)</entry>
+ </row>
+ <row>
+ <entry>UseJNDI</entry>
+ <entry>Boolean</entry>
+ <entry>Whether or not use JNDI to look up the destination (default is true)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
</section>
</section>
<section>
Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml 2010-04-22 13:33:30 UTC (rev 9148)
+++ trunk/docs/user-manual/en/configuration-index.xml 2010-04-22 14:57:31 UTC (rev 9149)
@@ -577,7 +577,7 @@
<entry/>
</row>
<row>
- <entry>
+ <entry id="configuration.discovery-group.group-address">
<link linkend="clusters.discovery-groups">discovery-group.group-address</link>
</entry>
<entry>String</entry>
@@ -585,7 +585,7 @@
<entry/>
</row>
<row>
- <entry>
+ <entry id="configuration.discovery-group.group-port">
<link linkend="clusters.discovery-groups">discovery-group.group-port</link>
</entry>
<entry>Integer</entry>
@@ -593,7 +593,7 @@
<entry/>
</row>
<row>
- <entry>
+ <entry id="configuration.discovery-group.refresh-timeout">
<link linkend="clusters.discovery-groups">discovery-group.refresh-timeout</link>
</entry>
<entry>Integer</entry>
@@ -984,86 +984,96 @@
</thead>
<tbody>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >connection-factory</link></entry>
+ <entry>
+ <link linkend="using-jms.server.configuration">connection-factory</link>
+ </entry>
<entry>ConnectionFactory</entry>
<entry>a list of connection factories to create and add to JNDI</entry>
<entry/>
</row>
<row>
<entry id="configuration.connection-factory.auto-group">
- <link linkend="message-grouping.jmsconfigure">connection-factory.auto-group</link></entry>
+ <link linkend="message-grouping.jmsconfigure">connection-factory.auto-group</link>
+ </entry>
<entry>Boolean</entry>
<entry>whether or not message grouping is automatically used</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="clusters.static.servers"
- >connection-factory.connectors</link></entry>
+ <entry><link linkend="clusters.static.servers">connection-factory.connectors</link>
+ </entry>
<entry>String</entry>
<entry>A list of connectors used bu the connection factory</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters.static.servers"
- >connection-factory.connectors.connector-ref.connector-name (attribute)</link></entry>
+ >connection-factory.connectors.connector-ref.connector-name (attribute)</link>
+ </entry>
<entry>String</entry>
<entry>Name of the connector to connect to the live server</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters.static.servers"
- >connection-factory.connectors.connector-ref.backup-connector-name (attribute)</link></entry>
+ >connection-factory.connectors.connector-ref.backup-connector-name (attribute)</link>
+ </entry>
<entry>String</entry>
<entry>Name of the connector to connect to the backup server</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters-discovery.groups.clientside"
- >connection-factory.discovery-group-ref.discovery-group-name (attribute)</link></entry>
+ >connection-factory.discovery-group-ref.discovery-group-name (attribute)</link>
+ </entry>
<entry>String</entry>
<entry>Name of discovery group used by this connection factory</entry>
<entry />
</row>
<row>
- <entry><link linkend="clusters-discovery.groups.clientside"
- >connection-factory.discovery-initial-wait-timeout</link></entry>
+ <entry id="configuration.connection-factory.discovery-initial-wait-timeout">
+ <link linkend="clusters-discovery.groups.clientside"
+ >connection-factory.discovery-initial-wait-timeout</link>
+ </entry>
<entry>Long</entry>
<entry>the initial time to wait (in ms) for discovery groups to wait for
broadcasts</entry>
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="send-guarantees.nontrans.acks"
- >connection-factory.block-on-acknowledge</link></entry>
+ <entry id="configuration.connection-factory.block-on-acknowledge">
+ <link linkend="send-guarantees.nontrans.acks">connection-factory.block-on-acknowledge</link>
+ </entry>
<entry>Boolean</entry>
<entry>whether or not messages are acknowledged synchronously</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="non-transactional-sends"
- >connection-factory.block-on-non-durable-send</link></entry>
+ <entry id="configuration.connection-factory.block-on-non-durable-send">
+ <link linkend="non-transactional-sends">connection-factory.block-on-non-durable-send</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not non-durable messages are sent
- synchronously</entry>
+ <entry>whether or not non-durable messages are sent synchronously</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="non-transactional-sends"
- >connection-factory.block-on-durable-send</link></entry>
+ <entry id="configuration.connection-factory.block-on-durable-send">
+ <link linkend="non-transactional-sends">connection-factory.block-on-durable-send</link>
+ </entry>
<entry>Boolean</entry>
<entry>whether or not durable messages are sent synchronously</entry>
<entry>true</entry>
</row>
<row>
- <entry>connection-factory.call-timeout</entry>
+ <entry id="configuration.connection-factory.call-timeout">connection-factory.call-timeout</entry>
<entry>Long</entry>
<entry>the timeout (in ms) for remote calls</entry>
<entry>30000</entry>
</row>
<row>
- <entry><link linkend="dead.connections"
- >connection-factory.client-failure-check-period</link></entry>
+ <entry id="configuration.connection-factory.client-failure-check-period">
+ <link linkend="dead.connections">connection-factory.client-failure-check-period</link>
+ </entry>
<entry>Long</entry>
<entry>the period (in ms) after which the client will consider the
connection failed after not receiving packets from the
@@ -1071,44 +1081,48 @@
<entry>5000</entry>
</row>
<row>
- <entry><link linkend="using-jms.clientid"
- >connection-factory.client-id</link></entry>
+ <entry id="configuration.connection-factory.client-id">
+ <link linkend="using-jms.clientid">connection-factory.client-id</link>
+ </entry>
<entry>String</entry>
<entry>the pre-configured client ID for the connection factory</entry>
<entry>null</entry>
</row>
<row>
- <entry><link linkend="clusters.client.loadbalancing"
- >connection-factory.connection-load-balancing-policy-class-name</link></entry>
+ <entry id="configuration.connection-factory.connection-load-balancing-policy-class-name">
+ <link linkend="clusters.client.loadbalancing">
+ connection-factory.connection-load-balancing-policy-class-name</link>
+ </entry>
<entry>String</entry>
<entry>the name of the load balancing class</entry>
<entry>org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy</entry>
</row>
<row>
- <entry><link linkend="dead.connections"
- >connection-factory.connection-ttl</link></entry>
+ <entry id="configuration.connection-factory.connection-ttl">
+ <link linkend="dead.connections">connection-factory.connection-ttl</link>
+ </entry>
<entry>Long</entry>
<entry>the time to live (in ms) for connections</entry>
<entry>1 * 60000</entry>
</row>
<row>
- <entry><link linkend="flow-control.rate.core.api"
- >connection-factory.consumer-max-rate</link></entry>
+ <entry id="configuration.connection-factory.consumer-max-rate">
+ <link linkend="flow-control.rate.core.api">connection-factory.consumer-max-rate</link></entry>
<entry>Integer</entry>
<entry>the fastest rate a consumer may consume messages per
second</entry>
<entry>-1</entry>
</row>
<row>
- <entry><link linkend="flow-control.core.api"
- >connection-factory.consumer-window-size</link></entry>
+ <entry id="configuration.connection-factory.consumer-window-size">
+ <link linkend="flow-control.core.api">connection-factory.consumer-window-size</link></entry>
<entry>Integer</entry>
<entry>the window size (in bytes) for consumer flow control</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="using-jms.dupsokbatchsize"
- >connection-factory.dups-ok-batch-size</link></entry>
+ <entry id="configuration.connection-factory.dups-ok-batch-size">
+ <link linkend="using-jms.dupsokbatchsize">connection-factory.dups-ok-batch-size</link></entry>
<entry>Integer</entry>
<entry>the batch size (in bytes) between acknowledgements when using
DUPS_OK_ACKNOWLEDGE mode</entry>
@@ -1122,17 +1136,17 @@
<entry>false</entry>
</row>
<row>
- <entry><link linkend="ha.automatic.failover"
- >connection-factory.failover-on-server-shutdown</link></entry>
+ <entry id="configuration.connection-factory.failover-on-server-shutdown">
+ <link linkend="ha.automatic.failover">connection-factory.failover-on-server-shutdown</link></entry>
<entry>Boolean</entry>
<entry>whether or not to failover on server shutdown</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="large-messages.core.config"
- >connection-factory.min-large-message-size</link></entry>
+ <entry id="configuration.connection-factory.min-large-message-size">
+ <link linkend="large-messages.core.config">connection-factory.min-large-message-size</link></entry>
<entry>Integer</entry>
- <entry>the size (in bytes) before a message is treated as large </entry>
+ <entry>the size (in bytes) before a message is treated as large</entry>
<entry>100 * 1024</entry>
</row>
<row>
@@ -1144,16 +1158,16 @@
<entry>false</entry>
</row>
<row>
- <entry><link linkend="pre-acknowledge.configure"
- >connection-factory.pre-acknowledge</link></entry>
+ <entry id="configuration.connection-factory.pre-acknowledge">
+ <link linkend="pre-acknowledge.configure">connection-factory.pre-acknowledge</link></entry>
<entry>Boolean</entry>
<entry>whether messages are pre acknowledged by the server before
sending</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="flow-control.producer.rate.core.api"
- >connection-factory.producer-max-rate</link></entry>
+ <entry id="configuration.connection-factory.producer-max-rate">
+ <link linkend="flow-control.producer.rate.core.api">connection-factory.producer-max-rate</link></entry>
<entry>Integer</entry>
<entry>the maximum rate of messages per second that can be sent</entry>
<entry>-1</entry>
@@ -1166,32 +1180,36 @@
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.confirmation-window-size</link></entry>
+ <entry id="configuration.connection-factory.confirmation-window-size">
+ <link linkend="client-reconnection">connection-factory.confirmation-window-size</link>
+ </entry>
<entry>Integer</entry>
<entry>the window size (in bytes) for reattachment confirmations</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.reconnect-attempts</link></entry>
+ <entry id="configuration.connection-factory.reconnect-attempts">
+ <link linkend="client-reconnection">connection-factory.reconnect-attempts</link>
+ </entry>
<entry>Integer</entry>
<entry>maximum number of retry attempts, -1 signifies infinite</entry>
<entry>0</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.retry-interval</link></entry>
+ <entry id="configuration.connection-factory.retry-interval">
+ <link linkend="client-reconnection">connection-factory.retry-interval</link>
+ </entry>
<entry>Long</entry>
<entry>the time (in ms) to retry a connection after failing</entry>
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.retry-interval-multiplier</link></entry>
+ <entry id="configuration.connection-factory.retry-interval-multiplier">
+ <link linkend="client-reconnection">connection-factory.retry-interval-multiplier</link>
+ </entry>
<entry>Double</entry>
<entry>multiplier to apply to successive retry intervals</entry>
- <entry>1d</entry>
+ <entry>1.0</entry>
</row>
<row>
<entry><link linkend="client-reconnection"
@@ -1201,30 +1219,35 @@
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.scheduled-thread-pool-max-size</link></entry>
+ <entry id="configuration.connection-factory.scheduled-thread-pool-max-size">
+ <link linkend="thread-pooling.client.side">connection-factory.scheduled-thread-pool-max-size</link>
+ </entry>
<entry>Integer</entry>
- <entry>the size of the scheduled thread pool</entry>
+ <entry>the size of the <emphasis>scheduled thread</emphasis> pool</entry>
<entry>5</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.thread-pool-max-size</link></entry>
+ <entry id="configuration.connection-factory.thread-pool-max-size">
+ <link linkend="thread-pooling.client.side">connection-factory.thread-pool-max-size</link>
+ </entry>
<entry>Integer</entry>
<entry>the size of the thread pool</entry>
<entry>-1</entry>
</row>
<row>
- <entry><link linkend="using-jms.txbatchsize"
- >connection-factory.transaction-batch-size</link></entry>
+ <entry id="configuration.connection-factory.transaction-batch-size">
+ <link linkend="using-jms.txbatchsize">
+ connection-factory.transaction-batch-size</link>
+ </entry>
<entry>Integer</entry>
<entry>the batch size (in bytes) between acknowledgements when using a
transactional session</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.use-global-pools</link></entry>
+ <entry id="configuration.connection-factory.use-global-pools">
+ <link linkend="thread-pooling.client.side">connection-factory.use-global-pools</link>
+ </entry>
<entry>Boolean</entry>
<entry>whether or not to use a global thread pool for threads</entry>
<entry>true</entry>
Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java 2010-04-22 13:33:30 UTC (rev 9148)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivation.java 2010-04-22 14:57:31 UTC (rev 9149)
@@ -27,7 +27,6 @@
import javax.resource.ResourceException;
import javax.resource.spi.endpoint.MessageEndpointFactory;
import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
import javax.resource.spi.work.WorkManager;
import org.hornetq.api.core.SimpleString;
@@ -277,7 +276,7 @@
setupCF();
setupDestination();
- for (int i = 0; i < spec.getMaxSessionInt(); i++)
+ for (int i = 0; i < spec.getMaxSession(); i++)
{
ClientSession session = null;
Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java 2010-04-22 13:33:30 UTC (rev 9148)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQActivationSpec.java 2010-04-22 14:57:31 UTC (rev 9149)
@@ -38,6 +38,8 @@
*/
public class HornetQActivationSpec extends ConnectionFactoryProperties implements ActivationSpec
{
+ private static final int DEFAULT_MAX_SESSION = 15;
+
/** The logger */
private static final Logger log = Logger.getLogger(HornetQActivationSpec.class);
@@ -76,12 +78,6 @@
/** The password */
private String password;
- /** The maximum number of messages */
- private Integer maxMessages;
-
- /** The minimum number of sessions */
- private Integer minSession;
-
/** The maximum number of sessions */
private Integer maxSession;
@@ -116,9 +112,7 @@
subscriptionName = null;
user = null;
password = null;
- maxMessages = 1;
- minSession = 1;
- maxSession = 15;
+ maxSession = DEFAULT_MAX_SESSION;
transactionTimeout = 0;
}
@@ -463,100 +457,6 @@
}
/**
- * Get the numer of max messages
- * @return The value
- */
- public Integer getMaxMessages()
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("getMaxMessages()");
- }
-
- return maxMessages;
- }
-
- /**
- * Set the numer of max messages
- * @param value The value
- */
- public void setMaxMessages(final Integer value)
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("setMaxMessages(" + value + ")");
- }
-
- maxMessages = value;
- }
-
- /**
- * Get the number of max messages
- * @return The value
- */
- public int getMaxMessagesInt()
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("getMaxMessagesInt()");
- }
-
- if (maxMessages == null)
- {
- return 0;
- }
-
- return maxMessages;
- }
-
- /**
- * Get the number of min session
- * @return The value
- */
- public Integer getMinSession()
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("getMinSession()");
- }
-
- return minSession;
- }
-
- /**
- * Set the number of min session
- * @param value The value
- */
- public void setMinSession(final Integer value)
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("setMinSession(" + value + ")");
- }
-
- minSession = value;
- }
-
- /**
- * Get the number of min session
- * @return The value
- */
- public int getMinSessionInt()
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("getMinSessionInt()");
- }
-
- if (minSession == null)
- {
- return 0;
- }
-
- return minSession;
- }
-
- /**
* Get the number of max session
* @return The value
*/
@@ -567,6 +467,11 @@
HornetQActivationSpec.log.trace("getMaxSession()");
}
+ if (maxSession == null)
+ {
+ return DEFAULT_MAX_SESSION;
+ }
+
return maxSession;
}
@@ -585,25 +490,6 @@
}
/**
- * Get the number of max session
- * @return The value
- */
- public int getMaxSessionInt()
- {
- if (HornetQActivationSpec.trace)
- {
- HornetQActivationSpec.log.trace("getMaxSessionInt()");
- }
-
- if (maxSession == null)
- {
- return 0;
- }
-
- return maxSession;
- }
-
- /**
* Get the transaction timeout
* @return The value
*/
@@ -734,8 +620,6 @@
{
buffer.append(" password=").append("****");
}
- buffer.append(" maxMessages=").append(maxMessages);
- buffer.append(" minSession=").append(minSession);
buffer.append(" maxSession=").append(maxSession);
buffer.append(')');
return buffer.toString();
@@ -781,6 +665,13 @@
{
}
+ public void setMinSession(final Integer value)
+ {
+ }
+ public void setMaxMessages(final Integer value)
+ {
+ }
+
}
More information about the hornetq-commits
mailing list