Hi Guido,

Guido Neitzer wrote:
On Sep 22, 2009, at 4:34 PM, Chuck Hill wrote:

- some increase in RAM usage due to duplicated loading of code and JVM
If you don't want to do that and are committed to doing this in one instance, the next best way is to tag the root object with the tenant. But you said "separate databases", so that is ruled out.

You mean data categorized by tenant?

Yes.

I did something like this a while ago and it was actually pretty simple to come up with a model that worked for the situation we had:

- all (!) entities have a client (tenant?) relationship
- this is set along with audit information in awakeFromInsertion (init) automatically as every user belongs to a client - the app automatically limits fetches with restricting qualifiers (D2W app)

- if an object gets fetched and it's awakeFromFetch is called and the client of this object and the client of the current user don't match, it throws a fatal exception, the users session is logged (every single action), the stack trace is logged, and the session terminated


That is a good idea to avoid undesirable access to data that don't belong to the corresponding tenant.

- I don't use any raw row fetching at all


We do for report generation. But we could create a mechanism for sanity checking (like the one in the awakeFromFetch) as soon as all data used in reports come from the same data source.

Thanks for your comments and advices.

Cheers,

Henrique
_______________________________________________
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]

Reply via email to