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.
Why guava doesn't trim |
Logging in on website programmatically
Java changing an existing component
Pass HashMap as parameter in FitNesse
Adding an object to the list after deleting another object in Java
How do I display unicode characters in the Eclipse console window?
Get Java error when sending emails via Amazon SES
Size of String object vs custom made…object
Java processes remain alive after CRON
SOAP testing client web service class
EJB 3, Transaction flow in same bean
Web logic: string index out of range: -16 in initializing my context
How to limit what CDI considers to be managed beans?
ArrayList. Strange things
Java Package and Access Modifier
How to make a button look like a link in ZK