101

在javaee的三层结构中,为什么事物存在于业务层-奔跑吧爽爽的博客

 6 years ago
source link: http://blog.51cto.com/13579086/2074232
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
我们都知道在javaee实际开发中,分为3层结构来开发,controller,service和dao那么为什么事物要存在于业务层中,事物是通过connection对象操作的,使用原始jdbc链接数据库的链接也是connection操作的,connection是在到是怎么传递到dao的呢?这里讲解两种方式第一种通过形式参数的方式第二种通过ThreadLocal的方式ThreadLocal的底层是个m

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK