Re: DBCP config question

2009-08-28 Thread Filip Hanik - Dev Lists

its better to see if there is a way to do it in the JDBC url itself.
As soon as you set the defaultAutoCommit flag to a value, DBCP will 
issue a getAutoCommit and possible setAutoCommit each time you use the 
connection. Both calls may go back to the DB depending on how the driver 
implements it.


Alternatively, you can try out a pool that is being developed in the 
tomcat community, which as a ConnectionState component that caches the 
auto commit state.
It also has a initSQL attribute to setup a DB session first time its 
connected to the DB.

http://people.apache.org/~fhanik/jdbc-pool/v1.0.7.1/

Filip


On 08/28/2009 02:27 PM, Bill Davidson wrote:

Tomcat 6.0.18
Oracle 10g
Java 1.6.0_14

I'm a little curious about the defaultAutoCommit parameter.

If I understand the docs and things I've googled correctly, if I don't
set it, I get the JDBC driver default.  More googling, suggests that
the default for the Oracle JDBC driver is to have auto-commit
enabled.  I'm pretty sure I don't want that since I have some complex
transactions going on.

So I'm thinking I should set it to false to disable auto-commit.  Is
that correct?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: DBCP config question

2009-08-28 Thread Martin Gainty

is the ConnectionState Transaction aware?

thanks
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Fri, 28 Aug 2009 15:01:33 -0600
 From: devli...@hanik.com
 To: users@tomcat.apache.org
 Subject: Re: DBCP config question
 
 its better to see if there is a way to do it in the JDBC url itself.
 As soon as you set the defaultAutoCommit flag to a value, DBCP will 
 issue a getAutoCommit and possible setAutoCommit each time you use the 
 connection. Both calls may go back to the DB depending on how the driver 
 implements it.
 
 Alternatively, you can try out a pool that is being developed in the 
 tomcat community, which as a ConnectionState component that caches the 
 auto commit state.
 It also has a initSQL attribute to setup a DB session first time its 
 connected to the DB.
 http://people.apache.org/~fhanik/jdbc-pool/v1.0.7.1/
 
 Filip
 
 
 On 08/28/2009 02:27 PM, Bill Davidson wrote:
  Tomcat 6.0.18
  Oracle 10g
  Java 1.6.0_14
 
  I'm a little curious about the defaultAutoCommit parameter.
 
  If I understand the docs and things I've googled correctly, if I don't
  set it, I get the JDBC driver default.  More googling, suggests that
  the default for the Oracle JDBC driver is to have auto-commit
  enabled.  I'm pretty sure I don't want that since I have some complex
  transactions going on.
 
  So I'm thinking I should set it to false to disable auto-commit.  Is
  that correct?
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_facebook:082009