Bean is not instantiating while using hibernate interceptor

Posted by amit sharma on Stack Overflow See other posts from Stack Overflow or by amit sharma
Published on 2012-10-11T09:34:27Z Indexed on 2012/10/11 9:36 UTC
Read the original article Hit count: 480

Filed under:
|
|

I am using hibernate interceptor with spring framework,but when i pass a bean reference of DAO class its not instantiating the bean. My interceptor class has:

 private IMyService myService;
       // and getters and setters 

while application-context.xml having entries:

<bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="entityInterceptor" ref="logInterceptor"></property>
</bean> 
<bean name="logInterceptor" class="com.amit.project.Utility.TableLogInterceptor" >
<property name="myService" ref="myService"/> </bean>
<bean name="myService" class="com.amit.project.service.impl.MyService">

But my bean is not instantiating in class, showing null. entityInterceptor is not allowing to do that or anything else? plz suggest a way if anybody knows.

© Stack Overflow or respective owner

Related posts about java

Related posts about spring