[jboss-cvs] JBoss Messaging SVN: r4319 - in trunk: src/config and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 28 08:14:16 EDT 2008


Author: ataylor
Date: 2008-05-28 08:14:16 -0400 (Wed, 28 May 2008)
New Revision: 4319

Modified:
   trunk/docs/userguide/en/modules/configuration.xml
   trunk/src/config/jbm-configuration.xml
   trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
   trunk/tests/config/ConfigurationTest-config.xml
   trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java
Log:
added keep alive config

Modified: trunk/docs/userguide/en/modules/configuration.xml
===================================================================
--- trunk/docs/userguide/en/modules/configuration.xml	2008-05-28 09:55:04 UTC (rev 4318)
+++ trunk/docs/userguide/en/modules/configuration.xml	2008-05-28 12:14:16 UTC (rev 4319)
@@ -91,6 +91,14 @@
          TCP -->
          <remoting-tcp-send-buffer-size>-1</remoting-tcp-send-buffer-size>
 
+         <!-- The interval to send a ping message to send to the client/server to make sure it is still alive.-->
+         <!-- Set to 0 if you want to disable this functionality-->
+         <remoting-keep-alive-interval>10000</remoting-keep-alive-interval>
+
+         <!--How long to wait for a returning pong after sending a ping message to a client/server.-->
+         <!-- If no pong is received after this time resources are cleaned up-->
+         <remoting-keep-alive-timeout>5000</remoting-keep-alive-timeout>
+
          <!--  if ssl is enabled, all remoting-ssl-* properties must be set -->
          <remoting-enable-ssl>false</remoting-enable-ssl>
 
@@ -186,16 +194,33 @@
          <listitem>
             <para>remoting-tcp-receive-buffer-size</para>
             <para>sets the TCP receive buffer size, -1 will set it to the value that the OS hints at to use. This is
-               only used when TCP transport is configured</para>
+               only used when TCP transport is configured
+            </para>
          </listitem>
          <listitem>
             <para>remoting-tcp-send-buffer-size</para>
             <para>sets the TCP send buffer size, -1 will set it to the value that the OS hints at to use. This is
-               only used when TCP transport is configured</para>
+               only used when TCP transport is configured
+            </para>
          </listitem>
          <listitem>
+            <para>remoting-keep-alive-interval</para>
+            <para>The interval, in milliseconds, at which a ping message will be sent to the client/server to make sure
+               it is still alive.
+               Setting to 0 will disable pinging
+            </para>
+         </listitem>
+         <listitem>
+            <para>remoting-keep-alive-timeout</para>
+            <para>The time, in milliseconds, to wait for a pong after a ping has ben sent to a client/server. If the
+               pong
+               isn't received after this timeout then the resources are cleaned up.
+            </para>
+         </listitem>
+         <listitem>
             <para>remoting-enable-ssl</para>
-            <para>Whether SSL is enabled for this server. If this is true then next 4 SSL properties need to be set</para>
+            <para>Whether SSL is enabled for this server. If this is true then next 4 SSL properties need to be set
+            </para>
          </listitem>
          <listitem>
             <para>remoting-ssl-keystore-path>messaging.keystore</para>
@@ -224,12 +249,15 @@
          <listitem>
             <para>journal-type</para>
             <para>The type of journal to use, valid configurations are 'asyncio','nio' and 'jdbc'. refere to the
-            'The journal based persistence approach' chapter for more detailed information</para>
+               'The journal based persistence approach' chapter for more detailed information
+            </para>
          </listitem>
          <listitem>
             <para>journal-sync</para>
-            <para>Whether or not to allow the synch to disk on commit and rollback. false will only write to the OS buffers
-            and lets the OS deal with synching</para>
+            <para>Whether or not to allow the synch to disk on commit and rollback. false will only write to the OS
+               buffers
+               and lets the OS deal with synching
+            </para>
          </listitem>
          <listitem>
             <para>journal-file-size</para>
@@ -241,11 +269,18 @@
          </listitem>
          <listitem>
             <para>journal-max-aio</para>
