|
Sure, but then you synchronize the setter/getter or put a trace statement in that code and your problems are solved. Otherwise you have to find the 212 different places that you referenced the 41 different internal instance variables of the other object and you have to be careful to do it for everything in your object hierarchy. Richard D. Dettinger iSeries Java Data Access Team Democracy's enemies have always underestimated the courage of the American people. It was true at Concord Bridge. It was true at Pearl Harbor. And it was true today. Rochester Post-Bulletin Tuesday September 11, 2001 |---------+----------------------------> | | "David Morris" | | | <David.Morris@plu| | | mcreek.com> | | | Sent by: | | | java400-l-admin@m| | | idrange.com | | | | | | | | | 04/09/2002 06:49 | | | PM | | | Please respond to| | | java400-l | | | | |---------+----------------------------> >----------------------------------------------------------------------------------------------------------------------------| | | | To: <java400-l@midrange.com> | | cc: | | Subject: RE: Java Style Question | | | | | >----------------------------------------------------------------------------------------------------------------------------| Richard, Couldn't they just call the getter and setter to mess things up? David Morris >>> cujo@us.ibm.com 04/09/02 11:44AM >>> ...But later, we start seeing heavily threaded applications, applications sharing transactions (via JTA support sitting on top of JDBC), etc. So we synchronize everything in connection and synchronized everything in statement to stop two threads from messing up a single object, but the problem that remained was that threads doing stuff to the statement are 'free' to modify the connection because they didn't call a method on the connection, they just changed what they wanted to. This caused some inconsistancies that were very hard to track down... Richard D. Dettinger iSeries Java Data Access Team _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.