[syncope-users] Datasource configuration with jndi

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-users] Datasource configuration with jndi

Ernst
Hi,

I think that in the class org.syncope.core.init.ContentLoader the Autowired declaration of private DataSource localDataSource; field should have been annotated with @Qualifier("dataSoource") or should have had the name dataSource.

If you want to run Syncope, using a jndi DataSource, this class still runs with the local DataSource named localDatasource from the persisnteceContext.xml. So If you do not want to use the properties file persistence.properties, this class will crash, because it cannot login to the correct database.

Do you agree? And if you agree, is it possible to change this in the core sources of Syncope?

Regards,
Ernst
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [syncope-users] Datasource configuration with jndi

Francesco Chicchiriccò
Administrator
On 08/06/2011 08:48, Ernst wrote:
Hi,

I think that in the class org.syncope.core.init.ContentLoader the Autowired declaration of private DataSource localDataSource; field should have been annotated with @Qualifier("dataSoource") or should have had the name dataSource.

If you want to run Syncope, using a jndi DataSource, this class still runs with the local DataSource named localDatasource from the persisnteceContext.xml. So If you do not want to use the properties file persistence.properties, this class will crash, because it cannot login to the correct database.

Do you agree? And if you agree, is it possible to change this in the core sources of Syncope?

Thanks for your contribution Ernst!
Things are like this because of some unexpected behavior that used to occur in the past with DBUnit and Spring DataSource: since now many aspects have changed (JPA version, the way how ContentLoader is called, ...) I do believe that it should be possible to achieve what you write above.

For this I've opened issue 124 (https://code.google.com/p/syncope/issues/detail?id=124).

Cheers.
-- 
Francesco Chicchiriccò

"Computer Science is no more about computers than astronomy
is about telescopes." (E. W. Dijkstra)
Loading...