[jboss-user] [EJB 3.0] - Re: Bean Managed Transaction: No JTA transaction found

rituraj_tiwari do-not-reply at jboss.com
Sun May 25 05:05:53 EDT 2008


No. I did not realize that would be needed since it seems to work just fine when invoked from session beans. I want to use the same, working infrastructure, but from a worker thread.

That being said, this is my persistence.xml:

  | <persistence-unit name="MyProject">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/MyProjectDatasource</jta-data-source>
  |       <properties>
  |          <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
  |          <property name="hibernate.hbm2ddl.auto" value="update"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <property name="hibernate.format_sql" value="true"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/MyProjectEntityManagerFactory"/>
  |       </properties>
  |    </persistence-unit>
  | 

Thanks for your help in the wee hours of the morning!

-Raj

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153206#4153206

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153206



More information about the jboss-user mailing list