怎么我没在 spring的事物提交,可是运行完hibernate中DAO后 事物自动提交了 、方法
public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext(
"applicationContext.xml");
topo_nodeService dao = (topo_nodeService) ctx
.getBean("topo_nodeService");
TopoNode node = new TopoNode();
node.setDealPhone("11231wwww2");
node.setDealSta((short)1);
node.setNodeId((long)1);
dao.updeteNode(node);

}
不是默认不提交么?  数据库里还是有更新!

解决方案 »

  1.   

    Spring配置事务传播了吗?Hibernate事务提交有方法提供,可设置为不自动提交。
      

  2.   

    Hibernate事务提交有方法提供,可设置为不自动提交。
      

  3.   

    spring中没有配置提交该方法我知道可设置为不自动提交,但如果我没设置任何的时候 ,Hibernate应该是默认的不提交才对啊,怎么会提交了呢?
      

  4.   

    你的代码我没有看到有关hibernate事务。
    要不把代码贴出来看看 
      

  5.   

    请把topo_nodeService的实现类粘出来!
      

  6.   

    在spring里面配置事物管理没有?
    看看你的context.xml文件
      

  7.   

    spring对事物进行管理了吗?确认一下