I think that the transaction support should be general.  There is only one
column in Turbine, at the moment, that requires a transaction on one
database.  There should be a generic adaptor method supportsTransactions or
hasTransactions.  In the code that updates this column we check for support
and then use a transaction if it is ok.

If in a particular app, the developers want to support a wide variety of
db's they will have to handle things similarly.  But it is just as likely
that the db is known at that point and the code will tend to get written to
that one database.
If you are planning to use postgres for an application, it doesn't matter
whether you are calling supportsTransactions or
needsTransactionForObjectData or even if you call either one.

I am not completely opposed to having such a specific enabler (is that the
right term?) method, but I think the more general is sufficient.


----- Original Message -----
From: Nissim <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Thursday, June 29, 2000 4:46 AM
Subject: Re: [PATCH] Re: DB (Postgres & Transactions, unresolved issues)


> I'm replying to this message because there's an additional issue I
> didn't address with this patch.  Although the patch in the previous
> message will work for postgres for the user stuff, it's not a general
> solution to using tables which contain large objects in postgres.  So
> when you start making peer classes for the attachment tables in scarab
> (or any other tables containing binary data), you're going to have the
> same problem again.
>
> -Nissim
>
>
> Nissim wrote:
> >
> > OK, it's done.  I came up with another solution for Postgres which
> > requires minimal changes to existing classes: Make a new User class
> > which extends TurbineUser for postgres (and one to extend
> > TurbineUserPeer).  I also used the DBConnection as the transaction key,
> > and not Connection because then the Commit and RollBack can easily
> > release the DBConnection back to the pool.  Below are the patches to
> > existing code, and the two new files can be found in a tgz archive at
> > http://nissim.karpenstein.com/turbine_postgres.tgz ... I hope you all
> > buy it this time :-)
> >
> >         -Nissim
> >
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to