code: public void init() {
          if (incNestingCount() > 1) {
              return;
          }
          SessionFactory sf = getSessionFactory();
          if (sf == null) {
              return;
          }
          if (TransactionSynchronizationManager.hasResource(sf)) {
              // Do not modify the Session: just set the participate flag.
              setParticipate(true);
          }
          else {
              setParticipate(false);
              LOG.debug("Opening single Hibernate session in HibernatePersistenceContextInterceptor");
              Session session = getSession();
              HibernateRuntimeUtils.enableDynamicFilterEnablerIfPresent(sf, session);
              TransactionSynchronizationManager.bindResource(sf, new SessionHolder(session));
          }
      }
docs: /* (non-Javadoc)
  @see org.codehaus.groovy.grails.support.PersistenceContextInterceptor#init()