[hibernate-dev] Temporary session and commit issue with manual flush mode

Adam Warski adam at warski.org
Tue Feb 14 05:42:09 EST 2012

Yes, I also think the session should be closed after being used, otherwise you start wondering why it's not being closed (as I did looking at the code) :)


On Feb 13, 2012, at 9:59 PM, Steve Ebersole wrote:

> In general, yes, this is what I meant.
> I think on_close or after_transaction might be better connection 
> release mode here.
> Also, I would personally be more inclined to close the "temp session" 
> manually there in that block.  But that part is really just a 
> preference I think.
> On Mon 13 Feb 2012 02:42:07 PM CST, Łukasz Antoniak wrote:
>> Thanks Steve for such a descriptive replay. I have played a little 
>> with SessionBuilder and probably solved the issue. Because of great 
>> importance of 
>> AuditProcess#doBeforeTransactionCompletion(SessionImplementor) method, 
>> please verify my commit: 
>> https://github.com/lukasz-antoniak/hibernate-core/commit/e6aaa49dcc847e56368822969939ab213252c31a. 
>> Tell me if it makes sense from your perspective.
>> Regards,
>> Lukasz
> -- 
> steve at hibernate.org
> http://hibernate.org
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

Adam Warski


More information about the hibernate-dev mailing list