tags:

views:

31

answers:

0

I've inherited a project using spring/hibernate/struts in which I'm currently trying to setup a couple of beans. When I startup the server, I can see right away (from myEclipse) that a couple instances of my ActionClass are being created properly. The problem is that when I make a call to that ActionClass, I can see another instance of the ActionClass is created but without the Service objects set.

I'm not specifying the lazy-init attribute so it should be defaulting to false (which I can see is true because the bean is being initialized at startup). Here is a sample of one of my beans...

<!--  Set up the JobTitle bean information -->
<bean name="/JobTitleAction" class="associate.userinterface.jobtitle.JobTitleAction" autowire="byName">
    <property name="jobTitleService">
        <ref bean="jobTitleService" /> 
    </property>
</bean>
<bean id="jobTitleService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >
    <property name="transactionManager">
        <ref bean="myTransactionManager" /> 
    </property>
    <property name="target">
      <ref bean="jobTitleTarget" /> 
    </property>
    <property name="transactionAttributes">
        <props>
          <prop key="*">PROPAGATION_REQUIRED, -ServiceException</prop> 
        </props>
    </property>
</bean>
<bean id="jobTitleTarget" class="associate.service.spring.JobTitleServiceImpl">
    <property name="jobTitleDAO">
        <ref bean="jobTitleDAO" /> 
    </property>
</bean>
<bean id="jobTitleDAO" class="associate.dao.hibernate.JobTitleDAOImpl">
    <property name="sessionFactory">
        <ref bean="mySessionFactory" /> 
    </property>
</bean>

I'm fairly new to Spring so if there's any other code that would be pertinent, please let me know...

Thanks!