Hibernate version: 3.0.5
First, let me say how much I appreciate the extensive documentation on Hibernate, both in the reference manual and the forums+wiki. Combined, these resources have kept me from posting a lot of "RTFM" questions here. I have a small suggestion for the reference manual that will hopefully keep others from spending an embarrassing amount of time (like I did) trying to figure out why their code worked fine in unit tests but not when running in a hosted environment like JBoss:
In section 4.4. (Optional configuration properties), be more explicit about what parameters are honored when placed in the hibernate.properties or hibernate.cfg.xml files when running under JBoss or the like. What bit me was the "hibernate.connection.isolation" setting. It was being applied under unit tests, but not in JBoss. It was only a small mention on the org.hibernate.cfg.Environment javadoc page that clued me into the fact that it may not be used in the hosted environment:
Code:
hibernate.connection.isolation JDBC transaction isolation level (only when using java.sql.DriverManager)
That led me to discover the "transaction-isolation" setting for JBoss datasource files, eg:
Code:
<local-tx-datasource>
....
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
</local-tx-datasource>
Perhaps I am misunderstanding the root of the problem or this is totally obvious to everyone else. My bad if so. I post this knowing it will cost me a point and may expose how ignorant I am of Hibernate/JBoss configs (you would think I'd have a clue after ~6 months of both), but if it saves some other poor sap from hours of lost time, it's well worth it.
Thanks again for a great tool. Given another few years, I may actually figure out how to use it properly.