I have an application in developing stage using Hibernate 4.1.9 and it's working just fine including Hibernate Search. The first test environment is Apache -> Glassfish -> MySQL and later will be multiple Glassfish -> Infinispan -> MySQL. As I will need to use the application servers Transaction Manager to reach second test environment I started by defining this in the configs. The result is repeating messages to Glassfish' server.log about missing Transaction Manger:
[#|2013-01-30T13:27:00.053+0100|WARN|glassfish3.1.2|org.hibernate.engine.transaction.internal.jta.JtaTransaction|_ThreadID=504197;_ThreadName=Thread-2;|HHH000426: You should set hibernate.transaction.manager_lookup_class if cache is enabled|#]
It appears to be printed from the afterAfterCompletion() method in JtaTransaction if flag isDriver is true and isInitiator is false. Currently, no 2LC is in use.
Changes to pojos are persisted to the database, but Hibernate Search doesn't see the changes. I guess the error is in the usage of Glassfish' TC, what I see in Search is just a result of this.
If I remove the hibernate.transaction.* settings but continue to use the XA-datasource, everything is fine.
Relevant configurations: hibernate.dialect=org.hibernate.dialect.MySQLDialect hibernate.connection.datasource=jdbc/XA_ZuPool hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.SunOneJtaPlatform hibernate.current_session_context_class=jta
Any hint or ideas about what is missing in this setup is appreciated.
// Mattias
|