User: mulder  
  Date: 01/01/31 13:48:29

  Modified:    src/main/org/jboss/jdbc JDBCDataSourceLoader.java
                        XADataSourceLoader.java
  Log:
  Added new Minerva library.  All current code in org/jboss/minerva will be
  removed as soon as the Connector implementation is updated.  The new
  packaging is "org.opentools.minerva" and the hierarchy has been modified
  somewhat.
  
  Updated build.xml, jboss.jcml, JDBCDataSourceLoader, and XADataSourceLoader
  to use the new package names.
  
  New version includes J2EE Connector support and LRU PreparedStatement
  caching.
  
  Note: we will probably deprecate JDBCDataSourceLoader and
        XADataSourceLoader in favor of connectors once the connector package
        is stable.
  
  Revision  Changes    Path
  1.8       +3 -3      jboss/src/main/org/jboss/jdbc/JDBCDataSourceLoader.java
  
  Index: JDBCDataSourceLoader.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/jdbc/JDBCDataSourceLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JDBCDataSourceLoader.java 2000/12/07 15:44:50     1.7
  +++ JDBCDataSourceLoader.java 2001/01/31 21:48:29     1.8
  @@ -17,15 +17,15 @@
   import javax.naming.NameNotFoundException;
   import javax.naming.NamingException;
   import javax.sql.DataSource;
  +import org.opentools.minerva.jdbc.JDBCPoolDataSource;
   import org.jboss.logging.LogWriter;
  -import org.jboss.minerva.datasource.JDBCPoolDataSource;
   import org.jboss.util.ServiceMBeanSupport;
   import org.jboss.logging.Logger;
   
   /**
    * Service that loads a JDBC 1 connection pool.  The constructors are called by
    * the JMX engine based on your MLET tags.
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    * @author Aaron Mulder ([EMAIL PROTECTED])
    */
   public class JDBCDataSourceLoader extends ServiceMBeanSupport implements 
