Lately I decided to implement in my project CMT transactions (jBoss5, Hibernate, jta postgres datasource). Everything is working fine except Hibernate.initialize() in my entities. It works in EJB beans but when trying to invoke initialize in entity getter I get ‘couldn’t associate with session’ exception. It worked just fine before implementing transactions. Anyone got accros same problem ?
Lately I decided to implement in my project CMT transactions (jBoss5, Hibernate, jta postgres
Share
Ok after days browsing the internet I found what is the problem. When u flag method as Supports transactions. It doesn’t start them. If you retrieve objects out of transaction they are out of session and therefore u cannot initialize their properties…