spring 事务配置后,数据不能同步更新,要重启tomcat 才能更新 数据库oracle 里面没有实时更新数据,但是其他用户访问我机器,可以看到新的数据,是为什么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你是想在Service层管理事务吗?可以把<property name="target"> <ref bean="guestbookManager"></ref> </property>抽出来加上 parent="guestbookManager" 参考下[XML code] <!--hibernate 事务管理对象--> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref local="sessionFactory"/> </property> </bean> <!--事务工厂--> <bean id="baseProxy" lazy-init="true" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="update*">PROPAGATION_REQUIRED</prop> <prop key="delete*">PROPAGATION_REQUIRED</prop> <prop key="login*">PROPAGATION_REQUIRED</prop> <prop key="find*">PROPAGATION_REQUIRED</prop> <prop key="get*">PROPAGATION_SUPPORTS,readOnly</prop> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> <bean id="ancientBookService" parent="baseProxy"> <property name="target"> <bean class="cn.nlc.gsp.service.impl.AncientBookServiceImpl"> <property name="ancientDao"><ref bean="ancientBookDao"/></property> <property name="otherDao"><ref bean="otherDao"/></property> <property name="unitDao"><ref bean="unitDao"/></property> </bean> </property> </bean>[/XML code] 谁能告诉我这个问题怎么解决 SSH2 脏话过滤 view能当做table来用吗?就是说数据库里建立的view,我在应用程序里的hibernate配置方面可以完全按照数据库中的Table一样用吗? lotus 是什么东西啊? Data日期相减 请教下用java开发sip的问题 apache与tomcat通过JK2整合后的URI映射问题. rmic怎么用呀? 简单又高分的问题 java ee初学者不明白,开发java ee应用,为什么大家只下载jdk,而不下载javaee sdk? weblogic9.2配置数据源 网络通信软件用到的JAVA技术?
可以把<property name="target">
<ref bean="guestbookManager"></ref>
</property>抽出来加上 parent="guestbookManager"
[XML code]
<!--hibernate 事务管理对象-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!--事务工厂-->
<bean id="baseProxy" lazy-init="true" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="login*">PROPAGATION_REQUIRED</prop>
<prop key="find*">PROPAGATION_REQUIRED</prop>
<prop key="get*">PROPAGATION_SUPPORTS,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean> <bean id="ancientBookService" parent="baseProxy">
<property name="target">
<bean class="cn.nlc.gsp.service.impl.AncientBookServiceImpl">
<property name="ancientDao"><ref bean="ancientBookDao"/></property>
<property name="otherDao"><ref bean="otherDao"/></property>
<property name="unitDao"><ref bean="unitDao"/></property>
</bean>
</property>
</bean>[/XML code]