




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第Spring事務(wù)處理Transactional,鎖同步和并發(fā)線程*LicensedundertheApacheLicense,Version2.0(the"License");
*youmaynotusethisfileexceptincompliancewiththeLicense.
*YoumayobtainacopyoftheLicenseat
*/licenses/LICENSE-2.0
*Unlessrequiredbyapplicablelaworagreedtoinwriting,software
*distributedundertheLicenseisdistributedonan"ASIS"BASIS,
*WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
*SeetheLicenseforthespecificlanguagegoverningpermissionsand
*limitationsundertheLicense.
packageorg.springframework.transaction;
importjava.sql.Connection;
*InterfacethatdefinesSpring-complianttransactionproperties.
*BasedonthepropagationbehaviordefinitionsanalogoustoEJBCMTattributes.
*pNotethatisolationlevelandtimeoutsettingswillnotgetappliedunless
*anactualnewtransactiongetsstarted.Asonly{@link#PROPAGATION_REQUIRED},
*{@link#PROPAGATION_REQUIRES_NEW}and{@link#PROPAGATION_NESTED}cancause
*that,itusuallydoesn'tmakesensetospecifythosesettingsinothercases.
*Furthermore,beawarethatnotalltransactionmanagerswillsupportthose
*advancedfeaturesandthusmightthrowcorrespondingexceptionswhengiven
*non-defaultvalues.
*pThe{@link#isReadOnly()read-onlyflag}appliestoanytransactioncontext,
*whetherbackedbyanactualresourcetransactionoroperatingnon-transactionally
*attheresourcelevel.Inthelattercase,theflagwillonlyapplytomanaged
*resourceswithintheapplication,suchasaHibernate{@codeSession}.
*@authorJuergenHoeller
*@since08.05.2003
*@seePlatformTransactionManager#getTransaction(TransactionDefinition)
*@seeorg.springframework.transaction.support.DefaultTransactionDefinition
*@seeerceptor.TransactionAttribute
publicinterfaceTransactionDefinition{
*Supportacurrenttransaction;createanewoneifnoneexists.
*AnalogoustotheEJBtransactionattributeofthesamename.
*pThisistypicallythedefaultsettingofatransactiondefinition,
*andtypicallydefinesatransactionsynchronizationscope.
intPROPAGATION_REQUIRED=0;
*Supportacurrenttransaction;executenon-transactionallyifnoneexists.
*AnalogoustotheEJBtransactionattributeofthesamename.
*pbNOTE:/bFortransactionmanagerswithtransactionsynchronization,
*{@codePROPAGATION_SUPPORTS}isslightlydifferentfromnotransaction
*atall,asitdefinesatransactionscopethatsynchronizationmightapplyto.
*Asaconsequence,thesameresources(aJDBC{@codeConnection},a
*Hibernate{@codeSession},etc)willbesharedfortheentirespecified
*scope.Notethattheexactbehaviordependsontheactualsynchronization
*configurationofthetransactionmanager!
*pIngeneral,use{@codePROPAGATION_SUPPORTS}withcare!Inparticular,do
*notrelyon{@codePROPAGATION_REQUIRED}or{@codePROPAGATION_REQUIRES_NEW}
*iwithin/ia{@codePROPAGATION_SUPPORTS}scope(whichmayleadto
*synchronizationconflictsatruntime).Ifsuchnestingisunavoidable,makesure
*toconfigureyourtransactionmanagerappropriately(typicallyswitchingto
*"synchronizationonactualtransaction").
*@seeorg.springframework.transaction.support.AbstractPlatformTransactionManager#setTransactionSynchronization
*@seeorg.springframework.transaction.support.AbstractPlatformTransactionManager#SYNCHRONIZATION_ON_ACTUAL_TRANSACTION
intPROPAGATION_SUPPORTS=1;
*Supportacurrenttransaction;throwanexceptionifnocurrenttransaction
*exists.AnalogoustotheEJBtransactionattributeofthesamename.
*pNotethattransactionsynchronizationwithina{@codePROPAGATION_MANDATORY}
*scopewillalwaysbedrivenbythesurroundingtransaction.
intPROPAGATION_MANDATORY=2;
*Createanewtransaction,suspendingthecurrenttransactionifoneexists.
*AnalogoustotheEJBtransactionattributeofthesamename.
*pbNOTE:/bActualtransactionsuspensionwillnotworkout-of-the-box
*onalltransactionmanagers.Thisinparticularappliesto
*{@linkorg.springframework.transaction.jta.JtaTransactionManager},
*whichrequiresthe{@codejavax.transaction.TransactionManager}
*tobemadeavailableittoit(whichisserver-specificinstandardJ2EE).
*pA{@codePROPAGATION_REQUIRES_NEW}scopealwaysdefinesitsown
*transactionsynchronizations.Existingsynchronizationswillbesuspended
*andresumedappropriately.
*@seeorg.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
intPROPAGATION_REQUIRES_NEW=3;
*Donotsupportacurrenttransaction;ratheralwaysexecutenon-transactionally.
*AnalogoustotheEJBtransactionattributeofthesamename.
*pbNOTE:/bActualtransactionsuspensionwillnotworkout-of-the-box
*onalltransactionmanagers.Thisinparticularappliesto
*{@linkorg.springframework.transaction.jta.JtaTransactionManager},
*whichrequiresthe{@codejavax.transaction.TransactionManager}
*tobemadeavailableittoit(whichisserver-specificinstandardJ2EE).
*pNotethattransactionsynchronizationisinot/iavailablewithina
*{@codePROPAGATION_NOT_SUPPORTED}scope.Existingsynchronizations
*willbesuspendedandresumedappropriately.
*@seeorg.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
intPROPAGATION_NOT_SUPPORTED=4;
*Donotsupportacurrenttransaction;throwanexceptionifacurrenttransaction
*exists.AnalogoustotheEJBtransactionattributeofthesamename.
*pNotethattransactionsynchronizationisinot/iavailablewithina
*{@codePROPAGATION_NEVER}sc
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年生態(tài)修復(fù)工程生物多樣性保護(hù)與生態(tài)修復(fù)工程可持續(xù)性研究報(bào)告
- 2025年交通運(yùn)輸與物流行業(yè)綠色轉(zhuǎn)型發(fā)展報(bào)告
- 2025年農(nóng)產(chǎn)品質(zhì)量安全追溯體系在農(nóng)產(chǎn)品加工環(huán)節(jié)的應(yīng)用與效果報(bào)告
- 鄉(xiāng)村旅游與鄉(xiāng)村振興戰(zhàn)略協(xié)同發(fā)展2025年研究報(bào)告
- 基于物聯(lián)網(wǎng)的2025年共享智能健身設(shè)備商業(yè)模式創(chuàng)新報(bào)告
- 2025年幼兒園心理健康促進(jìn)計(jì)劃
- 2025年文化產(chǎn)業(yè)金融支持政策與多元化融資模式分析報(bào)告
- 工業(yè)污染場(chǎng)地修復(fù)技術(shù)2025年成本效益分析與可持續(xù)發(fā)展研究報(bào)告
- 2025年制造業(yè)供應(yīng)鏈數(shù)字化協(xié)同管理中的供應(yīng)鏈協(xié)同產(chǎn)業(yè)轉(zhuǎn)型升級(jí)中的實(shí)踐報(bào)告
- 2025年汽車共享平臺(tái)智能出行服務(wù)與出行方式優(yōu)化預(yù)測(cè)趨勢(shì)報(bào)告
- 吉林省長(zhǎng)春市2025屆高三下學(xué)期4月三模試題 英語 含解析
- 醫(yī)院退休返聘協(xié)議書10篇
- 第五單元:含長(zhǎng)方形和正方形的不規(guī)則或組合圖形的面積專項(xiàng)練習(xí)-2023-2024學(xué)年三年級(jí)數(shù)學(xué)下冊(cè)典型例題系列(解析版)人教版
- 掘進(jìn)工作面質(zhì)量標(biāo)準(zhǔn)化細(xì)化標(biāo)準(zhǔn)實(shí)施方案
- 中國數(shù)據(jù)中心產(chǎn)業(yè)發(fā)展白皮書023年
- 殘疾人健康管理
- 崗位就業(yè)協(xié)議書范本
- 存款保險(xiǎn)培訓(xùn)課件
- 省煤器安裝方案
- 機(jī)械裝配技術(shù)試題及答案
- 云服務(wù)架構(gòu)試題及答案
評(píng)論
0/150
提交評(píng)論