Eric Schneider wrote:
Borut,
I've always stuck to the simplest approach. If I'm dealing with a
completely stateless application, I share one DataContext for all users
(in T4 as a hivemind singleton). For stateless apps, each individual
user has their own DataContext in the Visit object. I haven't used
the CayenneDataSqueezer, simply because I haven't had to yet (though, I
understand it's extremely useful).
My object entities tend to be a bit wide, so they're not something I'd
typically squeeze into a direct link for example (really long urls can
lead to undesired results w/some browsers). More often I squeeze the
object's ObjectId on actions related to specific data objects.
I would say that then you have had to use the squeezer but you did not
know it :-) I have recently started using Cayenne and I found that
Roberts squeezer is a wonderful piece of refactoring of exactly that
operation. Even if it is not difficult to implement why repeat that code
on several pages when the squeezer can do it.
I also found that the DataContext.getThreadDataContext() is very
convinient for getting hold of the DataContext.
http://objectstyle.org/cayenne/userguide/deploy/webapplicationcontextprovider.html
As a newbie on Cayenne I found that those two things made it rather easy
to get things running.
Hope that helps.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]