Class TransactionAwarePersistenceManagerFactoryProxy

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String MMC_USER_OBJECT_KEY
      Key of the key-value pair into the map of the PM's user objects, we store the Isis MetaModelContext to.
      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Field Detail

      • MMC_USER_OBJECT_KEY

        public static final String MMC_USER_OBJECT_KEY
        Key of the key-value pair into the map of the PM's user objects, we store the Isis MetaModelContext to.
        See Also:
        PersistenceManager.putUserObject(Object, Object), Constant Field Values
    • Method Detail

      • setTargetPersistenceManagerFactory

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

        public javax.jdo.PersistenceManagerFactory getTargetPersistenceManagerFactory()
        Return the target JDO PersistenceManagerFactory that this proxy delegates to.
      • 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.
      • getObject

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

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

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