<?
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 2006-03-24 09:46
Derek.Guo 阅读(379)
评论(0) 编辑 收藏 所属分类:
Java