Difference between 'dbcp.dbcp2.BasicDataSourceFactory' and 'jdbc.pool.DataSourceFactory'

Viewed 777

Just to give slight background, I needed to encrypt the username/password fields of server.xml(TOMCAT) using the custom DataSourceFactory implementation.

There were many good answers and while some of them explained while extending org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory whereas some of the answers had org.apache.tomcat.jdbc.pool.DataSourceFactory extended.

Some of the links I referred:

How to avoid storing passwords in the clear for tomcat's server.xml Resource definition of a DataSource?

https://www.experts-exchange.com/articles/3624/Encrypt-username-and-password-for-JNDI-in-Tomcat-Server-xml.html

http://www.jdev.it/encrypting-passwords-in-tomcat/

So the question in my mind is what's the difference between the two and which one should be preferred when?

0 Answers
Related