我有一个工程是连接多个数据库的,在"sessionfactory.xml"中配置如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans>
<!-- Message source for this context, loaded from localized "messages_xx" files -->
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename">
<value>MessageResources</value>
</property>
</bean>

  <bean id ="oracleLobHandler"   
      class ="org.springframework.jdbc.support.lob.OracleLobHandler"  
      lazy-init ="true" >   
          <property  name ="nativeJdbcExtractor"  ref ="nativeJdbcExtractor"   />
      </bean >     
 
      <bean  id ="nativeJdbcExtractor" class ="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"
      lazy-init ="true"   />   <!-- Hibernate SessionFactory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- 
<property name="dataSource">
<ref local="dataSource" />
</property>
 -->
<property name="mappingResources">
<list>
    <value>zzch\obj\content.hbm.xml</value>
            </list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.OracleDialect
</prop>
<prop key="hibernate.current_session_context_class">thread</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
    <prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop <prop key="hibernate.cache.provider_configuration_file_resource_path">/ehcache.xml</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
<prop key="hibernate.proxool.pool_alias">DBPool</prop>
<prop key="hibernate.proxool.xml">
      proxool.xml
</prop>
<prop key="hibernate.jdbc.batch_size">25</prop>
</props>
</property>
<property  name="lobHandler" ref="oracleLobHandler" />   
</bean>


<!-- Hibernate SessionFactory2 -->

<bean id="sessionFactory2"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

<property name="mappingResources">
<list>
    <value>zzch\obj\content.hbm.xml</value>
          
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.current_session_context_class">thread</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
     <prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_configuration_file_resource_path">/ehcache.xml</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
<prop key="hibernate.proxool.pool_alias">DBPool2</prop>
<prop key="hibernate.proxool.xml">
      proxool2.xml
</prop>
<prop key="hibernate.jdbc.batch_size">25</prop>
</props>
</property>
<property  name="lobHandler" ref="oracleLobHandler" />   
</bean>
    
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
</bean>
<!-- Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
<!--
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
-->
<bean id="transactionProxy" lazy-init="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>                                   <!--prop key="show*">PROPAGATION_REQUIRED,readOnly</prop-->
     <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
     <prop key="*">PROPAGATION_REQUIRED</prop>
   
                            </props>   
</property>
</bean>



 <!--  下面是base的dao,service,baseAction,baseServiceAction, -->
    <bean id="baseDao" class="zzch.data.imp.AbstractDaoSupport"
singleton="true">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<bean id="baseDao2" class="zzch.data.imp.BaseDao2Imp"
singleton="true">
<property name="sessionFactory">
<ref bean="sessionFactory2" />
</property>
</bean>    <bean id="baseService" parent="transactionProxy">
<property name="target">
<bean class="zzch.service.imp.BaseServiceImpl"
singleton="true" autowire="byName">
<property name="baseDao">
<ref bean="baseDao" />
</property>
</bean>
</property>
</bean>

</beans>
通过上面的配置,我可以查看多个数据库的内容,但是在执行update和INSERT时,却无法提交到数据库中,程序没有报错,语句也执行了,就是没写进数据库.不知道是为什么?请高手指点.