0 Replies Latest reply on Mar 24, 2008 1:21 AM by jscoobyced

    JBoss + Hibernate + Datasource

    jscoobyced

      Hi,

      I have set JBoss, bound a datasource for MySql. I have create the .har file and put all my stuff in the .ear.
      I got the "Unable to find a JTA..." error, and I found through this forum that I need to use the CMTTransactionFactory since I am in a Container Managed Transaction configuration.
      By default JBoss uses the JTA... but what I can't find is where this default setting can be modified, and is it possible to do it only for my .ear?
      Since there is no use of the hibernate.cfg.xml file, how can I do?
      Thanks.
      My configuration:
      jschr.har/META-INF/jboss-service.xml

      <mbean code="org.jboss.hibernate.jmx.Hibernate"
       name="jboss.har:service=Hibernate">
       <depends>jboss:service=TransactionManager</depends>
       <attribute name="DatasourceName">java:/JSCHRMySqlDS</attribute>
       <attribute name="SessionFactoryName">SessionFactory</attribute>
       <attribute name="Dialect">
       org.hibernate.dialect.MySQLInnoDBDialect
       </attribute>
       <attribute name="CacheProviderClass">
       org.hibernate.cache.HashtableCacheProvider
       </attribute>
      </mbean>