in jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java [55:71]
public Object preCall(ComponentMetadata cm, Method m, Object... parameters) throws Throwable {
if (coordinator == null || em == null) {
initServices();
}
try {
LOG.debug("PreCall for bean {}, method {}", cm.getId(), m.getName());
Coordination coordination = coordinator.begin("jpa", 0);
boolean weControlTx = isResourceLocal(em) && !em.getTransaction().isActive();
if (weControlTx) {
coordination.addParticipant(new ResourceLocalTransactionParticipant(em));
}
return coordination;
} catch (Exception e) {
LOG.warn("Exception from EmSupplier.preCall", e);
throw new RuntimeException(e); // NOSONAR
}
}