>Are you getting an instance of Hibernate through JBoss or on your
own.
I bound the Hibernate SessionFactory into JBoss JNDI as Bauer/King
adviced in their book 'Hibernate in Action', so I get a Hibernate
Session by doing a lookup for the SessionFactory.
If I understand the book from above, it says that Hibernate is smart
enough to detect if it is running in a managed environment, where
transactions are governed by a separate Transaction Manager (which,
btw, you have to configure in Hibernate's global configuration). So I
thought, that a statement which commits a Hibernate transaction,
simply does nothing, but 'waits' until the JBoss TX manager commits
the transaction.
Carlo Luib-Finetti
Carlo Luib-Finetti - 27 Dec 2004 12:13 GMT
Carlo LF schrieb:
>>Are you getting an instance of Hibernate through JBoss or on your
>
[quoted text clipped - 13 lines]
>
> Carlo Luib-Finetti
I have found the solution at
http://forum.hibernate.org/viewtopic.php?t=935847
"You're trying to commit from within a bean running in a managed
environment (ie JBoss).
You need to change the transaction strategy so enable HB integration
with JTA
In hibernate.properties, change the factory_class property
hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory
Look into Hibernate in Action, Chapter 2, section 2.3.3 if you need
further information§