ITeye博客

Spring Transaction

androider · 2010-02-23 17:00 · Records · 企业架构 · Markdown

http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html

 

@Transactional(readOnly = true)
public class DefaultFooService implements FooService {

    public Foo getFoo(String fooName) {
        // do something
    }

    // these settings have precedence for this method
    @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW)
    public void updateFoo(Foo foo) {
        // do something
    }
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。