On 10/18/07, Kostas Papadopoulos <[EMAIL PROTECTED]> wrote:
> Thanks,
>
> This was issue DBCP-102. I should have checked there first. It is
> marked resolved but it still sets autocommit to true in
> passivateObject(), so it will need some work to remove the overhead.
>
> kostas
>
See the comments in DBCP-102 and DBCP-97.
The hard-coded *true* value for autoCommit in passivateObject was
introduced to resolve DBCP-97 in r132043 (DBCP 1.1 release)
If you disagree with the reasons given in DBCP-97, go ahead and reopen DBCP-102.
Thanks.
Phil
> On 10/19/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
> > looks like it is hard coded in commons-dbcp to set autocommit to true
> >
> > PoolableConnectionFactory.java
> >
> > public void passivateObject(Object obj) throws Exception {
> > if(obj instanceof Connection) {
> > Connection conn = (Connection)obj;
> > if(!conn.getAutoCommit() && !conn.isReadOnly()) {
> > conn.rollback();
> > }
> > conn.clearWarnings();
> > if(!conn.getAutoCommit()) {
> > conn.setAutoCommit(true);
> > }
> > }
> > if(obj instanceof DelegatingConnection) {
> > ((DelegatingConnection)obj).passivate();
> > }
> > }
> >
> > If you feel this is incorrect, or cause overhead, then file a bug with
> > the DBCP folks
> >
> > Filip
> >
> > Kostas Papadopoulos wrote:
> > > I'm using tomcat/jdbc/mysql with the tomcat suplied DBCP connection
> > > pool configured with defaultAutoCommit=false. After tracing the
> > > queries sent to the database, I've noticed that a "set autocommit=1"
> > > is always followed by "set autocommit=0". I'm not sure who is setting
> > > "autocommit=1", probably the connection.close() in the pool
> > > somewhere.
> > >
> > > Is there a way to make it stop? Can anyone know of a reason why this
> > > would be needed?
> > >
> > > Thanks
> > > Kostas
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]