Author Message
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I believe the labels mean the same things. I am not sure how to verify if it behaves exactly the same. Tomcat DBCP is a separate component, and it's not quite visible to me how it really works.
marcomatticari
Joined: Feb 4, 2014
Messages: 28
Offline
Correct me if I did not understand...
Shifting the settings of context that creates OD in the tomcat global context, I am using a connection pool different from what I used to date, right?

Obviously we are always talking about well-tested functionality ... but I'm thinking about what I'll have to explain to my client :(..!



OLD -
<Resource name="jdbc/db_ctisvi_ulluser" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
..........
...........

NEW Create by OD
<Resource url="jdbc:oracle:thin:@rmgens02:1521:ctisvil"
type="org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS"
name="jdbc/db_ctisvi_ulluserCPDS"
factory="org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS"
driver="oracle.jdbc.driver.OracleDriver"
auth="Container"/>
................
................

<Resource type="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource"
name="jdbc/db_ctisvi_ulluser" factory="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSourceFactory"
.................
.................
marcomatticari
Joined: Feb 4, 2014
Messages: 28
Offline
That you know which is the most reliable?
Sorry if I do these stupid questions but in my reality working to make a small change .. we need the blessing of the pope!
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The main difference here is the datasource type (the implementation). The use of PerUserPoolDataSource instead of the generic DataSource allows you to supply username and password from Java code, which is the only way to support password encryption on app server like Tomcat. What you want to do is to share the connection pool among all the apps and modules. I think configuring the global context should help you to achieve that. Since you have to encryption the password, PerUserPoolDataSource is the only way. The only way you can convince your customer to accept the solution is through testing, and this is the must-have configuration for password encryption. Otherwise, you have to specify the username and password in the context in plain text.
marcomatticari
Joined: Feb 4, 2014
Messages: 28
Offline
thank you very much for your support :wink:
Go to:   
Mobile view