<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 3.8.4\. JMX部署 為了將`SessionFactory`注冊到JNDI中,`cfg.buildSessionFactory()`這行代碼仍需在某處被執行. 你可在一個`static`初始化塊(像`HibernateUtil`中的那樣)中執行它或將Hibernate部署為一個_托管的服務_. 為了部署在一個支持JMX的應用程序服務器上,Hibernate和 `org.hibernate.jmx.HibernateService`一同分發,如Jboss AS。 實際的部署和配置是由應用程序服務器提供者指定的. 這里是JBoss 4.0.x的`jboss-service.xml`樣例: ``` <?xml version="1.0"?> <server> <mbean code="org.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,name=HibernateFactory"> <!-- 必須的服務 --> <depends>jboss.jca:service=RARDeployer</depends> <depends>jboss.jca:service=LocalTxCM,name=HsqlDS</depends> <!-- 將Hibernate服務綁定到JNDI --> <attribute name="JndiName">java:/hibernate/SessionFactory</attribute> <!-- 數據源設置 --> <attribute name="Datasource">java:HsqlDS</attribute> <attribute name="Dialect">org.hibernate.dialect.HSQLDialect</attribute> <!-- 事務集成 --> <attribute name="TransactionStrategy"> org.hibernate.transaction.JTATransactionFactory</attribute> <attribute name="TransactionManagerLookupStrategy"> org.hibernate.transaction.JBossTransactionManagerLookup</attribute> <attribute name="FlushBeforeCompletionEnabled">true</attribute> <attribute name="AutoCloseSessionEnabled">true</attribute> <!-- 抓取選項 --> <attribute name="MaximumFetchDepth">5</attribute> <!-- 二級緩存 --> <attribute name="SecondLevelCacheEnabled">true</attribute> <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute> <attribute name="QueryCacheEnabled">true</attribute> <!-- 日志 --> <attribute name="ShowSqlEnabled">true</attribute> <!-- 映射定義文件 --> <attribute name="MapResources">auction/Item.hbm.xml,auction/Category.hbm.xml</attribute> </mbean> </server> ``` 這個文件是部署在`META-INF`目錄下的, 并會被打包到以`.sar` (service archive)為擴展名的JAR文件中. 同時,你需要將Hibernate、它所需要的第三方庫、你編譯好的持久化類以及你的映射定義文件打包進同一個文檔. 你的企業Bean(一般為會話Bean)可能會被打包成它們自己的JAR文件, 但你也許會將EJB JAR文件一同包含進能獨立(熱)部署的主服務文檔. 參考JBoss AS文檔以了解更多的JMX服務與EJB部署的信息.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看