Tomcat1配置:
<!--配置server.xml
去掉8080端口,即注释掉如下代码:-->
<Connector
port="8080"maxThreads="150"minSpareThreads="25"maxSpareThreads="75"
enableLookups="false"redirectPort="8443"acceptCount="100"
debug="0"connectionTimeout="20000"
disableUploadTimeout="true"/>

<!--配置8009端口如下:-->
<Connectorport="8009"
maxThreads="500"minSpareThreads="400"maxSpareThreads="450"
enableLookups="false"redirectPort="8443"debug="0"
protocol="AJP/1.3"/>
<!--配置引擎-->
<Enginename="Catalina"defaultHost="localhost"debug="0"jvmRoute=
"tomcat1">

启动内存配置,开发configuretomcat程序即可配置:
Initialmemorypool:200M
Maxinummemorypool:300M
Tomcat2配置:
配置和tomcat1差不多,需要改动的地方如下:
<!--配置引擎-->
<Enginename="Catalina"defaultHost="localhost"debug="0"jvmRoute=
"tomcat2">

启动内存配置,开发configuretomcat程序即可配置:
Initialmemorypool:512M
Maxinummemorypool:768M
Mysql配置:
Server类型:DedicatedMySQLServerMachine
Databaseusage:TransationalDatabaseOnly
并发连接数量:OnlineTransactionProcessing(OLTP)
字符集:UTF8
数据库连接池的配置:
我们采用的是spring框架,配置如下:
<propertyname="hibernateProperties">
<props>
<propkey="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<propkey="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop>
<propkey="hibernate.connection.url">jdbc:mysql://202.88.1.103/db</prop>
<propkey="hibernate.connection.username">sa</prop>
<propkey="hibernate.connection.password"></prop>

<propkey="hibernate.show_sql">false</prop>
<propkey="hibernate.use_sql_comments">false</prop>

<propkey="hibernate.cglib.use_reflection_optimizer">true</prop>
<propkey="hibernate.max_fetch_depth">2</prop>

<propkey="hibernate.c3p0.max_size">200</prop>
<propkey="hibernate.c3p0.min_size">5</prop>
<propkey="hibernate.c3p0.timeout">12000</prop>
<propkey="hibernate.c3p0.max_statements">50</prop>
<propkey="hibernate.c3p0.acquire_increment">1</prop>
</props>
</property>