Announcement Announcement Module
Collapse
No announcement yet.
Entity Proxy with Inner Field Entity implementation Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Entity Proxy with Inner Field Entity implementation Problem

    I have dependencies between entities that is StepField Entity depends on Field Entity, and this have the following spring XML snippet Code:

    Code:
    <!-- StepField Entity Proxy with inner StepField Entity implementation -->
        <bean id="stepFieldDao" class="org.springframework.aop.framework.ProxyFactoryBean">
            <property name="target">
                <bean class="ae.dxbpolice.eps.business.entity.procedurestep.StepFieldDaoImpl">
                    <property name="sessionFactory"><ref local="sessionFactory"/></property>
                    <property name="procedureStepDao"><ref bean="procedureStepDao"/></property>
                    <property name="fieldDao"><ref bean="fieldDao"/></property>
                    <!-- StepField entity property merge-point -->
                </bean>
            </property>
            <property name="proxyInterfaces">
                <value>ae.dxbpolice.eps.business.entity.procedurestep.StepFieldDao</value>
            </property>
            <property name="interceptorNames">
                <list>
                    <value>hibernateInterceptor</value>
                </list>
            </property>
        </bean>
    Now when I try to reference the field DAO as follows this.getFieldDao() from inside the StepFieldDaoImpl it keeps returning it as null.

    however when I put break point at setFieldDao(FieldDao fieldDao) inside the StepFieldDaoBase it set it successfully but when it try to reference it; it seems it re-instantiate the StepFieldDaoImpl from scratch and this makes fieldDao equals to null

    Can any body helps?
    Last edited by Ali Abdel-Aziz; Apr 28th, 2008, 01:22 AM.
Working...
X