Oliver Drotbohm opened SPR-11333 and commented
Assume you configure an EntityManagerFactoryBean with a packagesToScan. If the classpath contains a persistence.xml with a persistence unit name of default this one will be used instead of the one implicitly created by the package scan. This is probably a bit surprising.
While one could argue, that as soon as you configure a packagesToScan, that particular EMFB shouldn't actually look for other PUs anymore, I thing the least we should do is logging the name of the PU used eventually.
Affects: 3.2.6, 4.0 GA
Referenced from: commits 88730bd, c77832b
Backported to: 3.2.7