You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/03/11 14:28:54 UTC

DO NOT REPLY [Bug 27603] New: - Resource params lacks nested params feature

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27603>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27603

Resource params lacks nested params feature

           Summary: Resource params lacks nested params feature
           Product: Tomcat 4
           Version: 4.1.29
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: erik.w.rasmussen@tietoenator.com


When using a JNDI datasource in Tomcat you specify something like this in the 
server.xml:

<Resource name="jdbc/revireg" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/revireg">
<parameter> 
<name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</valu
e></parameter>
<parameter><name>driverClassName</name><value>com.microsoft.jdbc.sqlserver.SQLS
erverDriver</value></parameter>
<parameter> <name>url</name><value>jdbc:microsoft:sqlserver://WS-WEBREG-
QDL:1085</value></parameter>
<parameter><name>username</name><value>qdl</value></parameter>
etc ...
</ResourceParams>

Now the problem is that there is no way to specify driver specific properties. 
Fex. the MS SQL Server jdbc driver has a property called 'selectMethod' which 
can be set to either 'direct' or 'cursor'.

The BasicDataSource class used in the above configuration supports driver 
specific properties via the 'addConnectionProperty(String name, String value)' 
method. The ResourceParams class however does not support nested properties, 
ie. something like:

<ResourceParams name="jdbc/revireg">

....

<nestedparameter name="connectionProperty">
  <parameter><name>selectMethod</name><value>cursor</value></parameter>
</nestedparameter>

....

</ResourceParams>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org