posts - 0,  comments - 1,  trackbacks - 0
<? 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 " >

<!--  Generated by MyEclipse Hibernate Tools.                    -->
< hibernate - configuration >

< session - factory >
    
< property name = " myeclipse.connection.profile " > MSSQL </ property >
    
< property name = " connection.url " > jdbc:jtds:sqlserver: // 192.168.56.32:1433/itdb</property>
     < property name = " connection.username " >dada </ property >
    
< property name = " connection.password " > dada </ property >
    
< property name = " connection.driver_class " > net.sourceforge.jtds.jdbc.Driver </ property >
    
< property name = " dialect " > org.hibernate.dialect.SQLServerDialect </ property >
    
< property name = " session_factory_name " > DerekSessionFactory </ property >
    
< property name = " show_sql " > false </ property >
    
< property name = " hibernate.jdbc.fetch_size " > 50 </ property >
    
< property name = " hibernate.jdbc.batch_size " > 20 </ property >

    
< mapping resource = " hbm/OvertimeAdmin.hbm.xml "   />
    
< mapping resource = " hbm/OvertimeAgent.hbm.xml "   />
    
< mapping resource = " hbm/OvertimePermit.hbm.xml "   />
    
< mapping resource = " hbm/OvertimeRecord.hbm.xml "   />

</ session - factory >

</ hibernate - configuration >

使用连接池的配置
<?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">

<!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration>

<session-factory>
    
<property name="myeclipse.connection.profile">MSSQL</property>
    
<property name="connection.datasource">java:comp/env/jdbc/itdb</property>
    <property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
    
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
    
<property name="session_factory_name">DerekSessionFactory</property>
    
<property name="show_sql">false</property>
    
<property name="hibernate.jdbc.fetch_size">50</property>
    
<property name="hibernate.jdbc.batch_size">20</property>

    
<mapping resource="hbm/OvertimeAdmin.hbm.xml" />
    
<mapping resource="hbm/OvertimeAgent.hbm.xml" />
    
<mapping resource="hbm/OvertimePermit.hbm.xml" />
    
<mapping resource="hbm/OvertimeRecord.hbm.xml" />

</session-factory>

</hibernate-configuration>
posted on 2008-03-27 17:36 火焰出林 阅读(559) 评论(0)  编辑  收藏 所属分类: J2EE

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


网站导航:
 
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

留言簿(1)

随笔分类

文章分类(25)

文章档案(23)

新闻档案(8)

相册

最新随笔

搜索

  •  

最新评论