|
Discussed this in detail with Scott on IRC. Like I said, I had initially tried to remove org.hibernate.ejb.HibernatePersistence from Hibernate's META-INF/services/javax.persistence.spi.PersistenceProvider. That way, the only way it can be used as the provider is deployments which explicitly list that as the provider class : <provider>org.hibernate.ejb.HibernatePersistence</provider>, in which case the user is CLEARLY specifying the deprecated provider and should be warned.
META-INF/services/javax.persistence.spi.PersistenceProvider is all about dynamic discovery of providers and resolution of the provider to use in cases where the user did not specify which provider to use. In that case, there is no need for org.hibernate.ejb.HibernatePersistence to be listed in the service file.
When I originally tried to remove this from the Hibernate service file, it caused problems on WildFly. But in discussing this with Scott, I believe this is actually a problem in WildFly. So, for 5.0 (at least) I plan on removing org.hibernate.ejb.HibernatePersistence from the service file as the real solution to this.
Gail Badner We'll have to discuss a proper solution to this for 4.x. I don't think removing the entry is viable option there. Quite possibly the "solution" for 4.x is to wait for 5.0...
|