User: danch   
  Date: 01/07/01 20:29:14

  Modified:    src/main/org/jboss/jdbc XADataSourceLoader.java
                        XADataSourceLoaderMBean.java
  Log:
  allow specification of a timeout in JDBC connection pools when blocking is enabled
  
  Revision  Changes    Path
  1.18      +15 -1     jboss/src/main/org/jboss/jdbc/XADataSourceLoader.java
  
  Index: XADataSourceLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jdbc/XADataSourceLoader.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XADataSourceLoader.java   2001/06/18 20:01:25     1.17
  +++ XADataSourceLoader.java   2001/07/02 03:29:14     1.18
  @@ -30,8 +30,12 @@
    * pool generates connections that are registered with the current Transaction
    * and support two-phase commit.  The constructors are called by the JMX engine
    * based on your MLET tags.
  - * @version $Revision: 1.17 $
  + * @version $Revision: 1.18 $
    * @author <a href="mailto:[EMAIL PROTECTED]";>Aaron Mulder</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]";>danch (Dan Christopherson)</a>
  + * 
  + * Revision:<br>
  + * 20010701 danch added support for timeout in blocking.
    */
   public class XADataSourceLoader
      extends ServiceMBeanSupport
  @@ -56,6 +60,7 @@
      float maxIdleTimeoutPercent;
      boolean invalidateOnError;
      boolean timestampUsed;
  +   int blockingTimeout;
   
      XAPoolDataSource source;
   
  @@ -169,6 +174,14 @@
         return blocking;
      }
   
  +   public void setBlockingTimeout(int blockingTimeout) {
  +      this.blockingTimeout = blockingTimeout;
  +   }
  +   
  +   public int getBlockingTimeout() {
  +      return blockingTimeout;
  +   }
  +   
      public void setGCEnabled(boolean gcEnabled)
      {
         this.gcEnabled = gcEnabled;
  @@ -298,6 +311,7 @@
         getSource().setMinSize(minSize);
         getSource().setMaxSize(maxSize);
         getSource().setBlocking(blocking);
  +      getSource().setBlockingTimeout(blockingTimeout);
         getSource().setGCEnabled(gcEnabled);
         getSource().setGCInterval(gcInterval);
         getSource().setGCMinIdleTime(gcMinIdleTime);
  
  
  
  1.6       +2 -0      jboss/src/main/org/jboss/jdbc/XADataSourceLoaderMBean.java
  
  Index: XADataSourceLoaderMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/jdbc/XADataSourceLoaderMBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XADataSourceLoaderMBean.java      2000/12/07 15:44:51     1.5
  +++ XADataSourceLoaderMBean.java      2001/07/02 03:29:14     1.6
  @@ -33,6 +33,8 @@
       public int getMaxSize();
       public void setBlocking(boolean blocking);
       public boolean getBlocking();
  +    public void setBlockingTimeout(int blockingTimeout);
  +    public int getBlockingTimeout();
       public void setGCEnabled(boolean gcEnabled);
       public boolean getGCEnabled();
       public void setGCInterval(long interval);
  
  
  

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

Reply via email to