-->
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.  [ 4 posts ] 
Author Message
 Post subject: hibernate.ejb.interceptor seems not be used !
PostPosted: Wed Oct 12, 2005 6:40 am 
Beginner
Beginner

Joined: Fri Oct 07, 2005 5:35 am
Posts: 38
Location: France
Hibernate version: hibernate 3.1 rc1

I try to use the property hibernate.ejb.interceptor to initialize a Interceptor for my application. It seems that the property is not used (ie code never go through my Interceptor).

Having a look to Configuration, it seems that property is not initialized.

- In the constructor of Configuration reset() method is invoked.
- reset() initialize intercepor to an EmptyIntercpetor:
Code:
interceptor = EmptyInterceptor.INSTANCE;

- In method


Code:
private EntityManagerFactory createEntityManagerFactory(Properties properties, Map workingVars) {
...
else if ( propertyKey.equals( HibernatePersistence.INTERCEPTOR ) && cfg.getInterceptor() == null) {
   ...
   cfg.setInterceptor( (Interceptor) interceptor.newInstance() );


Since inetceptor is initialize with EmptyInterceptor, it is not null. My interceptor set in the config file is not used !


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 7:52 am 
Newbie

Joined: Mon Mar 14, 2005 2:57 pm
Posts: 16
See my posting in http://forum.hibernate.org/viewtopic.php?t=948640 for the reply...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 5:52 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I fixed that in CVS.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 5:53 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The programmatic way does work already, though

_________________
Emmanuel


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