Subject | How to specify RoleName in the JNDI resource? |
---|---|
Author | Andrew Guts |
Post date | 2002-11-14T14:19:55Z |
Hello All,
I've defined and used DataSource with Tomcat 4.1.2. Now it is time to
test it under real account instead of SYSDBA user. My database security
based on roles. So how to provide role parameter to DateSource in
server.xml?
Thanks ahead
Andrew
PS: which place below?
<Resource name="jdbc/FE2" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/FE2">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
<parameter>
<name>username</name>
<value>TOMCAT</value>
</parameter>
<parameter>
<name>password</name>
<value>12345</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:firebirdsql:127.0.0.1/3050:/data/db?lc_ctype=WIN1251</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.firebirdsql.jdbc.FBDriver</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams>
I've defined and used DataSource with Tomcat 4.1.2. Now it is time to
test it under real account instead of SYSDBA user. My database security
based on roles. So how to provide role parameter to DateSource in
server.xml?
Thanks ahead
Andrew
PS: which place below?
<Resource name="jdbc/FE2" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/FE2">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
<parameter>
<name>username</name>
<value>TOMCAT</value>
</parameter>
<parameter>
<name>password</name>
<value>12345</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:firebirdsql:127.0.0.1/3050:/data/db?lc_ctype=WIN1251</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.firebirdsql.jdbc.FBDriver</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams>