Inside my applicationContext, I have 2 dao . if i assign my 2nd dao below to use flushmode, i will get error invalid; nested exception is org.xml.sax.SAXParseException: Attribute value "org.springframework.orm.hibernate3.HibernateAccessor.FLUSH_COMMIT" of type ID must be unique within the document. On the other hand, when i excluded flushmode for 2nd dao, no error. can anyone explain on this?
<bean id="dao" class="info.jtrac.hibernate.HibernateJtracDao" init-method="createSchema">
<property name="hibernateTemplate">
<bean class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory"/>
<property name="flushMode">
<bean id="org.springframework.orm.hibernate3.HibernateAccessor.FLUSH_COMMIT"
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
</property>
</bean>
</property>
</bean>
<bean id="secondsdao" class="com.company.secondSHibernateDao" >
<property name="hibernateTemplate">
<bean class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="secondSsessionFactory"/>
<property name="flushMode">
<bean id="org.springframework.orm.hibernate3.HibernateAccessor.FLUSH_COMMIT"
class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
</property>
</bean>
</property>
</bean>