org.hibernate.HibernateException: Illegal attempt to associate a collection with

org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions

 

在ApplicationContext.xml 中的Action中加入 scope="prototype"

<bean id="insertFamerAction" class="com.farmer.action.InsertFamerAction" scope="prototype">
    <property name="businessService">
      <ref bean="businessService"/>
    </property>
 </bean>

 

 

 

 

 

你可能感兴趣的:(xml,Hibernate,bean,prototype)