Hi All,

I have a web application that communicate with a  DB2 Database. 
There are multiple users that need to authenitcate them before using the
application.
Each user has just a role and the are 3 roles.
I need to access to a DB2 database using those 3 different roles in order to
limite the access to some tables' rows. 
So i tried to use the PerUserPerUserPoolDataSource in order to use the
method getConnection(user,pass) not provided in the BasicDataSource but i
got some problem.

So i decided to define 3 Resource element in the context.xml (one for each
role) and when i need to create a specific datasource based on the role i
use cxt.lookup( "jdbc/" + roleName )

I have 2 question:

1) Do you think it is a good solution
2) It is better have a DAO object with a list of datasource or a list of DAO
objects (one for each DataSource)

Thanks in advance,

Claudio
-- 
View this message in context: 
http://www.nabble.com/Different-resources-for-different-user-roles-tp23525487p23525487.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to