What's the best way to combine pools?
2 answers
Pooling is implemented in DataSource , and in both cases Hibernate will use the data source.
The question is which implementation of the data source is used and how it is configured:
- You can specify and configure the data source directly in the hibernation configuration.
- You can customize the data source in the application. server and specify the appropriate JNDI names in the hibernate configuration. In this case, you are using the data source implementation supplied with your application. server.
Performance wise, I think the implementation has little impact - more than whether you want yours to .war
depend on the resources managed by the application. server (case 2) or not (case 1). In case 1, C3P0 is preferred over DBCP.
+2
a source to share