code: @Override
      public void begin() {
          if(null != entityManager.get()) {
              throw new IllegalStateException("Work already begun on this thread. " +
                  "Looks like you have called UnitOfWork.begin() twice without a balancing call to end() in between.");
          }
  
          entityManager.set(EntityManagerProxyFactory.createProxy((HibernateEntityManagerFactory)entityManagerFactory));
      }
docs: /*
  This is called as the first thing in doFilter method in the Servlet filter.
  @see com.google.inject.persist.UnitOfWork#begin()