0 Replies Latest reply on Oct 20, 2008 3:06 PM by chwang

    How to setup hibernate-service.xml wihtout Jboss environment

      Hi Folks,

      I can put my hibernate object into a har file, and deployed in the jboss.

      in my code, I need to look up "java:/hibernate/SessionFactory"

      new InitialContext().lookup("java:/hibernate/SessionFactory");

      This name is also matched in hibernate-service.xml file.

      I wonder if we don't put my hibernate object into jboss environment. How can i set up this hibernate-service.xml in the test environment?
      Please help. Thank you,

      Chaohua


      This is a hibernate-service.xml file
      Code:

      Code:

      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
       <attribute name="DatasourceName">java:/RewardsDS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
       <atttribute name="transaction.manager_lookup_class">
       org.hibernate.transaction.JBossTransactionManagerLookup</atttribute>
       <attribute name="CacheProviderClass">
       org.hibernate.cache.HashtableCacheProvider
       </attribute>
       <attribute name="QueryCacheEnabled">true</attribute>
       </mbean>
      </server>