atomikos 创建数据源,报Max number of active transactions
java.lang.IllegalStateException:Max number of active transactions reched:50
原因:
atomikos的默认配置中 transactions.properties中:
#SAMPLEPROPERTIESFILEFORTHETRANSACTIONSERVICE#THISFILEILLUSTRATESTHEDIFFERENTSETTINGSFORTHETRANSACTIONMANAGER#UNCOMMENTTHEASSIGNMENTSTOOVERRIDEDEFAULTVALUES;#Required:factoryimplementationclassofthetransactioncore.#NOTE:thereisnodefaultforthis,soitMUSTbespecified!#com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory#Setbasenameoffilewheremessagesareoutput#(alsoknownasthe'consolefile').##com.atomikos.icatch.console_file_name=tm.out#Sizelimit(inbytes)fortheconsolefile;#negativemeansunlimited.##com.atomikos.icatch.console_file_limit=-1#Forsize-limitedconsolefiles,thisoption#specifiesanumberofrotatingfilesto#maintain.##com.atomikos.icatch.console_file_count=1#Setthenumberoflogwritesbetweencheckpoints##com.atomikos.icatch.checkpoint_interval=500#Setoutputdirectorywhereconsolefileandotherfilesaretobeput#makesurethisdirectoryexists!##com.atomikos.icatch.output_dir=./#Setdirectoryoflogfiles;makesurethisdirectoryexists!##com.atomikos.icatch.log_base_dir=./#Setbasenameoflogfile#thisnamewillbeusedasthefirstpartof#thesystem-generatedlogfilename##com.atomikos.icatch.log_base_name=tmlog#Setthemaxnumberofactivelocaltransactions#or-1forunlimited.##com.atomikos.icatch.max_actives=50(原因)#Setthedefaulttimeout(inmilliseconds)forlocaltransactions##com.atomikos.icatch.default_jta_timeout=10000#Setthemaxtimeout(inmilliseconds)forlocaltransactions##com.atomikos.icatch.max_timeout=300000#Thegloballyuniquenameofthistransactionmanagerprocess#overridethisvaluewithagloballyuniquename##com.atomikos.icatch.tm_unique_name=tm#Dowewanttouseparallelsubtransactions?JTA'sdefault#isNOforJ2EEcompatibility##com.atomikos.icatch.serial_jta_transactions=true#Ifyouwanttodoexplicitresourceregistrationthen#youneedtosetthisvaluetofalse.##com.atomikos.icatch.automatic_resource_registration=true#SetthistoWARN,INFOorDEBUGtocontrolthegranularity#ofoutputtotheconsolefile.##com.atomikos.icatch.console_log_level=WARN#Doyouwanttransactionloggingtobeenabledornot?#Ifsettofalse,thennologgingoverheadwillbedone#attheriskoflosingdataafterrestartorcrash.##com.atomikos.icatch.enable_logging=true#Shouldtwo-phasecommitbedonein(multi-)threadedmodeornot?#Setthistofalseifyouwantcommitstobeorderedaccording#totheorderinwhichresourcesareaddedtothetransaction.##NOTE:threadsarereusedonJDK1.5orhigher.#ForJDK1.4,threadreuseisenabledassoonasthe#concurrentbackportisintheclasspath-see#http://mirrors.ibiblio.org/pub/mirrors/maven2/backport-util-concurrent/backport-util-concurrent/##com.atomikos.icatch.threaded_2pc=false#ShouldshutdownoftheVMtriggershutdownofthetransactioncoretoo?##com.atomikos.icatch.force_shutdown_on_vm_exit=false
修改默认配置中的:
com.atomikos.icatch.max_actives=50------改为更大就可以解决
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。