今天研究ejb,资料中提到如果sessionBean实现SessionSychronization接口。对于SessionSychronization接口的方法书上的描述是这样的
1. aferBegin() - Container call this method to inform the instance of the ejb that the transaction is started.2. beforeCompletion() - To inform the bean that the transaction is about to be committed.3. afterCompletion() - Called to inform that the transaction is completed.请问上述描述中transaction到底是什么意思?
我觉得不太可能是数据库的事务,因为sessionBean和数据库的操作应该是分离的,EJB的设计者不应该会让数据库的transaction和sessionBean有太多的耦合。
我猜测可能这个transaction是代表http的请求,请高手解答
1. aferBegin() - Container call this method to inform the instance of the ejb that the transaction is started.2. beforeCompletion() - To inform the bean that the transaction is about to be committed.3. afterCompletion() - Called to inform that the transaction is completed.请问上述描述中transaction到底是什么意思?
我觉得不太可能是数据库的事务,因为sessionBean和数据库的操作应该是分离的,EJB的设计者不应该会让数据库的transaction和sessionBean有太多的耦合。
我猜测可能这个transaction是代表http的请求,请高手解答
解决方案 »
- 小白求助——泊松分布问题
- Struts2,Double和String和MySql的Decimal问题
- 如何把java程序部署到服务器电脑上
- mysql外键关联问题
- jboss服务器一小时重起一次,严重问题,望高手帮忙,在线等。。。。。。
- Spring,Struts,Hibernate,ajax技术交流。
- 高分求救!resultset statement的问题。
- hibernate access 如何自动建表 坐等高手
- 在tomcat建二级站点的问题
- 能用javac编译但用java命令运行时报告Exception in thread "main" java.lang.NoClassDefFoundError: h
- 那位大虾用了“Java爬虫”
- 关于hibernate one-to-many配了 fetch=join 的时候,产生重复记录
希望对你有帮助