On Apr 6, 2009, at 9:18 PM, Cheong Hee (Gmail-P) wrote:

Dear all

I would like to pass in a value e.g. organization name from DirectAction to Session constructor. It allows me to look at the organization name and decide if a new ObjectStoreCoordinator to be created and setDefaultEditingContext accordingly during session construction stage. This is taking Chuck's suggestion to create one OSC per organization name, rather than create new OSC per session. How is the value be passed into Session constructor from DirectAction? I have figured hard and must have overlooked something. Appreciate any pointers.

ERXThreadStorage from Wonder is one way to pass in the parameter.

You could also override public WOSession createSessionForRequest(WORequest aRequest) in Application and set the default EC after session creation.


Also, since session().setDefaultEditingContext is not allowed to set to another EC after it is being called, is there any way to force it through if so required.


Make sure that you call setDefaultEdtiingContext _before_ you ever all defaultEditingContext.


Chuck


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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

Reply via email to