Announcement Announcement Module
Collapse
No announcement yet.
need some alternative solution of this problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • need some alternative solution of this problem

    hi,
    pls give me some alternative solution of the followling problem.

    HibernateTransactionProxyFactoryBean is implements from factorybean and InitializingBean .
    i am using invocationHandler to make the proxy object of getObject() method.


    <bean id="hibernateDataServiceTarget" class="HibernateTransactionProxyFactoryBean">
    <property name="target">
    <ref bean="dataServiceImpl"/>
    </property>
    <property name="proxyInterfaces">
    <value>DataServices</value>
    </property>
    <property name="sessionFactory">
    <ref bean="hibernateSessionFactory"/>
    </property>
    </bean>

    <bean id="hibernateDataServiceTarget1" class="HibernateTransactionProxyFactoryBean">
    <property name="target">
    <ref bean="dataServiceImpl1"/>
    </property>
    <property name="proxyInterfaces">
    <value>DataServices1</value>
    </property>
    <property name="sessionFactory">
    <ref bean="hibernateSessionFactory"/>
    </property>
    </bean>



    <bean id="hibernateDataService" class="org.springframework.aop.framework.ProxyFact oryBean">
    <property name="proxyInterfaces">
    <list>
    <value>DataServices</value>
    <value>DataServices1</value>
    </list>
    </property>
    <property name="interceptorNames">
    <list>
    <value>hibernateInterceptor</value>
    <value>hibernateDataServiceTarget</value>
    <value>hibernateDataServiceTarget1</value>
    </list>
    </property>
    </bean>


    <bean id="businessServiceImpl" class="BusinessService">
    <property name="dataService"> //his is the Dataservice interface
    <ref bean="hibernateDataService"/>
    </property>
    </bean>


    <bean id="businessServiceImpl1" class="BusinessService1">
    <property name="dataService1"> //his is the Dataservice1 interface
    <ref bean="hibernateDataService"/>
    </property>
    </bean>

    i want do to do this thing.i think this is not a good approach.
    pls suggest me how to resolve his problem.

    thanks & regards
    Ajay
Working...
X