0 Replies Latest reply on Oct 20, 2008 3:05 PM by chahua wang

    How to setup hibernate-service.xml wihtout Jboss environment

    chahua wang Newbie

      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,


      This is a hibernate-service.xml file

       <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">
       <attribute name="CacheProviderClass">
       <attribute name="QueryCacheEnabled">true</attribute>