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.
Building Go from source fails tests when run using Java's Runtime.getRuntime().exec()
How to bind request params without setters?
Generic return Method to be defined by generic parameter in method
Generate war on Play2 Framework
error: cannot find Chrome binary - Selenium OSX java Eclipse
Unable to run Solr on Azure Web Apps
How to get the data from Parse in Android in Dynamic ListView
How to force JPanels using GridBagLayout to resize with JFrame
Zookeeper reset sequential number
Extracting required substring from a result retrieved from Wolfram Alpha with Java
How to implement 3Sum in Java?
“Null Object Reference” Error While Passing a Serializable Object To Fragment [duplicate]
Neo4j Cypher query: Sum the results of two queries
Expand project tree view to currently open file
Call method of unknown subclass
Out of memory happened on showing sticker on imageview