Hola Fabrice, Most of the time I use "optimistic locking"; however, in some special cases (e.g., to assign folios to documents; similar that assign manually primary-keys) I start/end by hand a db-transaction.This is an old issue which comes since EOF ß... the main disadvantage is that you can block the db if you are not careful enough ---e.g., if the user goes for his lunch in the middle of a transaction--- but with care, it works really nice.
There is another possibility which I had not proved; in Chuck's book there is a chapter about it, but my copy is still in the way to arrive to Mexico. I suppose he have a way to put in sync two different WO apps, but since I only use by now Cocoa/EOF I am not sure of approach. Do you have his book?
If two apps are supposed to run on the same space/machine (the server), I suppose it is easier to accomplish such a sync that if the two apps are in different spaces; however, via distributed objects, there should be a workaround. In this direction, at least theoretically, a distributed notification centre should do the trick.
Hoping to be helpful, Dino On Jun 16, 2005, at 6:09 AM, Fabrice Pipart wrote: Hi !
I saw this post on the webobjects-dev mailing list. I am using Cocoa/EOF too and I would have some questions about it if you don't mind...
I am using it to write in database from a Cocoa application. It almost HAS to be Cocoa since it uses Quicktime and its Obj-C API is far better than the Java one! And I use CoreVideo too. Of course this desktop application is part of a WebObjects application so I thought it would be a good idea to use EOF to write the results in database. I thought it would integrate more easily with the rest of the application which is fully WebObjects. But I noticed it does not really integrate so well. You have no synchronization between the Editing Contexts so I have to be very carefull to refetch each time the EOs to be sure they are up-to-date :-( Am I missing something here?
In fact since there is no real sync between the Editing Contexts I was planning to come back to pure JDBC to be more "standard".
Could you tell me a bit more about your personal experience? That could be of great help for me !
Thanks in advance !
Fabrice
On Jun 10, 2005, at 6:41 PM, Ricardo Strausz wrote: Hola!
Message: 6 Date: Fri, 10 Jun 2005 12:31:12 -0400 Subject: Re: WebObjects feedback forum
Maybe if Apple isn't supporting those platforms they will stop supplying the WO runtime stuff?
There is no reason to think so... they do not support Cocoa/EOF long ago, but they still supply it, and hopefully they will.
Dino
www.icconsulting.mc
International Corporate Consulting 25, Boulevard de Belgique MC - 98000 Monaco
T. +377 97982104 (direct) F. +377 97708807
-- Ricardo Strausz Business Applied C Objects 企業應用的C 對象 +5255 5437 8205
|