I have a multi-threaded multi-server web application with hibernate and spring transaction management with AOP. The problem is that I need to maintain the data in memory and keep it in a state of database state ... essentially I implement a cache in memory.
Now, is there a way to make the my-in-memory pojos transaction at the same level as the / spring sleep transaction? I have service calls with a depth of 30 classes and I never know where the commit will take place. What are my options?
, - , . , , :
Thread T1 pojo P , P1.Thread T2 pojo P , P1.T2 , pojo, , P2.Thread T1 pojo P , P1. , 3 T2 P2 P1, .Thread T2 P, T1 T2, .T2 :. , T2 P1, T1.. commit, T2 P2. T1 P2.
, , . , , ( , ...). , . , ;-)
-, , - !
.
(AOP, ThreadLocal), .
, / AOP, .
P ( , ): Store , ThreadLocal Store. ThreadLocal :
Hibernate ? JBoss , .
, , , .
Source: https://habr.com/ru/post/1718301/More articles:Why am I getting an "Unknown Identifier" in my custom SSRS code? - reporting-servicesIPhone Device Testing - Linker Errors - iphonejavascript number reduction - javascriptSingleton template in .Net not possible? - design-patternsGetting a REST-ful URI in Joomla? - restASP.NET 3.5 IIS7 Role Security Implementation - web-configDoes DirectoryInfo.GetFiles () return the files that are currently being written to / open? - c #Do MooseX :: AttributeHelpers and MooseX :: FollowPBP interact correctly? - perlGet parameters of init filter in servlet - javaПочему я не могу сделать привязку внутри asp: текстовое свойство Textbox? - asp.netAll Articles