this.managedFactory = factory; this.delegate = factory.getEntityManagerFactory();
throw new IllegalStateException("It is illegal to close an injected SessionFactory");
getSessionFactory().evict(persistentClass);
getSessionFactory().evict(persistentClass, id);
getSessionFactory().evictCollection(roleName);
getSessionFactory().evictCollection(roleName, id);
getSessionFactory().evictEntity(entityName);
getSessionFactory().evictEntity(entityName, id);
getSessionFactory().evictQueries();
getSessionFactory().evictQueries(cacheRegion);
return getSessionFactory().getAllClassMetadata();
return getSessionFactory().getAllCollectionMetadata();
return getSessionFactory().getClassMetadata(persistentClass);
return getSessionFactory().getClassMetadata(entityName);
return getSessionFactory().getCollectionMetadata(roleName);
return getSessionFactory().getCurrentSession();
return getSessionFactory().getDefinedFilterNames();
return delegate;
return getSessionFactory().getFilterDefinition(filterName);
return getSessionFactory().getReference();
return ((HibernateEntityManagerFactory)getDelegate()).getSessionFactory();
return getSessionFactory().getStatistics();
return getSessionFactory().isClosed();
return getSessionFactory().openSession(interceptor);
return getSessionFactory().openSession(connection, interceptor);
return getSessionFactory().openSession();
return getSessionFactory().openSession(connection);
return getSessionFactory().openStatelessSession();
return getSessionFactory().openStatelessSession(connection);
String kernelName = in.readUTF(); PersistenceUnitDeployment deployment = PersistenceUnitRegistry.getPersistenceUnit(kernelName); if (deployment == null) throw new IOException("Unable to find persistence unit in registry: " + kernelName); managedFactory = deployment.getManagedFactory(); delegate = managedFactory.getEntityManagerFactory();
out.writeUTF(managedFactory.getKernelName());