-->
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.  [ 3 posts ] 
Author Message
 Post subject: Interceptors not properly called with CMT
PostPosted: Thu Jul 07, 2005 9:46 am 
Newbie

Joined: Sat Mar 26, 2005 7:14 am
Posts: 3
The interceptors callback methods concerning transactions
(i.e. afterTransactionBegin, afterTransactionCompletion)
are not properly called when using Hibernate within CMT context.
Is this by accident or not?
I want to implement an event system which only fires if
an entity physically changes, i.e. if the transaction is commited.
Without these callbacks it seems hardly possible.

Btw, I am using Hibernate 3.0.5


Top
 Profile  
 
 Post subject: Re: Interceptors not properly called with CMT
PostPosted: Tue Jul 19, 2005 5:45 am 
Beginner
Beginner

Joined: Tue Jul 19, 2005 4:03 am
Posts: 34
Location: Aberdeen, UK
We are not running Hibernate 3, but we have integrated Hibernate with JBoss using the HibernateContext, enabling the Interceptor by configuring the Hibernate MBean (hibernate-service.xml)

Using this configuration, we implemented a simple Logging Utility based on the Interceptor example section 8.3.2 Audit Logging in the book Hibernate Action (Bauer/King).

Basically the only thing we had to change was to create an unmanaged session using the HibernateContext. By doing this, I don’t think you need to explicitly handle the transactions.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 20, 2005 5:34 am 
Newbie

Joined: Sat Mar 26, 2005 7:14 am
Posts: 3
Thanks for the answer.

I want to use the application server's transaction context.
Therefor I have to use managed Hibernate sessions.
So this seems to be no solution.
Or did I understand you wrong?

Best,
Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.