-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: New Hibernate 3.0.1 Maintenance Release Question
PostPosted: Mon Apr 18, 2005 12:14 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
Hi -

Good job on the new release. Question, where in the documentation can I find reference to do the new seamless J2EE/JTA container integration of Hibernate sessions?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 12:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well its not just one thing...

Check out documentation for:
1) auto_close_session
2) flush_before_completion
3) SessionFactory.getCurrentSession()


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 12:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Or check out http://blog.hibernate.org/cgi-bin/blosxom.cgi/Steve%20Ebersole/current-session.html which discusses these...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 12:19 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
Awesome, thanks for the quick reply.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 1:12 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
Wow, I just implemented those changes - this is awesome.

Good job!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 6:14 am 
Newbie

Joined: Thu Apr 07, 2005 12:13 pm
Posts: 3
Location: France
It seems me to have had problems when I keyed the map by JTA transaction (javax.transaction.Transaction Object).
I then used the identifiers of the transaction (XID object) for the key in order to resole the problem.

Have I wrong or right ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 4:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
XIDs are not available via a javax.transaction.Transaction.

By spec, a cntainer is supposed to provider appropriate equals/hashCodes for their javax.transaction.Transaction implementations. Now if your container does not do that, then you might have problems depending upon how the TM is implemented.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 4:03 am 
Newbie

Joined: Thu Apr 07, 2005 12:13 pm
Posts: 3
Location: France
The methods equals and hashcode have been coded with the XID by my provider. This explains why i use the XID for the key of my map.
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 11:58 am 
Newbie

Joined: Thu Apr 07, 2005 12:13 pm
Posts: 3
Location: France
alx wrote:
The methods equals and hashcode have been coded with the XID by my provider. This explains why i use the XID for the key of my map.
Thanks

This doesn't explain why i have had a problem ...
In fact, I don't know any more why I had this problem

An other problem
...if the method getCurrentSession is called in a "no-required transaction" method (method call with no transaction JTA), an exception is raised by this class SessionFactory .
If a test on the existence of the transaction is made and if in the case where there is no transaction, we return a simple session (not put in the map), this mechanism is a solution ?


Top
 Profile  
 
 Post subject: TransactionManagerLookup
PostPosted: Mon Apr 25, 2005 10:54 am 
Newbie

Joined: Fri May 28, 2004 6:11 am
Posts: 9
Hello,

is it necessary to have a TransactionManagerLookupClass if I want to use the currentSession() method? We need to support the Sun ApplicationServer Version 8 and I think that in this Release it is not possible to get the TransactionManager via JNDI Lookup (due to the fact that this is not specified in the J2EE spec). Or should we use a JCA Connector for Hibernate, which seams to be not finished and documented yet for Hibernate 3?

Kind regards

Alexander


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.