Nevermind - I figured it out. I needed to add the following in Tomcat's DBCP configuration:
<!-- Autocommit setting -->
<parameter>
<name>defaultAutoCommit</name>
<value>false</value>
</parameter>
Thanks,
Matt
> -----Original Message-----
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 04, 2003 3:07 AM
> To: '[EMAIL PROTECTED]'
> Subject: Setting autocommit=false
>
> I am setting up JNDI in Tomcat and using Hibernate to get
> this connection and do persistence appropriately. All this
> worked fine on Oracle, but with MySQL, I'm getting the following:
>
> java.sql.SQLException: Can't call commit when autocommit=true
> at org.gjt.mm.mysql.Connection.commit(Unknown Source)
> at
> org.apache.commons.dbcp.DelegatingConnection.commit(Delegating
> Connection.java:219)
> at
> org.appfuse.persistence.UserDAOHibernate.getUser(UserDAOHibern
> ate.java:58)
>
> So, my question is, how do I turn off autocommit? Can I do
> it based on the URL for my Resource definition in Tomcat, such that:
>
> jdbc:mysql://localhost:3306/appfuse?autoReconnect=true&aut
> oCommit=false
>
> This doesn't seem to work - is there a hibernate
> setting/property I can change?
>
> Thanks,
>
> Matt
>