Hi! On 2009/12/03, at 20:53, Kieran Kelleher wrote:
1) Yes, there is a ERXJDBCConnectionBroker that does what you say. I have not used it though.
I must check that.
2) Creating another OSC is not much overhead (IMHO) itself ...... it is all the EO's and snapshots that are the overhead.
I know, but creating a DB connection is, specially under heavy load (I don't want to create and destroy dozens of connections per second!). The snapshots would not worry me too much, in a critical section, you would have only the snapshots you really needed, and you would dispose the OSC after doing your stuff.
I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task .... and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC.
Dude! <http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ > ;)
3) If you use OSC synchronization (ERXOSCSynchronizer and ERJGroupsSync) you will still haev the problem of snapshots changing underneath you if you don't lock the OSC. So IMHO, the OptimisticLockAction approach works well ..... and if the approach "ain't broke, why fix it" :-)
I don't use the synchronizer... I think it increases the concurrency chaos by several orders of magnitude. :) Anyway, those "critical" OSCs would not synchronize, as that would defeat their purpose.
Yours Miguel Arroz
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com