更换数据库连接池,使用阿里的druid
diff --git a/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml.tpl b/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml.tpl
index 14bb999..d083742 100644
--- a/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml.tpl
+++ b/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml.tpl
@@ -22,6 +22,7 @@
<!--<Manager className="com.liferay.support.tomcat.session.SessionLessManagerBase" />-->
+ <!--
<Resource
name="jdbc/LiferayPool"
auth="Container"
@@ -34,6 +35,20 @@
maxIdle="10"
maxWait="100"
/>
+ -->
+
+ <Resource
+ name="jdbc/LiferayPool"
+ auth="Container"
+ type="javax.sql.DataSource"
+ factory="com.alibaba.druid.pool.DruidDataSourceFactory"
+ url="jdbc:oracle:thin:@dev.centos:1521:testdb"
+ username="portal1"
+ password="portal1"
+ maxActive="100"
+ maxIdle="30"
+ maxWait="10000"
+ />
<Resource
name="mail/MailSession"
@@ -44,4 +59,4 @@
mail.store.protocol="imap"
mail.imap.host="localhost"
/>
-</Context>
\ No newline at end of file
+</Context>
diff --git a/tomcat-7.0.42/conf/server.xml b/tomcat-7.0.42/conf/server.xml
index 42c0c57..dd41370 100644
--- a/tomcat-7.0.42/conf/server.xml
+++ b/tomcat-7.0.42/conf/server.xml
@@ -55,9 +55,9 @@
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
- maxThreads="150" minSpareThreads="4"/>
-->
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+ maxThreads="5000" minSpareThreads="400"/>
<!-- A "Connector" represents an endpoint by which requests are received
@@ -67,7 +67,7 @@
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
- <Connector port="8080" protocol="HTTP/1.1"
+ <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
<!-- A "Connector" using the shared thread pool-->
@@ -88,7 +88,7 @@
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />
+ <Connector executor="tomcatThreadPool" port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />
<!-- An Engine represents the entry point (within Catalina) that processes
diff --git a/tomcat-7.0.42/lib/druid-1.0.13.jar b/tomcat-7.0.42/lib/druid-1.0.13.jar
new file mode 100644
index 0000000..2a6008a
--- /dev/null
+++ b/tomcat-7.0.42/lib/druid-1.0.13.jar
Binary files differ