Hi!
I'm using JBoss 3.0.3 with Hibernate 2.1beta3 and Struts 1.1
The code tx = session.beginTransaction(); raises the following error:
2003-09-16 18:08:28,437 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Could not find UserTransaction in JNDI: : UserTransaction not bound
My jboss-service.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<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=MySqlTestDS</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">WEB-INF/classes/de/sam/strutstest/dto/mappings/User.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/MySqlTestDS</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">java:/UserTransaction</attribute>
</mbean>
</server>
I can see that UserTransaction is defined, but I don't know where it is added to JNDI.
Is there a documentation of all parameters for file jboss-service.xml?
|