User: d_jencks
  Date: 01/11/12 10:35:18

  Modified:    src/main/org/jboss/resource/connectionmanager/jboss
                        MinervaNoTransCMFactory.java
                        MinervaSharedLocalCMFactory.java
                        MinervaXACMFactory.java
  Log:
  Updated the manual to show mbean refs: simplified the pool configuration.  The pool 
changes are a bit of a hack, but do expose what I think is a better interface.  
Blocking is always on, idle timeout is always on. Idle timeout and CleanupInterval are 
in minutes.
  
  Revision  Changes    Path
  1.2       +3 -114    
jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaNoTransCMFactory.java
  
  Index: MinervaNoTransCMFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaNoTransCMFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MinervaNoTransCMFactory.java      2001/09/08 19:32:21     1.1
  +++ MinervaNoTransCMFactory.java      2001/11/12 18:35:18     1.2
  @@ -20,7 +20,7 @@
    *
    * @author    Aaron Mulder <[EMAIL PROTECTED]>
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
  - * @version   $Revision: 1.1 $
  + * @version   $Revision: 1.2 $
    */
   public class MinervaNoTransCMFactory implements ConnectionManagerFactory
   {
  @@ -106,120 +106,9 @@
   
         // Configure the connection pool properties
         Properties props = config.properties;
  -      PoolParameters params = new PoolParameters();
  -      params.blocking = true;
  +      PoolParameters params = new PoolParameters(props);
  +      //params.blocking = true;
         //never return null
  -      String s = props.getProperty(PoolParameters.BLOCKING_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.blockingTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_INTERVAL_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcIntervalMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_MIN_IDLE_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcMinIdleMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.INVALIDATE_ON_ERROR_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.invalidateOnError = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_IDLE_TIMEOUT_PERCENT_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxIdleTimeoutPercent = new Float(s).floatValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MIN_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.minSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -
         // Check pool configuration
         String configuration = 
props.getProperty(NoTransConnectionManager.POOL_CONFIGURATION_KEY);
         boolean perFactory = NoTransConnectionManager.DEFAULT_POOL_PER_FACTORY;
  
  
  
  1.2       +2 -115    
jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaSharedLocalCMFactory.java
  
  Index: MinervaSharedLocalCMFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaSharedLocalCMFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MinervaSharedLocalCMFactory.java  2001/09/08 19:32:21     1.1
  +++ MinervaSharedLocalCMFactory.java  2001/11/12 18:35:18     1.2
  @@ -19,7 +19,7 @@
    *
    * @author    Aaron Mulder <[EMAIL PROTECTED]>
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
  - * @version   $Revision: 1.1 $
  + * @version   $Revision: 1.2 $
    */
   public class MinervaSharedLocalCMFactory implements ConnectionManagerFactory
   {
  @@ -108,120 +108,7 @@
   
         // Configure the connection pool properties
         Properties props = config.properties;
  -      PoolParameters params = new PoolParameters();
  -      params.blocking = true;
  -      //never return null
  -      String s = props.getProperty(PoolParameters.BLOCKING_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.blockingTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_INTERVAL_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcIntervalMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_MIN_IDLE_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcMinIdleMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.INVALIDATE_ON_ERROR_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.invalidateOnError = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_IDLE_TIMEOUT_PERCENT_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxIdleTimeoutPercent = new Float(s).floatValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MIN_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.minSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -
  +      PoolParameters params = new PoolParameters(props);
         // Check pool configuration
         String configuration = 
props.getProperty(SharedLocalConnectionManager.POOL_CONFIGURATION_KEY);
         boolean perFactory = SharedLocalConnectionManager.DEFAULT_POOL_PER_FACTORY;
  
  
  
  1.2       +2 -114    
jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaXACMFactory.java
  
  Index: MinervaXACMFactory.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/connectionmanager/jboss/MinervaXACMFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MinervaXACMFactory.java   2001/09/08 19:32:21     1.1
  +++ MinervaXACMFactory.java   2001/11/12 18:35:18     1.2
  @@ -19,7 +19,7 @@
    *
    * @author    Aaron Mulder <[EMAIL PROTECTED]>
    * @author    <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
  - * @version   $Revision: 1.1 $
  + * @version   $Revision: 1.2 $
    */
   public class MinervaXACMFactory implements ConnectionManagerFactory
   {
  @@ -106,119 +106,7 @@
   
         // Configure the connection pool properties
         Properties props = config.properties;
  -      PoolParameters params = new PoolParameters();
  -      params.blocking = true;
  -      //never return null
  -      String s = props.getProperty(PoolParameters.BLOCKING_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.blockingTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_INTERVAL_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcIntervalMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.GC_MIN_IDLE_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.gcMinIdleMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_ENABLED_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutEnabled = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.IDLE_TIMEOUT_MS_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.idleTimeoutMillis = Long.parseLong(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.INVALIDATE_ON_ERROR_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.invalidateOnError = new Boolean(s).booleanValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_IDLE_TIMEOUT_PERCENT_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxIdleTimeoutPercent = new Float(s).floatValue();
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MAX_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.maxSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  -      s = props.getProperty(PoolParameters.MIN_SIZE_KEY);
  -      if (s != null)
  -      {
  -         try
  -         {
  -            params.minSize = Integer.parseInt(s);
  -         }
  -         catch (Exception e)
  -         {
  -         }
  -      }
  +      PoolParameters params = new PoolParameters(props);
   
         // Check pool configuration
         String configuration = 
props.getProperty(XAConnectionManager.POOL_CONFIGURATION_KEY);
  
  
  

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

Reply via email to