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>