Class SpringPersistenceManagerProxyBean

    • Method Detail

      • setPersistenceManagerFactory

        public void setPersistenceManagerFactory​(javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
        Set the target PersistenceManagerFactory for this proxy.
      • getPersistenceManagerFactory

        protected javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
        Return the target PersistenceManagerFactory for this proxy.
      • setJdoDialect

        public void setJdoDialect​(JdoDialect jdoDialect)
        Set the JDO dialect to use for this proxy.

        Default is a DefaultJdoDialect based on the PersistenceManagerFactory's underlying DataSource, if any.

      • setPersistenceManagerInterface

        public void setPersistenceManagerInterface​(Class<? extends javax.jdo.PersistenceManager> persistenceManagerInterface)
        Specify the PersistenceManager interface to expose, possibly including vendor extensions.

        Default is the standard javax.jdo.PersistenceManager interface.

      • setAllowCreate

        public void setAllowCreate​(boolean allowCreate)
        Set whether the PersistenceManagerFactory proxy is allowed to create a non-transactional PersistenceManager when no transactional PersistenceManager can be found for the current thread.

        Default is "true". Can be turned off to enforce access to transactional PersistenceManagers, which safely allows for DAOs written to get a PersistenceManager without explicit closing (i.e. a PersistenceManagerFactory.getPersistenceManager() call without corresponding PersistenceManager.close() call).

        See Also:
        PersistenceManagerFactoryUtils.getPersistenceManager(javax.jdo.PersistenceManagerFactory, boolean)
      • isAllowCreate

        protected boolean isAllowCreate()
        Return whether the PersistenceManagerFactory proxy is allowed to create a non-transactional PersistenceManager when no transactional PersistenceManager can be found for the current thread.
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • 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>