Unfortunately (or fortunately, depending on how you look at it :) ),
you need to drink the Wonder koolaid to use ERXJGroups
notification. This is one that is very hard to do properly without
hackery and a lot of the Wonder tricks depend on eachother --
especially down in EOF. I would be very hesitant recommending that
you pull it apart, because you're just going to run into nasty
problems. You likely need to commit to using ERXEC, ERXModelGroup,
etc. So while you're not going to necessarily gut your app, adding
this ability to an existing non-Wonder app is definitely going to
require some work.
The basic rules still apply -- extend ERXApp, extend ERXSession, and
use ERXEC.newEditingContext instead of new EOEditingContext, but
with an existing app, you are just a lot more of these to find and a
lot more testing to do (for instance, with a big existing app, you
might find that you already have delegates on things that Wonder
requires being a delegate for).
We've been using the ERXJGroups notification in our non-WOnder app
without issues for a while now. The only issue we've been having is
with JGroups itself and concurrent restart of some of our app instances.
I do remember though that I had to dive deep into WOnder to figure out
all the dependencies and load order to make it work.
I suspect the reason why we haven't seen any issues yet is because we
pretty much have all the editing context "fixes" that WOnder's ERXEC
does and we don't have conflicts with delegates since don't setup our
own delegates for anything.
The code that is used to initialise ERXJGroups is:
EODatabaseContext.setContextClassToRegister( ERXDatabaseContext.class );
/* initialise the synchronizer */
ERXObjectStoreCoordinatorSynchronizer.initialize();
This code is executed early on in the application loading (actually in
the framework's principal class) before any model is loaded. Also, it
uses an old version of WOnder (the latest one at the time I did this).
Regards
Peter Vandoros
Software Engineer
Etech Group Pty Ltd
Level 3/21 Victoria St
Melbourne VIC 3000
Australia
Ph: +61 3 9639 9677
Fax: +61 3 9639 9577
----------------------------------
IMPORTANT: This e-mail message and any attachments are confidential
and may be privileged. If received in error, please reply to this
message and destroy all copies and any attachments. You should check
this message and any attachments for viruses or defects. Our liability
is limited to resupplying any affected message or attachments. For
more information about Etech Group, please visit us at http://www.etechgroup.com.au
.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]