List of usage examples for javax.persistence EntityManagerFactory unwrap
public <T> T unwrap(Class<T> cls);
From source file:com.supermy.base.service.WebMetaService.java
@Autowired public WebMetaService(EntityManagerFactory factory) { if (factory.unwrap(SessionFactory.class) == null) { throw new NullPointerException("factory is not a hibernate factory"); }// w w w. j a va 2s . c o m this.sessionfactory = factory.unwrap(SessionFactory.class); }