JDBCDataSourceLoaderMBean {
  @@ -203,7 +203,7 @@
           }
       }
   
  -     // Private -------------------------------------------------------
  +    // Private -------------------------------------------------------
   
       private void initializePool() throws NamingException, SQLException {
           source.initialize();
  
  
  
  1.15      +51 -51    jboss/src/main/org/jboss/jdbc/XADataSourceLoader.java
  
  Index: XADataSourceLoader.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/jdbc/XADataSourceLoader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XADataSourceLoader.java   2000/12/07 18:16:11     1.14
  +++ XADataSourceLoader.java   2001/01/31 21:48:29     1.15
  @@ -20,8 +20,8 @@
   import javax.naming.NameNotFoundException;
   import javax.naming.NamingException;
   import javax.sql.XADataSource;
  +import org.opentools.minerva.jdbc.xa.XAPoolDataSource;
   import org.jboss.logging.LogWriter;
  -import org.jboss.minerva.datasource.XAPoolDataSource;
   import org.jboss.util.ServiceMBeanSupport;
   import org.jboss.logging.Log;
   
  @@ -30,12 +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.14 $
  + * @version $Revision: 1.15 $
    * @author Aaron Mulder ([EMAIL PROTECTED])
    */
  -public class XADataSourceLoader 
  +public class XADataSourceLoader
      extends ServiceMBeanSupport
  -   implements XADataSourceLoaderMBean 
  +   implements XADataSourceLoaderMBean
   {
      // Settings
      String name;
  @@ -56,9 +56,9 @@
      float maxIdleTimeoutPercent;
      boolean invalidateOnError;
      boolean timestampUsed;
  -   
  +
      XAPoolDataSource source;
  -   
  +
      public XADataSourceLoader()
      {
      }
  @@ -73,184 +73,184 @@
         this.name = name;
         log = Log.createLog(name);
      }
  -   
  +
      public String getPoolName()
      {
         return name;
      }
  -   
  +
      public void setDataSourceClass(String clazz)
      {
         dataSourceClass = clazz;
      }
  -   
  +
      public String getDataSourceClass()
      {
         return dataSourceClass;
      }
  -   
  +
      public void setURL(String url)
      {
         this.url = url;
      }
  -   
  +
      public String getURL()
      {
         return url;
      }
  -   
  +
      public void setJDBCUser(String userName)
      {
         this.userName = userName;
      }
  -   
  +
      public String getJDBCUser()
      {
         return userName;
      }
  -   
  +
      public void setPassword(String password)
      {
         this.password = password;
      }
  -   
  +
      public String getPassword()
      {
         return password;
      }
  -   
  +
      public void setProperties(String properties)
      {
         this.properties = properties;
      }
  -   
  +
      public String getProperties()
      {
         return properties;
      }
  -   
  +
      public void setLoggingEnabled(boolean enabled)
      {
         this.loggingEnabled = enabled;
      }
  -   
  +
      public boolean getLoggingEnabled()
      {
         return loggingEnabled;
      }
  -   
  +
      public void setMinSize(int minSize)
      {
         this.minSize = minSize;
      }
  -   
  +
      public int getMinSize()
      {
         return minSize;
      }
  -   
  +
      public void setMaxSize(int maxSize)
      {
         this.maxSize = maxSize;
      }
  -   
  +
      public int getMaxSize()
      {
         return maxSize;
      }
  -   
  +
      public void setBlocking(boolean blocking)
      {
         this.blocking = blocking;
      }
  -   
  +
      public boolean getBlocking()
      {
         return blocking;
      }
  -   
  +
      public void setGCEnabled(boolean gcEnabled)
      {
         this.gcEnabled = gcEnabled;
      }
  -   
  +
      public boolean getGCEnabled()
      {
         return gcEnabled;
      }
  -   
  +
      public void setGCInterval(long interval)
      {
         this.gcInterval = interval;
      }
  -   
  +
      public long getGCInterval()
      {
         return gcInterval;
      }
  -   
  +
      public void setGCMinIdleTime(long idleMillis)
      {
         this.gcMinIdleTime = idleMillis;
      }
  -   
  +
      public long getGCMinIdleTime()
      {
         return gcMinIdleTime;
      }
  -   
  +
      public void setIdleTimeoutEnabled(boolean enabled)
      {
         this.idleTimeoutEnabled = enabled;
      }
  -   
  +
      public boolean getIdleTimeoutEnabled()
      {
         return idleTimeoutEnabled;
      }
  -   
  +
      public void setIdleTimeout(long idleMillis)
      {
         this.idleTimeout = idleMillis;
      }
  -   
  +
      public long getIdleTimeout()
      {
         return idleTimeout;
      }
  -   
  +
      public void setMaxIdleTimeoutPercent(float percent)
      {
         this.maxIdleTimeoutPercent = percent;
      }
  -   
  +
      public float getMaxIdleTimeoutPercent()
      {
         return maxIdleTimeoutPercent;
      }
  -   
  +
      public void setInvalidateOnError(boolean invalidate)
      {
         this.invalidateOnError = invalidate;
      }
  -   
  +
      public boolean getInvalidateOnError()
      {
         return invalidateOnError;
      }
  -   
  +
      public void setTimestampUsed(boolean timestamp)
      {
         this.timestampUsed = timestamp;
      }
  -   
  +
      public boolean getTimestampUsed()
      {
         return timestampUsed;
      }
   
      // ServiceMBeanSupport implementation ----------------------------
  -   public ObjectName getObjectName(MBeanServer server, ObjectName objectName) 
  +   public ObjectName getObjectName(MBeanServer server, ObjectName objectName)
         throws javax.management.MalformedObjectNameException
      {
         return (objectName == null) ? new 
ObjectName(OBJECT_NAME+",name="+getSource().getPoolName()) : objectName;
  @@ -265,19 +265,19 @@
      {
         // Transfer settings
         getSource().setPoolName(name);
  -      
  +
         XADataSource vendorSource = null;
         Class cls = Class.forName(dataSourceClass);
         vendorSource = (XADataSource)cls.newInstance();
         getSource().setDataSource(vendorSource);
  -   
  +
         cls = vendorSource.getClass();
         if(url != null && url.length() > 0)
         {
            Method setURL = cls.getMethod("setURL", new Class[] { String.class });
            setURL.invoke(vendorSource, new Object[] { url });
         }
  -   
  +
         cls = vendorSource.getClass();
         if(properties != null && properties.length() > 0)
         {
  @@ -285,13 +285,13 @@
            Method setProperties = cls.getMethod("setProperties", new Class[] { 
Properties.class });
            setProperties.invoke(vendorSource, new Object[] { props });
         }
  -   
  +
         if(userName != null && userName.length() > 0)
            getSource().setJDBCUser(userName);
  -   
  +
         if(password != null && password.length() > 0)
            getSource().setJDBCPassword(password);
  -   
  +
         PrintWriter writer = loggingEnabled ? new LogWriter(log) : null;
         getSource().setLogWriter(writer);
         getSource().getDataSource().setLogWriter(writer);
  @@ -306,7 +306,7 @@
         getSource().setMaxIdleTimeoutPercent(maxIdleTimeoutPercent);
         getSource().setInvalidateOnError(invalidateOnError);
         getSource().setTimestampUsed(timestampUsed);
  -      
  +
         // Initialize pool
         Context ctx = null;
         Object mgr = null;
  @@ -376,9 +376,9 @@
      private static Properties parseProperties(String string)
      {
         Properties props = new Properties();
  -      
  +
         StringTokenizer tokens = new StringTokenizer(string, ";=");
  -      
  +
         while (tokens.hasMoreTokens())
         {
            String key = tokens.nextToken();
  
  
  

Reply via email to