Announcement Announcement Module
Collapse
No announcement yet.
Properties loading not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Properties loading not working

    Hi all,

    I have a very strange problem since I've migrated my Spring application from Tomcat 4.1 to Tomcat 6.

    Let me introduce you a part of a bean config file (an my problems too...).

    Code:
    	<!-- Alice -->
    	<bean id="domaineAliceManagerTarget" 
    		class="fr.laposte.intra.log.si.reinette.service.alice.impl.DomaineAliceManagerImpl">
            <property name="domaineAliceDAO"><ref bean="domaineAliceDAO"/></property>
            <property name="entiteGLDAO"><ref bean="entiteGLDAO"/></property>
            <property name="genieAliceDAO"><ref bean="genieAliceDAO"/></property>
            <property name="compteAuxiliaireDAO"><ref bean="compteAuxiliaireDAO"/></property>
        </bean>	
    
    	<bean id="domaineAliceManager" 
            class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
            <property name="transactionManager"><ref bean="transactionManager"/></property>
            <property name="target"><ref local="domaineAliceManagerTarget"/></property>
            <property name="transactionAttributes">
                <props>
                    <prop key="create*">PROPAGATION_REQUIRED</prop>
                    <prop key="delete*">PROPAGATION_REQUIRED</prop>
                    <prop key="save*">PROPAGATION_REQUIRED</prop>
                    <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
                </props>
            </property>
        </bean>
    I have around a hundred beans called "Managers" for checking some management rules. They are connected with one or more DAO each. Since the migration, only one manager can't load properly. There is no warnings or exceptions but when I access to the manager, the 3 DAO in bold here are 'null'. In fact, the setters of the DAO are not called at the context loading.

    It is like if my config file is not read or partially by Spring...

    So, I tried the autoWire and dependency-check options and it makes no differences.
    I decided to load the DAOs manually, that solves the problem of null properties but there is another problem later when I try to save my object with Hibernate :

    Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    Like the first problem, the configuration of my transaction management is ignored (you can see it in bold in the config file).
    It worked in Tomcat 4, this kind of config works in Tomcat 6 but not for this bean.

    Any ideas or issues I can investigate ?

    Regards.
Working...
X