Hi John, We try not to use the CayenneFilter (just removed it from an application because it caused more issues than it solved). I thought there might be a place in 3.1 to stuff the ServerRuntime you initialized on application startup and I was just missing it, but perhaps I just need to save it off in a static somewhere.
Thanks, mrg On Thu, Feb 28, 2013 at 10:15 AM, John Huss <[email protected]> wrote: > If it's a servlet app, then the runtime is created in CayenneFilter and > bound to the thread for each request and you access it via > > WebUtil.getCayenneRuntime(servletContext); > > > Or you can get a context from the injector if you have bound that to a > thread: > > ObjectContext context = > CayenneRuntime.getThreadInjector().getInstance(ObjectContextFactory.class > ).createContext(); > > > If not a servlet app, then yeah, I'd just store it in a static variable or > application instance. > > > > On Thu, Feb 28, 2013 at 8:43 AM, Michael Gentry <[email protected] > >wrote: > > > Is there an existing place (class) in 3.1 to stuff a ServerRuntime > instance > > for global use or is it expected that you'll create a separate class to > > hold a static instance variable of ServerRuntime? > > > > Thanks, > > > > mrg > > >
