java
AbstractRoutingDataSource :- Importance of Thread Bound Transaction Context for lookup key
I am implementing AbstractRoutingDataSource in our project. From what i read AbstractRoutingDataSource is an abstract data source implementation that routes getConnection() calls to one of various target DataSources based on a lookup key. The latter is usually (but not necessarily) determined through some thread-bound transaction context. What I am wondering is ,what is the advantage of using a thread bound transaction context to determine the lookup key? When is it ideal to use such a method. Any help would be highly appreciated. Thanks in advance :)
Briefly, Bound Threads can change the attributes of the underlying lightweight process. and Lightweight processes are not cached when the bound threads exit. In Scheduling Context; Bound threads for System Scope and Unbound threads are Process Scope. [Docs Oracle, 2010] System Scope: compete for CPU with other system threads (such as Kernel Threads). Process Scope: compete for the CPU within the current process.
Related Links
RecyclerView GridLayoutManager first row with 2 items
Reading Linux Repositories from Third Party
why function are not getting executed in sequence?
Java - Jersey GET request returns null; equivalent URL produces correct output in browser
Deploy a WebService from the command line or a script
How do I send a variable to external scope in Thymeleaf?
NullPointerException in broadleaf AdminAuditableListener
Using Timer in a stateless EJB method to time out long-running operation
How do I make it so JOptionPane.showMessageDialog can sense multiple strings?
SQL Server mirroring_partner_instance does not have FQDN
why selenium try to connect to localhost at “X” port
Unable to evaluation expressions from Eclipse Display View while debugging decompiled code in PaxExam integration test
how to build a jar with maven for a specific OS?
xml schema validation change from CXF 2.7.14 to CXF 3.1.8
ImageView Scale To Fit Button Size
jersey error for restful API with eclipse jar file