爪哇哇

          一個軟件分析師的博客

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

          applicationContext-hibernate.xml
          =============================
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "<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 李立波 閱讀(782) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          My Links

          Blog Stats

          News

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          文章檔案

          相冊

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 大厂| 中卫市| 那坡县| 六盘水市| 益阳市| 平阴县| 宁强县| 邵武市| 威海市| 中阳县| 桐庐县| 渑池县| 云阳县| 牟定县| 兴和县| 平山县| 增城市| 乐业县| 临沭县| 太湖县| 枣阳市| 木兰县| 兴安盟| 手机| 昂仁县| 柘城县| 溆浦县| 顺义区| 萨迦县| 济阳县| 扎囊县| 海宁市| 古蔺县| 库车县| 新巴尔虎右旗| 泰和县| 甘洛县| 海城市| 抚远县| 漯河市| 阳西县|