posts - 37, comments - 9, trackbacks - 0, articles - 0

          Hibernate In Action Note

          Posted on 2005-09-05 22:14 飛翔 閱讀(237) 評論(0)  編輯  收藏 所屬分類: JavaDataBase
          1.(Hibernate with a connection pool in a non-managed environment)
          Using hibernate.properties for C3P0 connection pool settings:
          hibernate.connection.driver_class = org.postgresql.Driver
          hibernate.connection.url = jdbc:postgresql://localhost/auctiondb
          hibernate.connection.username = auctionuser
          hibernate.connection.password = secret
          hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect
          hibernate.c3p0.min_size=5
          hibernate.c3p0.max_size=20
          hibernate.c3p0.timeout=300
          hibernate.c3p0.max_statements=50
          hibernate.c3p0.idle_test_period=3000
          2.(Hibernate in a managed environment with an application server)
          hibernate.connection.datasource = java:/comp/env/jdbc/AuctionDB
          hibernate.transaction.factory_class = \
          net.sf.hibernate.transaction.JTATransactionFactory
          hibernate.transaction.manager_lookup_class = \
          net.sf.hibernate.transaction.JBossTransactionManagerLookup
          hibernate.dialect = net.sf.hibernate.dialect.PostgreSQLDialect

          結合spring 后就不是這樣了,可以右spring 控制transaction & datasource &...
          主站蜘蛛池模板: 东乌珠穆沁旗| 苏尼特右旗| 阿拉尔市| 康定县| 济南市| 乌鲁木齐县| 灵丘县| 广河县| 邯郸市| 通化市| 大邑县| 丰都县| 思南县| 拜城县| 石屏县| 华亭县| 祥云县| 和平县| 镇康县| 陆川县| 铜梁县| 社旗县| 松溪县| 南涧| 武隆县| 全南县| 宣化县| 从化市| 阜城县| 南郑县| 盘山县| 孝感市| 米泉市| 三门峡市| 芷江| 阿拉善左旗| 上虞市| 天水市| 河东区| 惠安县| 郧西县|