From: Ian B. <ia...@co...> - 2003-06-11 19:36:57
|
Concurrency issues can be difficult without a full context. But I think this will be a problem. This is assuming that two different users may be accessing the same objects, but should be in two different transactions. By keeping connections (with their associated transactions) in class variables, you make it impossible for two users to be going through two separate transactions. On Tue, 2003-06-10 at 10:30, Travis Whitton wrote: > Hello all - I'm currently working on a project that uses Webware for the > backend. I've setup a class hierarchy that has multiple children classes > derived from a foundation class. The foundation class handles database > connection pooling and other global operations. In order to allow > transactions to run across multiple objects, I've defined begin, > rollback, and commit methods inside of the foundation class. The begin > method pulls a connection from the database pool and stores it in a > class variable inside of the foundation class. This has turned out to be > a really easy way to share the connection among multiple objects for the > duration of the transaction; however, since I'm still in the unit test / > design phase of the project, I haven't yet tested any of this with > Webware. My knowledge of thread programming is weak, which leaves me > wondering if the approach defined above is going to have any issues with > thread safety? I've googled around looking for answers to this question, > and my search has been fruitless. Any advice or help on this matter > would be appreciated. > > Sincerely, > Travis Whitton <wh...@at...> > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss |