Well, some days you just miss the obvious I guess, this is one of those
days for me :)

Actually though, because of the way this app is architected, that won't
work without a fairly significant redesign, which can't be done at this
point.  We use a single database connection manager class (a fancy way of
saying a class that provides implementations of doSelect, doInsert, etc.)
that is re-used for the duration of a request.  Problem is, during some
requests we might be doing a mix of transactions that would require both
data soruces.  Since the connection is gotten from the data source once in
the beginning, there's no good way to know up-front which will be needed.
True enough, I could get one of each and use the appropriate one, but
getting two connections per request instead of one doesn't strike me as
particularly scalable.

Well, in any case, there's a small chance I can convince people to move to
Tomcat 5 and hopefully this problem goes away with DBCP being the default
factory now.  Thanks everyone!

Frank W. Zammetti
Web Architect Consultant
PFPC Global Fund Services
760 Moore Road
King Of Prussia, PA 19406
Mailstop: F4-F760-2B-3
eMail: [EMAIL PROTECTED]
Phone: (610)/382-8243
FAX: (610)/382-8866
Cell: (484)/302-1402



|---------+--------------------------->
|         |           Riaan Oberholzer|
|         |           <riaanoberholzer|
|         |           @yahoo.com>     |
|         |                           |
|         |           12/24/2003 06:06|
|         |           AM              |
|         |           Please respond  |
|         |           to "Tomcat Users|
|         |           List"           |
|         |                           |
|---------+--------------------------->
  
>--------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                      |
  |        To:      Tomcat Users List <[EMAIL PROTECTED]>                              
                         |
  |        cc:                                                                         
                                      |
  |        Subject: Re: Problem with database updates using DBCP                       
                                      |
  
>--------------------------------------------------------------------------------------------------------------------------|



Create 2 datasources and configure one to do auto
commit and one not. If you need the auto-commit
('single' insert, delete or updates calls), use that
datasource... if you want to do batch queries, use the
other and do the commit manually.




--- [EMAIL PROTECTED] wrote:Creat
>
> I was about to try that, but I had a thought...
> wouldn't that mean that
> batch transactions could not be used?  I say that
> because, as I understand
> it, you are supposed to explicitly turn off
> autocommit when committing a
> batch, which only makes sense I think.  If I specify
> at the data source
> level autocommit should be turned on, wouldn't that
> by definition mean I
> couldn't do batches?  If that is the case, then even
> if your suggestion
> works I couldn't use it because about half of my
> database writes are in
> fact batches (I should point out that right now they
> fail the same as a
> single insert, update or delete does).
>
> Frank W. Zammetti
> Web Architect Consultant
> PFPC Global Fund Services
> 760 Moore Road
> King Of Prussia, PA 19406
> Mailstop: F4-F760-2B-3
> eMail: [EMAIL PROTECTED]
> Phone: (610)/382-8243
> FAX: (610)/382-8866
> Cell: (484)/302-1402
>
>
>
> |---------+--------------------------->
> |         |           Philipp Taprogge|
> |         |           <Philipp.Taprogg|
> |         |           [EMAIL PROTECTED]>      |
> |         |                           |
> |         |           12/23/2003 02:29|
> |         |           PM              |
> |         |           Please respond  |
> |         |           to "Tomcat Users|
> |         |           List"           |
> |         |                           |
> |---------+--------------------------->
>
>
>
--------------------------------------------------------------------------------------------------------------------------|

>   |
>
>                    |
>   |        To:      Tomcat Users List
> <[EMAIL PROTECTED]>
>                                   |
>   |        cc:
>
>                    |
>   |        Subject: Re: Problem with database
> updates using DBCP
>                           |
>
>
>
--------------------------------------------------------------------------------------------------------------------------|

>
>
>
> Hi!
>
> David Ramsey wrote:
> > I've not used DBCP specifically but are you sure
> you are committing
> > your writes? Most pools will default rollback
> connections returned to
> > the pool, if I am not mistaken.
>
> Isn't there a parameter autocommit in the
> ConnectionFactory? I am not
> sure if it's viable to call setAutoCommit() on a
> connection obtained
> from the pool.
> Try specifying autocommit in the DataSource
> declaration.
>
>              Phil
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
>
>
>
>
> -----------------------------------------
> The contents of this email are the property of PNC.
> If it was not addressed to you, you have no legal
> right to read it. If you think you received it in
> error, please notify the sender. Do not forward or
> copy without permission of the sender.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-----------------------------------------
The contents of this email are the property of PNC. If it was not addressed to you, 
you have no legal right to read it. If you think you received it in error, please 
notify the sender. Do not forward or copy without permission of the sender.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to