tomcat优化

1:hibernate.cfg.xml 连接池改为50
<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
    <session-factory>
        <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
   <property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:ora10</property>
        <property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
        <property name="connection.username">uuuuuu</property>
        <property name="connection.password">pppp</property>
        <property name="show_sql">false</property>
        <property name="connection.pool_size">50</property>
        <mapping resource="com/Person.hbm.xml"/>

   </session-factory>
</hibernate-configuration>
2:编辑catalina.bat
第一行加入SET JAVA_OPTS=-Xms850m -Xmx1300m
注释掉
rem set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

你可能感兴趣的:(tomcat)