Hi
Just wondering if there is any standard or recommendation for the
formatting of server.xml config file for tomcat.

Configuring properties for mysql jdbc driver is a good case in point:

        <Resource
                auth="Container"
                description="MySQL Datasource"
                name="jdbc/MySqlDataSource"
                type="javax.sql.DataSource"
                driverClassName="com.mysql.jdbc.Driver"

 
url="jdbc:mysql://10.10.10.10,20.20.20.20:3306/database1?failOverReadOnl
y=false&amp;autoCommit=true&amp;secondsBeforeRetryMaster=30"
                username="user"
                password="password"
                initialSize="40"

You have the "standard" properties that can be set as above but then the
mysql specific properties requires to be appended to the connection
string as above or  in the following format:

                <ResourceParams name="jdbc/gtaMySqlDataSource">
                        <parameter>
                          <name>useUsageAdvisor</name>
                          <value>true</value>
                        </parameter>
                </ResourceParams>

The above format is in a lot less readable in my opinion but I prefer it
over appending values to a connection string.

The following format also seems to be quite readable:
    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="1000" minSpareThreads="25"
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443"
acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

Regards

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Reply via email to