Community
Participate
Working Groups
When the persistence unit bundle is being stopped then the provider.unregisterPersistenceUnits method is called, which then calls GeminiServiceUtil.unregisterEMFService. It calls stopTrackingDataSourceFactory, which causes the removedService method to be invoked. This is not expected and causes premature EMF.close(), so the EMF is already closed before the unregisterPersistenceUnits expects it to be. The code is not broken since the EMF does get closed, which is what needs to happen anyway, but it just gets closed earlier than what was expected. The code should be cleaned up and follow a code flow that is better documented and easier to understand.
Reworked the DSF tracker code when adding the dependency tracking.