org.springframework.jdbc.datasource.DriverManagerD ataSource is it threadsafe?
We would like to know whether the following data source
org.springframework.jdbc.datasource开发者_开发问答.DriverManagerD ataSource
is threadsafe and can be used in production environment? Any links to a source that confirms it would be helpful.
regards aravias
No, you can not use DriverManagerDataSource
in production. Not because it is not thread safe (I believe it is), but because it does not perform any connection pooling, which results in horrible performance and unnecessary network overhead. See notes in Javadoc.
You should consider using DBCP or C3P0 data sources, DriverManagerDataSource
is fine only for testing purposes.
精彩评论