-
15. Re: Hibernate 3 unable to update or delete
jukvaa May 18, 2005 3:31 AM (in response to fmaredia)"garbett" wrote:
I submitted and example case and bug report at http://opensource.atlassian.com/projects/hibernate/browse/HHH-490
Hi,
Can you submit the report and test case to JBoss JIRA also? Your Hibernate bug is closed, and I think that nothing is happening yet... -
16. Re: Hibernate 3 unable to update or delete
fmaredia May 19, 2005 12:08 AM (in response to fmaredia)Any response yet? Any word from JBoss?
-
17. Re: Hibernate 3 unable to update or delete
darranl May 19, 2005 5:38 AM (in response to fmaredia)"fmaredia" wrote:
Any response yet? Any word from JBoss?
Has anyone submitted an issue with test case to JBoss JIRA yet? -
19. Re: Hibernate 3 unable to update or delete
fmaredia May 19, 2005 3:25 PM (in response to fmaredia)The end result was tested by Steve Ebersole against Preview 3. Is there such a problem still in existence against Preview 5. Does the future version fix this problem?
-
20. Re: Hibernate 3 unable to update or delete
garbett May 19, 2005 3:33 PM (in response to fmaredia)I tried to submit to the JBoss JIRA and couldn't. It wanted my account from this forum, or so it said. I couldn't get it to take my password.
I have a tar ball I emailed to Scott Stark, but got no reply.
Here's my configuration:
JBoss 4.0.2
EJB3.0 Preview 5
So yes, the problem still exists in Preview 5. My company is on the very of a multi-year commitment to JBoss as it's main platform (and open sourcing the app), the resolution of this is critical to this stage of the review.
Shawn -
21. Re: Hibernate 3 unable to update or delete
garbett May 19, 2005 5:31 PM (in response to fmaredia)I got through reading the current bug report status and it looks likes a version mismatch in the installed hibernate. Two copies are installed. I'm going to try and get a work around figured out that cures it.
Good work guys! This is great support for a free forum. -
22. Re: Hibernate 3 unable to update or delete
jukvaa May 20, 2005 5:42 AM (in response to fmaredia)Hi,
I'm having similar problems, but I'm not using EJB3, just EJB2 session beans + Hibernate persistence.
Something that Steve Ebersole said in the JIRA (http://jira.jboss.com/jira/browse/JBAS-1828) caught my attention. I have been using following pattern when using hibernate from session beans (This is session bean method with Transaction="Required"):public void addPaper(Paper paper) { try { HibernateUtil.beginTransaction(); HibernateUtil.getSession().save(paper); HibernateUtil.commitTransaction(); } catch (HibernateException e) { HibernateUtil.rollbackTransaction(); throw new InfrastructureException(e); } finally { HibernateUtil.closeSession(); } }
HibernateUtil is from "Hibernate in Action", it fetches SessionFactory from JNDI: java:hibernate/SessionFactory. This worked with JBoss 4.0.1 and Hibernate2, but when I upgraded to JBoss 4.0.2 and Hibernate3, saves, updates and deletes are not working.
If I don't do HibernateUtil.closeSession(), database gets updated, but I get warning:
[CachedConnectionManager] Closing a connection for you. Please close them yourself
Which makes me wonder: What is the right pattern for using hibernate from a session bean? I have read about HibernateContext, but if I understand correctly it can only be used if method is transacted and I would like to keep code consistent in both transactional and non-transactional methods. -
23. Re: Hibernate 3 unable to update or delete
garbett May 20, 2005 11:38 AM (in response to fmaredia)Let's move this to another thread on the forum.