On Jul 9, 2007, at 7:46 PM, mla wrote:
>
> Hmmm. You mean a nightmare to use? They seem really natural to me.
> Many other ORMs seem to implement them.
>
> http://tangram.utsl.gen.nz/docs/Tangram/Tour.html#transactions
> http://search.cpan.org/~danieltwc/DBIx-Class-0.07002/lib/DBIx/Class/ 
> Manual/Cookbook.pod#Transactions

no a nightmare to implement.

neither of those actually implement nested transactions.. you can  
nest transactional code, but their support isn't for true nested  
transactions with savepoints ; if you fail in one, you rollback in  
all.  i think only db2, oracle, and certain versions of pg support  
actual nested transactions.

> Yes, thank you. That seems like a nice general solution. I'll try to
> get that working with Rose::DB.
>
> Do you use Rose::DB's do_transaction() or your own interface?

i use a factory class to manage a pool of database handles per- 
request  ( read cluster, write master , log pool , session cluster ).
my application logic fetches a db handle, starts / ends transactions  
where appropriate, and passes the dbh to each rose object (though  
some will automatically fetch the dbh from the factory via an init  
overload )

i don't use 'real' Rose::DB objects -- i use ones with null/null/null  
connect strings, then overload the dbh with one of my choice, which  
has the transactional state managed outside of the object.

personally, i don't think transactions belong in an ORM-- they belong  
in your application code.



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|   CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|     Founder/CTO/CVO
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to