This all started because I am trying to get jasperserver to deploy on glassfish.
It uses spring and hibernate.
The error I am getting when using the data source setup in glassfish is "Large Objects may not be used in auto-commit mode."
This looks like it is happening during a simple select that hibernate does as an insert before it works. (I turned on hibernate show sql)
I do not get this error when using the the org.apache.commons.dbcp.datasources.SharedPoolDataSource for pooling instead of letting glassfish handle it.
I tried transactions NotSupported and no change.
This is why I think is is something to do with glassfish.
Using the driver directly as in your code does work.
It is when glassfish is managing the pool it does not work
My guess(and it is a big guess as I am not familiar enough with this stuff), now that I see the postgres driver does maintain its state when used directly, is when a connection is returned to the pool it is not being reset to the original state with autocommit = false and glassfish is not resetting this state.
Thank you for the help I guess I may just be stuck not being able to use the glassfish pool.
[Message sent by forum member 'wizhippo' (wizhippo)]
http://forums.java.net/jive/thread.jspa?messageID=228350