-            <para>Maximum pending asynchronous writes accepted by the native layer per opened file. There is a limit and the total max AIO can't be higher than /proc/sys/fs/aio-max-nr. If you are combining the usage of JBoss Messaging with other systems that are using libaio (e.g. Oracle) you might need to increase this value on the OS. This parameter is only available on AIO which is only available on Linux at the moment.</para>
+            <para>Maximum pending asynchronous writes accepted by the native layer per opened file. There is a limit and
+               the total max AIO can't be higher than /proc/sys/fs/aio-max-nr. If you are combining the usage of JBoss
+               Messaging with other systems that are using libaio (e.g. Oracle) you might need to increase this value on
+               the OS. This parameter is only available on AIO which is only available on Linux at the moment.
+            </para>
          </listitem>
          <listitem>
             <para>journal-aio-timeout</para>
-            <para>Maximum amount of time any asynchronous operation can take in milliseconds. If any operation takes more than this amount a timeout exception will be logged. This parameter is only available on AIO which is only available on Linux.</para>
+            <para>Maximum amount of time any asynchronous operation can take in milliseconds. If any operation takes
+               more than this amount a timeout exception will be logged. This parameter is only available on AIO which
+               is only available on Linux.
+            </para>
          </listitem>
          <listitem>
             <para>journal-task-period</para>
@@ -605,7 +640,8 @@
                <listitem>
                   <para>entry</para>
                   <para>The name to store the Connection Factory object in JNDI with.
-                     Multiple JNDI entries can be added.</para>
+                     Multiple JNDI entries can be added.
+                  </para>
                </listitem>
                <listitem>
                   <para>client-id</para>
@@ -652,7 +688,8 @@
                <listitem>
                   <para>entry</para>
                   <para>The name to store the Connection Factory object in JNDI with.
-                     Multiple JNDI entries can be added.</para>
+                     Multiple JNDI entries can be added.
+                  </para>
                </listitem>
             </itemizedlist>
          </listitem>
@@ -663,7 +700,8 @@
                <listitem>
                   <para>entry</para>
                   <para>The name to store the Connection Factory object in JNDI with.
-                     Multiple JNDI entries can be added.</para>
+                     Multiple JNDI entries can be added.
+                  </para>
                </listitem>
             </itemizedlist>
          </listitem>
@@ -671,8 +709,12 @@
    </section>
    <section id="configuration.beans">
       <title>The beans deployment file</title>
-      <para>This beans deployment file, usually <literal>jbm-beans.xml</literal> or <literal>jbm-standalone-beans.xml</literal>,
-         is used by the <ulink url="http://www.jboss.org/jbossmc/">JBoss Microcontainer</ulink> to bootstrap all the components needed to run a JBoss Messaging Server.
+      <para>This beans deployment file, usually
+         <literal>jbm-beans.xml</literal>
+         or<literal>jbm-standalone-beans.xml</literal>,
+         is used by the
+         <ulink url="http://www.jboss.org/jbossmc/">JBoss Microcontainer</ulink>
+         to bootstrap all the components needed to run a JBoss Messaging Server.
          For the purposes of configuring JBM it is sufficient to know that the implementation details of pluggable
          components are configured here.
       </para>
@@ -680,10 +722,14 @@
       <itemizedlist>
          <listitem>
             <para>The naming Service</para>
-            <para>This is only found in the standalone version of the beans file. When running within the App Server this
-               is not needed since it is available as its own service. This also where you can change the ports used.</para>
-            <para>It is possible to replace this with any Naming Service however only the JBoss naming provider has been tested.
-            If you do provide your own implementation remember to edit the file jndi.properties</para>
+            <para>This is only found in the standalone version of the beans file. When running within the App Server
+               this
+               is not needed since it is available as its own service. This also where you can change the ports used.
+            </para>
+            <para>It is possible to replace this with any Naming Service however only the JBoss naming provider has been
+               tested.
+               If you do provide your own implementation remember to edit the file jndi.properties
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
@@ -706,14 +752,19 @@
          class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
                ]]>
             </programlisting>
-            <para>The Configuration component is used to configure the JBM Server and transports. The default implementation,
-            <literal>FileConfiguration</literal> reads in the configuration from the file <literal>jbm-configuration.xml</literal>.
-             To replace this component your class must implement following interface: </para>
+            <para>The Configuration component is used to configure the JBM Server and transports. The default
+               implementation,
+               <literal>FileConfiguration</literal>
+               reads in the configuration from the file<literal>jbm-configuration.xml</literal>.
+               To replace this component your class must implement following interface:
+            </para>
             <programlisting>org.jboss.messaging.core.config.Configuration</programlisting>
          </listitem>
          <listitem>
             <para>The Security Manager</para>
