Attached is a patch that makes a couple minor changes to Excalibur JDBC connection pooling. a) I don't think that a symbol should be misspelled to prevent it from conflicting with another symbol. I therefore changed "controler" to "controllerConfig." b) There was extraneous error information when the connection pool min or max were less than 1. c) JdbcConnectionFactory was ignoring the autocommit parameter. This was acceptable because JdbcConnectionPool was setting the autoCommit property. However, if JdbcConnectionFactory is used in some other context, the behavior is unexpected. Ken
Index: JdbcConnectionFactory.java =================================================================== RCS file: /home/cvspublic/jakarta-avalon/src/java/org/apache/avalon/excalibur/datasource/JdbcConnectionFactory.java,v retrieving revision 1.3 diff -u -r1.3 JdbcConnectionFactory.java --- JdbcConnectionFactory.java 2001/06/01 21:09:24 1.3 +++ JdbcConnectionFactory.java 2001/06/09 00:05:35 @@ -46,7 +46,6 @@ if( null == m_username ) { connection = new JdbcConnection( DriverManager.getConnection( m_dburl ), this.m_oradb ); - connection.setLogger(getLogger()); } else { @@ -55,8 +54,9 @@ m_username, m_password ), this.m_oradb); - connection.setLogger(getLogger()); } + connection.setLogger(getLogger()); + connection.setAutoCommit(m_autoCommit); getLogger().debug( "JdbcConnection object created" ); return connection; @@ -73,4 +73,4 @@ ((JdbcConnection) object).dispose(); } } -} \ No newline at end of file +} Index: JdbcDataSource.java =================================================================== RCS file: /home/cvspublic/jakarta-avalon/src/java/org/apache/avalon/excalibur/datasource/JdbcDataSource.java,v retrieving revision 1.7 diff -u -r1.7 JdbcDataSource.java --- JdbcDataSource.java 2001/06/01 19:06:51 1.7 +++ JdbcDataSource.java 2001/06/09 00:05:36 @@ -47,12 +47,12 @@ final String dburl = configuration.getChild( "dburl" ).getValue(); final String user = configuration.getChild( "user" ).getValue( null ); final String passwd = configuration.getChild( "password" ).getValue( null ); - final Configuration controler = configuration.getChild( "pool-controller" ); + final Configuration controllerConfig = configuration.getChild( +"pool-controller" ); - final int min = controler.getAttributeAsInteger( "min", 1 ); - final int max = controler.getAttributeAsInteger( "max", 3 ); + final int min = controllerConfig.getAttributeAsInteger( "min", 1 ); + final int max = controllerConfig.getAttributeAsInteger( "max", 3 ); final boolean autoCommit = configuration.getChild("auto-commit").getValueAsBoolean(true); - final boolean oradb = controler.getAttributeAsBoolean( "oradb", false ); + final boolean oradb = controllerConfig.getAttributeAsBoolean( "oradb", +false ); final int l_max; final int l_min; @@ -60,8 +60,7 @@ if ( min < 1 ) { getLogger().warn( "Minumum number of connections specified must be at " + - "least 1 and must be greater than the minumum number " + - "of connections" ); + "least 1" ); l_min = 1; } else @@ -72,8 +71,7 @@ if( max < 1 ) { getLogger().warn( "Maximum number of connections specified must be at " + - "least 1 and must be greater than the minumum number " + - "of connections" ); + "least 1" ); l_max = 1; } else
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]