cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Servlet Filters
Date Thu, 20 Aug 2009 13:52:49 GMT
I'm starting to use the servlet filter setup
(http://cayenne.apache.org/doc/web-applications.html) and got it
working, but I'm wondering if there is a way to customize the DC
creation that I'm missing.

The WebApplicationContextFilter class calls
ServletUtil.getSessionContext(session).
ServletUtil.getSessionContext() checks for an existing DC with:

	    if (ctxt == null) {
                ctxt = DataContext.createDataContext();

Prior to switching to the servlet filter, I was creating my DC using
DataContext.createDataContext(false) because I was having caching
issues with not getting the freshest data from the DB.  Is there an
easy way to get the DC's created with the false parameter as the
default?  (Without having a custom build of Cayenne.)

Thanks,

mrg

Mime
View raw message