Mantis - Resin
Viewing Issue Advanced Details
4908 minor always 12-27-11 12:13 11-11-14 15:42
alex  
ferg  
normal  
closed 4.0.24  
fixed  
none    
none 4.0.42  
0004908: Spring / Persistence integration
Resin4.0.24 always deploys persistence unit when it starts
Resin4.0.24 always deploys persistence unit when it starts since it integrated with eclipselink 2.3.0. However I use Spring in my web application and set datasource to LocalContainerEntityManager which will be set to PersistenceUnitInfo as nonJtaDataSource, all of this will be done after resin started thus Spring cannot update persistenceUnitInfo anymore and I got such error when retrieving data from MySql Database:
....

Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseExcepti on
Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform
at org.eclipse.persistence.exceptions.DatabaseExcepti on.unableToAcquireConnectionFromDriverException(Da tabaseException.java:376)

...

Because I use database connection pool, I moved the database related settings to spring's configuration file, so the persistence.xml has no database connection settings.

There are no notes attached to this issue.