随笔-295  评论-26  文章-1  trackbacks-0

Server.xml  : 
<GlobalNamingResources>
        <!-- Test entry for demonstration purposes -->
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
        <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
        <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
     <!--  
        <Resource
            auth="Container"
            name="jdbc/PathPlat"
            type="javax.sql.DataSource"
            password=""
            driverClassName="net.sourceforge.jtds.jdbc.Driver"
            maxIdle="50"
            maxWait="5000"
            username="sa"
            url="jdbc:jtds:sqlserver://192.168.0.155:1433/pathplat;tds=8.0;lastupdatecount=true"
            removeAbandoned="true"
            removeAbandonedTimeout="60"
            maxActive="100"/>    -->
          
        <Resource
            name="jdbc/PathPlat"
            auth="Container"
            type="javax.sql.DataSource"
            password=""
            driverClassName="oracle.jdbc.driver.OracleDriver"
            maxIdle="50"
            maxWait="5000"
            username="tep"
            url="jdbc:oracle:thin:@192.168.0.166:1521:w"
            removeAbandoned="true"
            removeAbandonedTimeout="60"
            maxActive="100"/>
      
    </GlobalNamingResources>
context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/PathCrm" reloadable="true">
  <ResourceLink global="jdbc/PathPlat" name="jdbc/PathPlat" type="javax.sql.DataSource"/>
</Context>
hibernate.cfg.xml:
<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

    <session-factory>

        <!-- Database connection settings -->
        <property  name="connection.datasource">java:comp/env/jdbc/PathPlat</property> 

        <!-- SQL dialect -->
        <!--<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>-->
        <property name="dialect">org.hibernate.dialect.OracleDialect</property>

        <!-- Enable Hibernate's automatic session context management -->
        <property name="current_session_context_class">thread</property>

        <!-- Disable the second-level cache  -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">false</property>

 <mapping resource="/wms/entity/WmsAdjustStoreCmdt.hbm.xml"/>
        <mapping resource="/wms/entity/WmsStorage.hbm.xml"/>
  
    </session-factory>

</hibernate-configuration>



大盘预测 国富论
posted on 2007-08-15 10:44 华梦行 阅读(148) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: