Class StandardPersistenceManagerProxyBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.FactoryBean<javax.jdo.PersistenceManager>

    public class StandardPersistenceManagerProxyBean
    extends Object
    implements org.springframework.beans.factory.FactoryBean<javax.jdo.PersistenceManager>
    Proxy that implements the PersistenceManager interface, delegating to a thread-bound PersistenceManager on each invocation - as defined by the JDO 3.0 specification. This class makes such a standard JDO PersistenceManager proxy available for bean references.

    The main advantage of this proxy is that it allows DAOs to work with a plain JDO PersistenceManager reference in JDO 3.0 style (see PersistenceManagerFactory.getPersistenceManagerProxy()), exposing the exact behavior that the target JDO provider implements.

    See Also:
    SpringPersistenceManagerProxyBean, PersistenceManagerFactory.getPersistenceManagerProxy()
    • Method Detail

      • setPersistenceManagerFactory

        public void setPersistenceManagerFactory​(javax.jdo.PersistenceManagerFactory pmf)
        Set the target JDO PersistenceManagerFactory that this proxy should delegate to. This should be the raw PersistenceManagerFactory, as accessed by JdoTransactionManager.
        See Also:
        JdoTransactionManager
      • getObject

        public javax.jdo.PersistenceManager getObject()
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<javax.jdo.PersistenceManager>
      • getObjectType

        public Class<? extends javax.jdo.PersistenceManager> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<javax.jdo.PersistenceManager>
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<javax.jdo.PersistenceManager>