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

          Hibernate In Action Note

          Posted on 2005-09-05 22:14 飛翔 閱讀(238) 評論(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

          結(jié)合spring 后就不是這樣了,可以右spring 控制transaction & datasource &...
          主站蜘蛛池模板: 湘阴县| 安丘市| 屏东市| 商南县| 石屏县| 孝昌县| 龙胜| 灵璧县| 泸溪县| 远安县| 临漳县| 阜阳市| 农安县| 大洼县| 常熟市| 武安市| 昭通市| 岳阳县| 分宜县| 涿州市| 镇巴县| 宁陵县| 武强县| 沈阳市| 扎囊县| 原阳县| 容城县| 饶平县| 黔西| 华安县| 锡林浩特市| 周至县| 滦南县| 金寨县| 天全县| 木里| 武威市| 翁牛特旗| 娄底市| 威海市| 浮梁县|