Announcement Announcement Module
Collapse
No announcement yet.
Beans from multiple projects Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Beans from multiple projects

    I have multiple projects that are using spring/hibernate based on appfuse configuration. These projects have parent-child dependencies. I have a few services defined in the parent bean, e.g.
    <bean id="partyManagerTarget" class="xxx.service.impl.PartyManagerI
    mpl" singleton="false">

    The applicationContext-service.xml is packaged in jar file along with implementation classes.

    The child project adds these jar files in its class path and defines its own
    beans, e.g.
    <bean id="dmsPartyManagerTarget" class="xxx.service.impl.DMS
    PartyManagerImpl" singleton="false">
    <!-- add the mapper property here when necessary -->
    <property name="partyManager"><ref bean="partyManager"/></proper
    ty>
    </bean>


    I am able to find these beans at runtime, and can call methods that perform query in the database. However, the save/update methods
    are not saving the state in the database. The parent project can
    save the data by itself, but when the same service is called from
    child project, it's not saving in the database. I am using transaction
    management in both projects and using
    org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean. Has anyone seen any similar problem or can provide any clues. I can add more detail if needed.

    Thanks in advance.

  • #2
    RE: Beans from multiple projects

    Another thing, I would like to add is that when I debug this in eclipse, I see that upon saving it's going to the spring proxy for transaction management, and I can see targetSource=ServiceImpl, but it never reached the DAO classes of parent project.
    However, when I call query method I can see all layers, e.g.
    Test --> TxProxy --> MyService --> TxProxy --> ParentService --> DAO

    Comment

    Working...
    X