Thread:
 Mr. Murphy 
 csak   29 Oct 2003, 10:52 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: csak (29 Oct 2003, 10:52) Replies: 0, Views: 39164
Subject: Mr. Murphy
I'm a newbie at J2EE technoilogies, so this might not be relevant.
For my installation of JBoss (3.2.1) the UserTransaction service's JNDI
name is not "java:/UserTransaction" but "UserTransaction". This can be
verified on the JMX console.
Thus the correct syntax of a hibernate2 service would be:

<server>
<mbean code="net.sf.hibernate.jmx.HibernateService"
name="jboss.jca:service=HibernateFactory,
                            name=HibernateFactory">
    <depends>jboss.jca:service=RARDeployer</depends>
    <depends>jboss.jca:service=LocalTxCM,name=MySqlDS</depends>
    <!-- Make it deploy ONLY after DataSource had been started -->
    <attribute name="MapResources">mappings/Attribute.hbm.xml</attribute>
    <attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
    <attribute name="Datasource">java:/MySqlDS</attribute>
    <attribute
name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
    <attribute
name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
    <attribute
name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
    <attribute name="UseOuterJoin">false</attribute>
    <attribute name="ShowSql">false</attribute>
    <attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>
</server>

This might save a couple of hours, for those who run into the same problem.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]