爪哇哇

一个软件分析师的博客

SPRING + HIBERNATE +OSWORKFLOW 的配置文件(2)

applicationContext-hibernate.xml
=============================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
 <bean id="sessionFactory"
  class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="configLocation">
   <value>classpath:hibernate.cfg.xml</value>
  </property>
 </bean>
</beans>

applicationContext-hibernate和applicationContext-service分开容易管理

hibernate.cfg.xml
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
        <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:jtds:sqlserver://172.1.1.11:1433/EMMS2 </property>
        <property name="hibernate.connection.username">sa</property>
        <property name="hibernate.connection.password">8888</property>
        <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>

        <property name="hibernate.query.substitutions">false 0, true 1</property>
        <!-- c3p0 connection pooling properties -->
        <property name="hibernate.c3p0.min_size">1</property>
        <property name="hibernate.c3p0.max_size">3</property>
        <!-- other hibernate properties -->
        <property name="hibernate.show_sql">true</property>
        <!-- <property name="hbm2ddl.auto">update</property> -->
        
        <mapping resource="com/opensymphony/workflow/spi/hibernate3/HibernateCurrentStep.hbm.xml"/>
   <mapping resource="com/opensymphony/workflow/spi/hibernate3/HibernateHistoryStep.hbm.xml"/>
   <mapping resource="com/opensymphony/workflow/spi/hibernate3/HibernateWorkflowEntry.hbm.xml"/>

    </session-factory>
</hibernate-configuration>

posted on 2007-01-25 16:08 李立波 阅读(768) 评论(0)  编辑  收藏


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


网站导航:
 

My Links

Blog Stats

News

常用链接

留言簿(5)

随笔分类

随笔档案

文章档案

相册

搜索

最新评论

阅读排行榜

评论排行榜