List of usage examples for javax.persistence EntityManagerFactory hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:com.github.fharms.camel.route.CamelEntityManagerBean.java
public Integer compareHashCode(Exchange exchange) { CamelContext context = exchange.getContext(); EntityManagerFactory currentEm = em.getEntityManagerFactory(); if (currentEm.hashCode() != context.getComponent("jpa", JpaComponent.class).getEntityManagerFactory() .hashCode()) {/*from w ww . j a va 2s. com*/ throw new RuntimeException("This is not good!"); } return currentEm.hashCode(); }