Details
-
Bug
-
Resolution: Done
-
Major
-
7.0.2.Final
-
None
Description
When more then one persistence provider is found in an application an exception is thrown even if persistence.xml explicitly specifies the provider to be used:
// collect list of persistence providers packaged with the application final List<String> providerNames = servicesAttachment.getServiceImplementations(PersistenceProvider.class.getName()); if (providerNames.size() > 1) { // TODO: support more than one provider to be packaged, which requires // knowing which adapter belongs with it. throw MESSAGES.onlyOnePersistenceProviderAllowed(providerNames); }
The solution could be to attach the of persistence provider classes and integration adaptors classes to PersistenceProviderDeploymentHolder