in jpa-container/src/main/java/org/apache/aries/jpa/container/impl/PersistenceBundleTracker.java [76:101]
public synchronized Bundle addingBundle(Bundle bundle, BundleEvent event) {
if(incompatibleExtender(bundle)) {
// We must not process bundles that we aren't compatible with
LOGGER.info("The bundle {} is wired to a different JPA Extender and must be ignored.",
bundle.getSymbolicName());
return null;
}
if(incompatibleClassSpace(bundle)) {
// We must not process bundles that we aren't compatible with
LOGGER.warn("The bundle {} does not share a class space with the JPA Extender and must be ignored.",
bundle.getSymbolicName());
return null;
}
if (event != null && event.getType() == BundleEvent.STOPPED) {
// Avoid starting persistence units in state STOPPED.
// TODO No idea why we are called at all in this state
return bundle;
}
if (getTrackers(bundle).isEmpty()) {
findPersistenceUnits(bundle, event);
}
return bundle;
}