-            <para>There are 2 Security Manager implementations available to use. In standalone the default is the following</para>
+            <para>There are 2 Security Manager implementations available to use. In standalone the default is the
+               following
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="JBMSecurityManager"
@@ -724,8 +775,11 @@
    </bean>
                ]]>
             </programlisting>
-            <para>This uses a simple security manager that also needs the following bean deployed which will read the security
-            configuration from the file <literal>jbm-security.xml</literal></para>
+            <para>This uses a simple security manager that also needs the following bean deployed which will read the
+               security
+               configuration from the file
+               <literal>jbm-security.xml</literal>
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="SecurityManagerDeployer"
@@ -751,7 +805,9 @@
          </listitem>
          <listitem>
             <para>Messaging Server Management</para>
-            <para>This exposes Server management operations via JMX. This can be removed if this functionality is not needed</para>
+            <para>This exposes Server management operations via JMX. This can be removed if this functionality is not
+               needed
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="MessagingServerManagement"
@@ -794,7 +850,8 @@
          <listitem>
             <para>The Storage Manager</para>
             <para>The Storage manager deals with the persistence of messages and bindings. For more information on this
-            refer to the chapter 'The journal based persistence approach'.</para>
+               refer to the chapter 'The journal based persistence approach'.
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="StorageManager"
@@ -849,9 +906,11 @@
          </listitem>
          <listitem>
             <para>The JMS Server Deployer</para>
