Okay, I'm rewriting the JPA example towards my intended use. Only, Hibernate is giving me this exception:
javax.persistence.PersistenceException: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager Which seems natural, since there is no reference to a JTA provider in my persistence.xml: | <?xml version="1.0" ?> | | <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> | <persistence-unit name="blog" transaction-type="JTA"> | <provider>org.hibernate.ejb.HibernatePersistence</provider> | <class>org.blog.domainclasses.BlogEntry</class><class>org.blog.domainclasses.Tag</class><class>org.blog.domainclasses.Reply</class><class>org.blog.domainclasses.User</class> | <properties> | <property name="hibernate.archive.autodetection" value=""/> | <property name="hibernate.show_sql" value="true"/> | <property name="hibernate.format_sql" value="true"/> | <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> | <property name="hibernate.connection.url" value="jdbc:hsqldb:hsql://localhost/blogjpa"/> | <property name="hibernate.connection.username" value="sa"/> | <property name="hibernate.c3p0.min_size" value="5"/> | <property name="hibernate.c3p0.max_size" value="20"/> | <property name="hibernate.c3p0.timeout" value="300"/> | <property name="hibernate.c3p0.max_statements" value="50"/> | <property name="hibernate.c3p0.idle_test_period" value="3000"/> | <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> | <property name="hibernate.hbm2ddl.auto" value="create"/> | </properties> | </persistence-unit> | </persistence> | In the persistence.xml of the JPA example, this line is added: | <jta-data-source>java:/DefaultDS</jta-data-source> | However, this is the datasource I'm not defining through the microcontainer... how can I link to the JTA implementation without having to reference such a datasource? Judging from the schema definition for persistence.xml there is no such possibility? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036237#4036237 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036237 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
