Bruce, Many thanks for your answer. Maybe non-exclusive write lock feature would be usefull in some scenarious - is this possible in CASTOR now ?
Richard ----- Original Message ----- From: "Bruce Snyder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 04, 2003 9:54 PM Subject: Re: [castor-dev] Simple Question: Is there possibility for pesimistic lock of an object allowing other transaction to only read it at the same time in CASTOR ? > This one time, at band camp, Richard Grill said: > > RG>Is there possibility to pesimistic lock an object allowing other transaction to only read it at the same time in CASTOR ? > RG> > RG>Note that locking an object via db1.Exclusive not allow to load/query the same object in db2.ReadOnly mode.(because db1.Exclusive perform ReadLock on the object ) > > Richard, > > Pessimistic locking by definition is the notion of exclusivity, i.e. it > restricts any other locks from being acquired while a lock exists. My > recommendation is to employ shared locking and simply make use of the > Database.lock() method if there is a need to upgrade from a shared lock > to an exclusive lock. > > Bruce > -- > perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev