On Jan 8, 2007, at 2:34 PM, John Siracusa wrote: > On 1/8/07, Peter Leonard <[EMAIL PROTECTED]> wrote: >> I know that I can add the 'db => $db_ro' parameter to all the get_*() >> methods, but I'm wondering if anyone has come up with a more >> comprehensive solution by subclassing Rose::DB::Object::Manager?
i have a factory class / singleton that manages my db handles. I currently use 6 Read-Config Read-Main Read/Write-Account Read/Write-Content Read/Write-Log Read/Write-Session They're pretty much all for the same db, with different permissions (with the exception of the session, which is mysql.) I run mod_perl + Apache::DBI, so this is what happens mp initializes all handles on startup all transaction logic happens in mp business logic all rose objects have a default DB with no read/write permissions whatsoever in their base Rose::DB class all rose objects are given a specific DBH on instantiation. a wrapper class lets me that works great for me. in one dbi have 132 tables and 74 views-- so they all share the same namespace in rose. once i had a ro/rw config, but i realized that didn't solve my permissions/security concerns on the db level. so i did a strict permissions isolation. if everyone shared a 'read' by default, then i'd run into the situation where i'd have to decide which read only should it use? thats a nightmare. if you have 1 rw connection, the base Rose way makes sense. and if you have more than 1 db connection, the current implementation makes the most sense: there are too many cases to consider when deciding which db handle to use. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object