Re: Accessing the current SQL connection in agent execution
[email protected] Tue, 30 Oct 2007 14:30:59 +0100
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1193751066-10408-9 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Sasa. Thanks a lot for your prompt response. Since I have to retain the same DBTransaction throughout the whole agent lifespan (in case of rollbacks) I can not use DODSUtilities.getNext(). I peeked in its source code, though. You wrote: "The Id you get is synchronized on a database, so you can safely use it from several VMs" At a first glance I didn't find the code to grant this. The method is static and synchronized, and it tries 50 times in case an exception is thrown, but it doesn't lock the record, so an other process from another VM accessing the same data might tamper with the table and get away with it. Did I miss something? T.I.A., Manrico PS: At the moment I'm trying to hack into the DO/DOI/Query and DataStruct classes to get the underlying Connection object and use a SELECT ... FOR UPDATE as we used to in the old days :-) ------------=_1193751066-10408-9 Content-Type: text/plain; name="message-footer.txt" Content-Disposition: inline; filename="message-footer.txt" Content-Transfer-Encoding: 8bit -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws ------------=_1193751066-10408-9--