java.lang.Object | |||
↳ | org.springframework.web.filter.GenericFilterBean | ||
↳ | org.springframework.web.filter.OncePerRequestFilter | ||
↳ | org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter |
Servlet 2.3 Filter that binds a JDO PersistenceManager to the thread for the entire processing of the request. Intended for the "Open PersistenceManager in View" pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed.
This filter makes JDO PersistenceManagers available via the current thread,
which will be autodetected by transaction managers. It is suitable for service
layer transactions via JdoTransactionManager
or JtaTransactionManager
as well
as for non-transactional read-only execution.
Looks up the PersistenceManagerFactory in Spring's root web application context.
Supports a "persistenceManagerFactoryBeanName" filter init-param in web.xml
;
the default bean name is "persistenceManagerFactory". Looks up the PersistenceManagerFactory
on each request, to avoid initialization order issues (when using ContextLoaderServlet,
the root application context will get initialized after this filter).
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_PERSISTENCE_MANAGER_FACTORY_BEAN_NAME |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.filter.OncePerRequestFilter
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.filter.GenericFilterBean
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the bean name of the PersistenceManagerFactory to fetch from Spring's
root application context.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Same contract as for
doFilter , but guaranteed to be
just invoked once per request. | |||||||||||
Return the bean name of the PersistenceManagerFactory to fetch from Spring's
root application context.
| |||||||||||
Look up the PersistenceManagerFactory that this filter should use,
taking the current HTTP request as argument.
| |||||||||||
Look up the PersistenceManagerFactory that this filter should use.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.filter.OncePerRequestFilter
| |||||||||||
From class
org.springframework.web.filter.GenericFilterBean
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
javax.servlet.Filter
| |||||||||||
From interface
org.springframework.beans.factory.BeanNameAware
| |||||||||||
From interface
org.springframework.beans.factory.DisposableBean
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.context.EnvironmentAware
| |||||||||||
From interface
org.springframework.web.context.ServletContextAware
|
Set the bean name of the PersistenceManagerFactory to fetch from Spring's root application context. Default is "persistenceManagerFactory".
Same contract as for doFilter
, but guaranteed to be
just invoked once per request. Provides HttpServletRequest and
HttpServletResponse arguments instead of the default ServletRequest
and ServletResponse ones.
IOException | |
---|---|
ServletException |
Return the bean name of the PersistenceManagerFactory to fetch from Spring's root application context.
Look up the PersistenceManagerFactory that this filter should use, taking the current HTTP request as argument.
Default implementation delegates to the lookupPersistenceManagerFactory
without arguments.
Look up the PersistenceManagerFactory that this filter should use. The default implementation looks for a bean with the specified name in Spring's root application context.