Using Transactions with Pooled Connections
Số trang: 1
Loại file: pdf
Dung lượng: 24.50 KB
Lượt xem: 13
Lượt tải: 0
Xem trước 1 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
[ Team LiB ] Recipe 1.17 Using Transactions with Pooled Connections Problem You want to use connection pooling with transactions in your .NET application to maximize performance. Solution The discussion explains how to use connection pooling with transactions.
Nội dung trích xuất từ tài liệu:
Using Transactions with Pooled Connections[ Team LiB ]Recipe 1.17 Using Transactions with Pooled ConnectionsProblemYou want to use connection pooling with transactions in your .NET application tomaximize performance.SolutionThe discussion explains how to use connection pooling with transactions.DiscussionConnections participating in transactions are drawn from the connection pool andassigned based on an exact match with the transaction context of the requesting threadand with the connection string.Each connection pool is divided into a subdivision for connections without a transactioncontext and zero or more subdivisions for connections associated with a particulartransaction context. Each of these subdivisions, whether associated with a transactioncontext or not, uses connection pooling based on exact matching of the connection stringas described in Recipe 1.15.When a thread associated with a particular transaction context requests a connection, onefrom the appropriate pool enlisted with that transaction is automatically returned.When a connection is closed it is returned to the appropriate subdivision in theconnection pool based on the transaction context. This allows a connection to be closedwithout generating an error even if a distributed transaction is still pending. Thetransaction can committed or aborted later.[ Team LiB ]
Nội dung trích xuất từ tài liệu:
Using Transactions with Pooled Connections[ Team LiB ]Recipe 1.17 Using Transactions with Pooled ConnectionsProblemYou want to use connection pooling with transactions in your .NET application tomaximize performance.SolutionThe discussion explains how to use connection pooling with transactions.DiscussionConnections participating in transactions are drawn from the connection pool andassigned based on an exact match with the transaction context of the requesting threadand with the connection string.Each connection pool is divided into a subdivision for connections without a transactioncontext and zero or more subdivisions for connections associated with a particulartransaction context. Each of these subdivisions, whether associated with a transactioncontext or not, uses connection pooling based on exact matching of the connection stringas described in Recipe 1.15.When a thread associated with a particular transaction context requests a connection, onefrom the appropriate pool enlisted with that transaction is automatically returned.When a connection is closed it is returned to the appropriate subdivision in theconnection pool based on the transaction context. This allows a connection to be closedwithout generating an error even if a distributed transaction is still pending. Thetransaction can committed or aborted later.[ Team LiB ]
Tìm kiếm theo từ khóa liên quan:
công nghệ thông tin kỹ thuật lập trình Oreilly Ado Dot Net Cookbook Ebook-Lib Displaying an Image from a Database in a Web Forms ControlGợi ý tài liệu liên quan:
-
52 trang 417 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 301 0 0 -
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 287 0 0 -
74 trang 283 0 0
-
96 trang 283 0 0
-
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 270 0 0 -
Tài liệu dạy học môn Tin học trong chương trình đào tạo trình độ cao đẳng
348 trang 267 1 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 260 0 0 -
Kỹ thuật lập trình trên Visual Basic 2005
148 trang 252 0 0 -
Tài liệu hướng dẫn sử dụng thư điện tử tài nguyên và môi trường
72 trang 251 0 0