Re: [ojb-users] Long Transactions
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-06-13 17:57:27
|
Hi Stephan, I'm not sure about your application scenario. Please give some more detail on what you want to do! Stephan Merker wrote: > Hello, > > can anybody give me a hint what'ts the right way to perform long > transactions using OJB with the ODMG API? > > E.g. > > - Client requests an object by sending a request to the server > - server performs OQL query = 1st transaction > - object is send to client 2nd tx must be opened and unmodified object must be locked in WRITE mode here! > - client modifies object > - client sends object back to server > - server performs update = 2nd transaction > > How-to perform the update? I tried Transaction.lock(obj, Transaction.WRITE) > but then the object is not written because the dirty check is performed > against the object passed to the lock() method and not against the state of > the persistent object (in the database or cache). > The object must be locked *before* the client can perform modifications! It's no problem to hold long ODMG transaction, as they do not consume DB resources (OJB provides a db independent tx isolation mechanism)! cheers, Thomas > Any ideas? > > Thanks, > Stephan > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink > > _______________________________________________ > Objectbridge-users mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-users > > > |