-            <para>The JMS Server Deployer takes care of deploying Destinations and Connection Factories into JNDi via the
-               file <literal>jbm-jndi.xml</literal>. This can be removed if no objects are needed in JNDI or if only core
-               messaging is being used.</para>
+            <para>The JMS Server Deployer takes care of deploying Destinations and Connection Factories into JNDi via
+               the
+               file<literal>jbm-jndi.xml</literal>. This can be removed if no objects are needed in JNDI or if only core
+               messaging is being used.
+            </para>
             <programlisting>
                <![CDATA[
    <bean name="JMSServerDeployer"
@@ -867,6 +926,6 @@
             </programlisting>
          </listitem>
       </itemizedlist>
-      
+
    </section>
 </chapter>
\ No newline at end of file

Modified: trunk/src/config/jbm-configuration.xml
===================================================================
--- trunk/src/config/jbm-configuration.xml	2008-05-28 09:55:04 UTC (rev 4318)
+++ trunk/src/config/jbm-configuration.xml	2008-05-28 12:14:16 UTC (rev 4319)
@@ -1,103 +1,111 @@
 <deployment>
    <configuration>
-   
+
       <!-- TODO!! Should specify all available properties in here -->
-   
+
       <strict-tck>true</strict-tck>
-      
+
       <clustered>false</clustered>
-      
+
       <scheduled-executor-max-pool-size>30</scheduled-executor-max-pool-size>
-      
+
       <require-destinations>true</require-destinations>
-           
+
       <!-- Remoting configuration -->
-      
+
       <!-- one of: TCP, INVM                                                                     -->
-      <!-- INVM: the server is accessible only by clients in the same VM (no sockets are opened) --> 
+      <!-- INVM: the server is accessible only by clients in the same VM (no sockets are opened) -->
       <remoting-transport>TCP</remoting-transport>
-      
+
       <remoting-bind-address>5400</remoting-bind-address>
-      
+
       <remoting-host>localhost</remoting-host>
 
       <!--  timeout in milliseconds -->
       <remoting-timeout>5000</remoting-timeout>
-      
+
       <!-- true to disable invm communication when the client and the server are in the same JVM.     -->
       <!-- it is not allowed to disable invm communication when the remoting-transport is set to INVM -->
       <remoting-disable-invm>false</remoting-disable-invm>
-      
+
       <!-- Enable/Disable Nagle's Algorithm (resp. true/false)                           -->
       <!-- This setting is taken into account only when remoting-transport is set to TCP -->
       <remoting-tcp-nodelay>true</remoting-tcp-nodelay>
-      
+
       <!-- Set the TCP Receive Buffer size (SO_RCVBUF).                                    -->
-      <!-- Set it to -1 if you want to use the value hinted by the Operating System      --> 
+      <!-- Set it to -1 if you want to use the value hinted by the Operating System      -->
       <!-- This setting is taken into account only when remoting-transport is set to TCP -->
       <remoting-tcp-receive-buffer-size>32768</remoting-tcp-receive-buffer-size>
 
       <!-- Set the TCP Send Buffer size (SO_SNDBUF).                                     -->
-      <!-- Set it to -1 if you want to use the value hinted by the Operating System      --> 
+      <!-- Set it to -1 if you want to use the value hinted by the Operating System      -->
       <!-- This setting is taken into account only when remoting-transport is set to TCP -->
       <remoting-tcp-send-buffer-size>32768</remoting-tcp-send-buffer-size>
-      
+
+      <!-- The interval to send a ping message to send to the client/server to make sure it is still alive.-->
+      <!-- Set to 0 if you want to disable this functionality-->
+      <remoting-keep-alive-interval>10000</remoting-keep-alive-interval>
+
+      <!--How long to wait for a returning pong after sending a ping message to a client/server.-->
+      <!-- If no pong is received after this time resources are cleaned up-->
+      <remoting-keep-alive-timeout>5000</remoting-keep-alive-timeout>
+
       <remoting-writequeue-block-timeout>10000</remoting-writequeue-block-timeout>
-      
+
       <remoting-writequeue-minbytes>0</remoting-writequeue-minbytes>
-      
+
       <!-- Effectively disable this since we're using producer and consumer flow control -->
       <remoting-writequeue-maxbytes>100000000</remoting-writequeue-maxbytes>
-      
+
       <!--  if ssl is enabled, all remoting-ssl-* properties must be set -->
       <remoting-enable-ssl>false</remoting-enable-ssl>
-      
-      <remoting-ssl-keystore-path>messaging.keystore</remoting-ssl-keystore-path>      
-      
-      <remoting-ssl-keystore-password>secureexample</remoting-ssl-keystore-password>     
-       
-      <remoting-ssl-truststore-path>messaging.truststore</remoting-ssl-truststore-path>  
-          
-      <remoting-ssl-truststore-password>secureexample</remoting-ssl-truststore-password>    
-      
+
+      <remoting-ssl-keystore-path>messaging.keystore</remoting-ssl-keystore-path>
+
+      <remoting-ssl-keystore-password>secureexample</remoting-ssl-keystore-password>
+
+      <remoting-ssl-truststore-path>messaging.truststore</remoting-ssl-truststore-path>
+
+      <remoting-ssl-truststore-password>secureexample</remoting-ssl-truststore-password>
+
       <!-- Storage configuration -->
-                 
+
       <bindings-directory>data/bindings</bindings-directory>
-      
+
       <create-bindings-dir>true</create-bindings-dir>
-      
+
       <journal-directory>data/journal</journal-directory>
-      
+
       <create-journal-dir>true</create-journal-dir>
-      
+
       <journal-type>asyncio</journal-type>
-      
+
       <journal-sync>true</journal-sync>
-      
+
       <!-- 10 MB journal file size -->
       <journal-file-size>10485760</journal-file-size>
-      
+
       <journal-min-files>10</journal-min-files>
-      
+
       <!-- Maximum simultaneous asynchronous writes accepted by the native layer.
-           (parameter ignored on NIO) 
-            You can verify the max AIO on the OS level at /proc/sys/fs/aio_max_nr. (aio-nr will give you the current max-aio being used)
-           -->
+      (parameter ignored on NIO)
+       You can verify the max AIO on the OS level at /proc/sys/fs/aio_max_nr. (aio-nr will give you the current max-aio being used)
+      -->
       <journal-max-aio>10000</journal-max-aio>
-      
-      
+
+
       <!--  Maximum time in milliseconds an AIO operation could take.
-            This includes:
-            - closing Asynchronous files
-            - Transaction awaits
-            - Awaits on non transactional writes
-       -->
+           This includes:
+           - closing Asynchronous files
+           - Transaction awaits
+           - Awaits on non transactional writes
+      -->
       <journal-aio-timeout>60000</journal-aio-timeout>
-      
+
       <journal-task-period>5000</journal-task-period>
-      
+
       <security-enabled>true</security-enabled>
-      
+
    </configuration>
 
 </deployment>

Modified: trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java	2008-05-28 09:55:04 UTC (rev 4318)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java	2008-05-28 12:14:16 UTC (rev 4319)
@@ -21,7 +21,13 @@
    */
 package org.jboss.messaging.core.config.impl;
 
+import org.jboss.messaging.core.client.ConnectionParams;
+import org.jboss.messaging.core.remoting.TransportType;
 import static org.jboss.messaging.core.remoting.TransportType.TCP;
+import org.jboss.messaging.core.server.JournalType;
+import org.jboss.messaging.util.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 
 import java.io.InputStreamReader;
 import java.io.Reader;
@@ -29,23 +35,17 @@
 import java.net.URL;
 import java.util.ArrayList;
 
-import org.jboss.messaging.core.client.ConnectionParams;
-import org.jboss.messaging.core.remoting.TransportType;
-import org.jboss.messaging.core.server.JournalType;
-import org.jboss.messaging.util.XMLUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**ConfigurationImpl
+/**
+ * ConfigurationImpl
  * This class allows the Configuration class to be configured via a config file.
  *
  * @author <a href="ataylor at redhat.com">Andy Taylor</a>
  */
 public class FileConfiguration extends ConfigurationImpl implements Serializable
 {
-	private static final long serialVersionUID = -4766689627675039596L;
-	
-	//default config file location
+   private static final long serialVersionUID = -4766689627675039596L;
+
+   //default config file location
    private String configurationUrl = "jbm-configuration.xml";
 
    public void start() throws Exception
@@ -55,102 +55,106 @@
       String xml = XMLUtil.readerToString(reader);
       xml = XMLUtil.replaceSystemProps(xml);
       Element e = XMLUtil.stringToElement(xml);
-      
+
       strictTck = getBoolean(e, "strict-tck", strictTck);
-      
+
       clustered = getBoolean(e, "clustered", clustered);
-      
+
       scheduledThreadPoolMaxSize = getInteger(e, "scheduled-executor-max-pool-size", scheduledThreadPoolMaxSize);
-      
+
       transport = TransportType.valueOf(getString(e, "remoting-transport", TCP.name()));
-      
+
       host = getString(e, "remoting-host", "localhost");
 
       if (System.getProperty("java.rmi.server.hostname") == null)
          System.setProperty("java.rmi.server.hostname", host);
 
       port = getInteger(e, "remoting-bind-address", DEFAULT_REMOTING_PORT);
-      
+
       timeout = getInteger(e, "remoting-timeout", ConnectionParams.DEFAULT_REQRES_TIMEOUT);
-      
+
       invmDisabled = getBoolean(e, "remoting-disable-invm", false);
-      
+
       tcpNoDelay = getBoolean(e, "remoting-tcp-nodelay", false);
-      
+
       tcpReceiveBufferSize = getInteger(e, "remoting-tcp-receive-buffer-size", -1);
 
       tcpSendBufferSize = getInteger(e, "remoting-tcp-send-buffer-size", -1);
-      
+
+      keepAliveInterval = getInteger(e, "remoting-keep-alive-interval", ConnectionParams.DEFAULT_KEEP_ALIVE_INTERVAL);
+
+      keepAliveTimeout = getInteger(e, "remoting-keep-alive-timeout", ConnectionParams.DEFAULT_KEEP_ALIVE_TIMEOUT);
+
       writeQueueBlockTimeout = getLong(e, "remoting-writequeue-block-timeout", 10000L);
-      
+
       writeQueueMinBytes = getLong(e, "remoting-writequeue-minbytes", 32 * 1024L);
-      
+
       writeQueueMaxBytes = getLong(e, "remoting-writequeue-maxbytes", 64 * 1024L);
 
       sslEnabled = getBoolean(e, "remoting-enable-ssl", false);
-      
+
       keyStorePath = getString(e, "remoting-ssl-keystore-path", null);
-      
+
       keyStorePassword = getString(e, "remoting-ssl-keystore-password", null);
-      
+
       trustStorePath = getString(e, "remoting-ssl-truststore-path", null);
-      
+
       trustStorePassword = getString(e, "remoting-ssl-truststore-password", null);
 
       requireDestinations = getBoolean(e, "require-destinations", requireDestinations);
-      
+
       //Persistence config
-      
+
       this.bindingsDirectory = getString(e, "bindings-directory", bindingsDirectory);
-      
+
       this.createBindingsDir = getBoolean(e, "create-bindings-dir", createBindingsDir);
-      
+
       this.journalDirectory = getString(e, "journal-directory", journalDirectory);
-      
+
       this.createJournalDir = getBoolean(e, "create-journal-dir", createJournalDir);
-      
+
       String s = getString(e, "journal-type", "nio");
-      
+
       if (s == null || (!s.equals("nio") && !s.equals("asyncio") && !s.equals("jdbc")))
       {
-      	throw new IllegalArgumentException("Invalid journal type " + s);
+         throw new IllegalArgumentException("Invalid journal type " + s);
       }
-      
+
       if (s.equals("nio"))
       {
-      	journalType = JournalType.NIO;
+         journalType = JournalType.NIO;
       }
       else if (s.equals("asyncio"))
       {
-      	journalType = JournalType.ASYNCIO;
+         journalType = JournalType.ASYNCIO;
       }
       else if (s.equals("jdbc"))
       {
-      	journalType = JournalType.JDBC;
+         journalType = JournalType.JDBC;
       }
-      		
+
       this.journalSync = getBoolean(e, "journal-sync", true);
-      
+
       this.journalFileSize = getInteger(e, "journal-file-size", 10 * 1024 * 1024);
-      
+
       this.journalMinFiles = getInteger(e, "journal-min-files", 10);
-      
+
       this.journalTaskPeriod = getLong(e, "journal-task-period", 5000L);
-      
+
       this.journalMaxAIO = getInteger(e, "journal-max-aio", DEFAULT_MAX_AIO);
-      
+
       this.journalAIOTimeout = getLong(e, "journal-aio-timeout", DEFAULT_AIO_TIMEOUT);
-      
+
       this.securityEnabled = getBoolean(e, "security-enabled", true);
-       
+
       NodeList defaultInterceptors = e.getElementsByTagName("default-interceptors-config");
 
       ArrayList<String> interceptorList = new ArrayList<String>();
-      
+
       if (defaultInterceptors.getLength() > 0)
       {
          NodeList interceptors = defaultInterceptors.item(0).getChildNodes();
-         
+
          for (int k = 0; k < interceptors.getLength(); k++)
          {
             if ("interceptor".equalsIgnoreCase(interceptors.item(k).getNodeName()))
@@ -162,7 +166,7 @@
       }
       this.defaultInterceptors = interceptorList;
    }
-   
+
    public String getConfigurationUrl()
    {
       return configurationUrl;

Modified: trunk/tests/config/ConfigurationTest-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-config.xml	2008-05-28 09:55:04 UTC (rev 4318)
+++ trunk/tests/config/ConfigurationTest-config.xml	2008-05-28 12:14:16 UTC (rev 4319)
@@ -33,11 +33,11 @@
       <clustered>true</clustered>
       <group-name>MessagingPostOfficetest</group-name>
       <state-timeout>10000</state-timeout>
-       <cast-timeout>10000</cast-timeout>
+      <cast-timeout>10000</cast-timeout>
       <control-channel-name>udp-synctest</control-channel-name>
       <data-channel-name>udptest</data-channel-name>
       <channel-partition-name>JMStest</channel-partition-name>
-      
+
       <remoting-transport>TCP</remoting-transport>
       <remoting-bind-address>10000</remoting-bind-address>
       <remoting-host>localhost</remoting-host>
@@ -47,14 +47,16 @@
       <remoting-tcp-receive-buffer-size>8192</remoting-tcp-receive-buffer-size>
       <remoting-tcp-send-buffer-size>1024</remoting-tcp-send-buffer-size>
       <remoting-enable-ssl>true</remoting-enable-ssl>
-      <remoting-ssl-keystore-path>messaging.keystore</remoting-ssl-keystore-path>      
-      <remoting-ssl-keystore-password>secureexample keystore</remoting-ssl-keystore-password>     
-      <remoting-ssl-truststore-path>messaging.truststore</remoting-ssl-truststore-path>            
+      <remoting-keep-alive-interval>1234</remoting-keep-alive-interval>
+      <remoting-keep-alive-timeout>5678</remoting-keep-alive-timeout>
+      <remoting-ssl-keystore-path>messaging.keystore</remoting-ssl-keystore-path>
+      <remoting-ssl-keystore-password>secureexample keystore</remoting-ssl-keystore-password>
+      <remoting-ssl-truststore-path>messaging.truststore</remoting-ssl-truststore-path>
       <remoting-ssl-truststore-password>secureexample truststore</remoting-ssl-truststore-password>
-      
-      <journal-max-aio>123</journal-max-aio>    
+
+      <journal-max-aio>123</journal-max-aio>
       <journal-aio-timeout>123</journal-aio-timeout>
-      
+
    </configuration>
 
 </deployment>
\ No newline at end of file

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java	2008-05-28 09:55:04 UTC (rev 4318)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java	2008-05-28 12:14:16 UTC (rev 4319)
@@ -21,14 +21,13 @@
    */
 package org.jboss.messaging.tests.unit.core.config.impl;
 
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
 import junit.framework.TestCase;
-
 import org.jboss.messaging.core.config.impl.FileConfiguration;
 import org.jboss.messaging.core.remoting.TransportType;
 
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
 /**
  * @author <a href="ataylor at redhat.com">Andy Taylor</a>
  */
@@ -62,12 +61,12 @@
    {
       assertEquals(TransportType.TCP, configuration.getTransport());
    }
-   
+
    public void testRemotingHost() throws Exception
    {
       assertEquals("localhost", configuration.getHost());
    }
-   
+
    public void testSetRemotingPort() throws Exception
    {
       assertEquals(10000, configuration.getPort());
@@ -78,12 +77,12 @@
    {
       assertEquals(100, configuration.getTimeout());
    }
-   
+
    public void testRemotingTcpNodelay() throws Exception
    {
       assertEquals(true, configuration.isTcpNoDelay());
    }
-   
+
    public void testRemotingTcpReceiveBufferSize() throws Exception
    {
       assertEquals(8192, configuration.getTcpReceiveBufferSize());
@@ -94,16 +93,26 @@
       assertEquals(1024, configuration.getTcpSendBufferSize());
    }
 
+   public void testRemotingKeepAliveInterval() throws Exception
+   {
+      assertEquals(1234, configuration.getKeepAliveInterval());
+   }
+
+   public void testRemotingKeepAliveTimeout() throws Exception
+   {
+      assertEquals(5678, configuration.getKeepAliveTimeout());
+   }
+
    public void testRemotingEnableSSL() throws Exception
    {
       assertEquals(true, configuration.isSSLEnabled());
    }
-   
+
    public void testRemotingSSLKeyStorePath() throws Exception
    {
       assertEquals("messaging.keystore", configuration.getKeyStorePath());
    }
-   
+
    public void testRemotingSSLKeyStorePassword() throws Exception
    {
       assertEquals("secureexample keystore", configuration.getKeyStorePassword());
@@ -113,29 +122,29 @@
    {
       assertEquals("messaging.truststore", configuration.getTrustStorePath());
    }
-   
+
    public void testRemotingSSLTrustStorePassword() throws Exception
    {
       assertEquals("secureexample truststore", configuration.getTrustStorePassword());
    }
-   
+
    public void testSetInterceptorsList() throws Exception
    {
       assertEquals("Didn't get the correct number of elements on interceptors", 2, configuration.getDefaultInterceptors().size());
       assertEquals("org.jboss.tst", configuration.getDefaultInterceptors().get(0));
       assertEquals("org.jboss.tst2", configuration.getDefaultInterceptors().get(1));
    }
-   
+
    public void testMaxAIO() throws Exception
    {
       assertEquals(123, configuration.getJournalMaxAIO());
    }
-   
+
    public void testAIOTimeout() throws Exception
    {
       assertEquals(123, configuration.getJournalAIOTimeout());
    }
-   
+
    //config is supposed to be immutable??
 //   public void testPropertyChangeListener() throws Exception
 //   {
@@ -145,7 +154,7 @@
 //      configuration.setMessageCounterSamplePeriod(1000000);
 //      assertTrue("property change listener not fired", listener.isCalled());
 //   }
-   
+
    class MyListener implements PropertyChangeListener
    {
       boolean called = false;




More information about the jboss-cvs-commits mailing list