Do not place transaction control at the beginning of an Http request.

Source: Internet
Author: User
Tags http request
Alimama_pid = "inherit"; alimama_titlecolor = "0000FF"; clerk = "000000"; alimama_bgcolor = "FFFFFF"; alimama_bordercolor = "E6E6E6"; alimama_linkcolor = "008000 "; alimama_bottomcolor = "FFFFFF"; alimama_anglesize = "0"; bandwidth = "0"; alimama_icon = "0"; alimama_sizecode = "11"; alimama_width = 760; alima_amheight = 90; alimama_type = 2;
I am in a second-hand bookstore on Taobao. I have time to check it out! Http://shop35357269.taobao.com/
Alimama_pid = "inherit"; alimama_titlecolor = "0000FF"; clerk = "000000"; alimama_bgcolor = "FFFFFF"; alimama_bordercolor = "E6E6E6"; alimama_linkcolor = "008000 "; alimama_bottomcolor = "FFFFFF"; alimama_anglesize = "0"; bandwidth = "0"; alimama_icon = "0"; alimama_sizecode = "12"; alimama_width = 468; alima_amheight = 60; alimama_type = 2;
Google_ad_client = "pub-6430022987645146"; google_ad_slot = "8687678907"; google_ad_width = 120; google_ad_height = 600;
Var alimama_pid = "mm_100961__0_0"; var alimama_key = ""; var alimama_cid = "50004958"; var alimama_col = "1"; var alimama_row = "4 "; var alimama_type = "C"; var alimama_titlecolor = "0000FF"; var alimama_bgcolor = "C3D9FF"; var alimama_bordercolor = "E6E6E6"; var alimama_descolor = "000000 ";
 

The first time I know that there is such a way to control transactions is in a java project that uses Hibernate.
The program architecture is roughly as follows,
Create a ServletFilter to process all Web requests. In this ServletFilter, the Session is obtained by calling SessionFactory.
The code is as follows:


  1.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.