Package org.springframework.orm.jdo

Examples of org.springframework.orm.jdo.PersistenceManagerHolder


      participate = true;
    }
    else {
      logger.debug("Opening JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
      PersistenceManager pm = PersistenceManagerFactoryUtils.getPersistenceManager(pmf, true);
      TransactionSynchronizationManager.bindResource(pmf, new PersistenceManagerHolder(pm));
    }

    try {
      filterChain.doFilter(request, response);
    }

    finally {
      if (!participate) {
        PersistenceManagerHolder pmHolder = (PersistenceManagerHolder)
            TransactionSynchronizationManager.unbindResource(pmf);
        logger.debug("Closing JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
        PersistenceManagerFactoryUtils.releasePersistenceManager(pmHolder.getPersistenceManager(), pmf);
      }
    }
  }
View Full Code Here


    else {
      logger.debug("Opening JDO PersistenceManager in OpenPersistenceManagerInViewInterceptor");
      PersistenceManager pm =
          PersistenceManagerFactoryUtils.getPersistenceManager(getPersistenceManagerFactory(), true);
      TransactionSynchronizationManager.bindResource(
          getPersistenceManagerFactory(), new PersistenceManagerHolder(pm));
    }
  }
View Full Code Here

      else {
        request.removeAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST);
      }
    }
    else {
      PersistenceManagerHolder pmHolder = (PersistenceManagerHolder)
          TransactionSynchronizationManager.unbindResource(getPersistenceManagerFactory());
      logger.debug("Closing JDO PersistenceManager in OpenPersistenceManagerInViewInterceptor");
      PersistenceManagerFactoryUtils.releasePersistenceManager(
          pmHolder.getPersistenceManager(), getPersistenceManagerFactory());
    }
  }
View Full Code Here

      participate = true;
    }
    else {
      logger.debug("Opening JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
      PersistenceManager pm = PersistenceManagerFactoryUtils.getPersistenceManager(pmf, true);
      TransactionSynchronizationManager.bindResource(pmf, new PersistenceManagerHolder(pm));
    }

    try {
      filterChain.doFilter(request, response);
    }

    finally {
      if (!participate) {
        PersistenceManagerHolder pmHolder = (PersistenceManagerHolder)
            TransactionSynchronizationManager.unbindResource(pmf);
        logger.debug("Closing JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
        PersistenceManagerFactoryUtils.releasePersistenceManager(pmHolder.getPersistenceManager(), pmf);
      }
    }
  }
View Full Code Here

    else {
      logger.debug("Opening JDO PersistenceManager in OpenPersistenceManagerInViewInterceptor");
      PersistenceManager pm =
          PersistenceManagerFactoryUtils.getPersistenceManager(getPersistenceManagerFactory(), true);
      TransactionSynchronizationManager.bindResource(
          getPersistenceManagerFactory(), new PersistenceManagerHolder(pm));
    }
  }
View Full Code Here

      else {
        request.removeAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST);
      }
    }
    else {
      PersistenceManagerHolder pmHolder = (PersistenceManagerHolder)
          TransactionSynchronizationManager.unbindResource(getPersistenceManagerFactory());
      logger.debug("Closing JDO PersistenceManager in OpenPersistenceManagerInViewInterceptor");
      PersistenceManagerFactoryUtils.releasePersistenceManager(
          pmHolder.getPersistenceManager(), getPersistenceManagerFactory());
    }
  }
View Full Code Here

      participate = true;
    }
    else {
      logger.debug("Opening JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
      PersistenceManager pm = PersistenceManagerFactoryUtils.getPersistenceManager(pmf, true);
      TransactionSynchronizationManager.bindResource(pmf, new PersistenceManagerHolder(pm));
    }

    try {
      filterChain.doFilter(request, response);
    }

    finally {
      if (!participate) {
        PersistenceManagerHolder pmHolder = (PersistenceManagerHolder)
            TransactionSynchronizationManager.unbindResource(pmf);
        logger.debug("Closing JDO PersistenceManager in OpenPersistenceManagerInViewFilter");
        PersistenceManagerFactoryUtils.releasePersistenceManager(pmHolder.getPersistenceManager(), pmf);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.orm.jdo.PersistenceManagerHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.