User: chirino 
  Date: 01/09/26 20:27:43

  Modified:    src/main/org/jboss/mq/il ServerILJMXService.java
                        ServerILJMXServiceMBean.java
  Log:
  Due to popular demand the PingThread is now shared by all the connections
  in one VM.  And the the ping period is configurable at each ConnectionFactory.
  
  Revision  Changes    Path
  1.5       +27 -7     jbossmq/src/main/org/jboss/mq/il/ServerILJMXService.java
  
  Index: ServerILJMXService.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerILJMXService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServerILJMXService.java   2001/09/01 03:00:58     1.4
  +++ ServerILJMXService.java   2001/09/27 03:27:43     1.5
  @@ -25,14 +25,14 @@
    *  extended to provide a full implementation.
    *
    * @author     Hiram Chirino ([EMAIL PROTECTED])
  - * @version    $Revision: 1.4 $
  + * @version    $Revision: 1.5 $
    */
   public abstract class ServerILJMXService extends ServiceMBeanSupport implements 
ServerILJMXServiceMBean
   {
  -   private String connectionFactoryJNDIRef;
  -
  -   private String xaConnectionFactoryJNDIRef;
  -
  +   protected String connectionFactoryJNDIRef;
  +   protected String xaConnectionFactoryJNDIRef;
  +   protected long pingPeriod = 60000L;
  +   
      /**
       * @param  newConnectionFactoryJNDIRef  the JNDI reference where the
       *      connection factory should be bound to
  @@ -56,8 +56,13 @@
       * @returns    Properties contains all the parameters needed to create a
       *      connection from the client to this IL
       */
  -   public abstract Properties getClientConnectionProperties();
  -
  +   public java.util.Properties getClientConnectionProperties()
  +   {
  +      Properties rc = new Properties();
  +      rc.setProperty(GenericConnectionFactory.PING_PERIOD_KEY, ""+pingPeriod );
  +      return rc;
  +   }
  +   
      /**
       * @return     The ServerIL value
       * @returns    ServerIL An instance of the Server IL, used for
  @@ -122,6 +127,21 @@
      public JMSServer lookupJMSServer() throws Exception
      {
         return (JMSServer)getServer().invoke(new 
ObjectName(org.jboss.mq.server.JBossMQServiceMBean.OBJECT_NAME), "getJMSServer", new 
Object[]{}, new String[]{});
  +   }
  +   
  +   /**
  +    * @return    long the period of time in ms to wait between connection pings
  +    *      factory should be bound to
  +    */
  +   public long getPingPeriod() {
  +      return pingPeriod;
  +   }
  +   
  +   /**
  +    * @param  period long the period of time in ms to wait between connection pings
  +    */
  +   public void setPingPeriod(long period) {
  +      pingPeriod = period;
      }
   
   }
  
  
  
  1.5       +12 -1     jbossmq/src/main/org/jboss/mq/il/ServerILJMXServiceMBean.java
  
  Index: ServerILJMXServiceMBean.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/ServerILJMXServiceMBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServerILJMXServiceMBean.java      2001/09/01 03:00:59     1.4
  +++ ServerILJMXServiceMBean.java      2001/09/27 03:27:43     1.5
  @@ -12,7 +12,7 @@
    *  This interface is used to define which methods will be exposed via JMX.
    *
    * @author     Hiram Chirino ([EMAIL PROTECTED])
  - * @version    $Revision: 1.4 $
  + * @version    $Revision: 1.5 $
    */
   public interface ServerILJMXServiceMBean extends ServiceMBean
   {
  @@ -41,4 +41,15 @@
       */
      public java.lang.String getXAConnectionFactoryJNDIRef();
   
  +
  +   /**
  +    * @return    long the period of time in ms to wait between connection pings
  +    *      factory should be bound to
  +    */
  +   public long getPingPeriod();
  +   
  +   /**
  +    * @param  period long the period of time in ms to wait between connection pings
  +    */
  +   public void setPingPeriod(long period);
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to