Timeline for Spring Boot: How to use multiple schemas and dynamically choose which one to use at runtime
Current License: CC BY-SA 4.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 19, 2019 at 2:10 | comment | added | buræquete |
@cirovladimir sorry I just saw your message, these ought to be in some sort of @Configuration class for Spring Boot, I hope you did find your answer!
|
|
Feb 27, 2019 at 7:19 | history | edited | buræquete | CC BY-SA 4.0 |
added 28 characters in body
|
Aug 22, 2018 at 17:23 | comment | added | cirovladimir | can you expand your answer? it's not clear to me in what class should this methods be implemented and how to use it, i.e. in a RestController. | |
Jul 26, 2018 at 19:45 | comment | added | DeepInJava | @AndroidDev, I also have similar requirement to deal with dynamic created schemas under single data source. Did you find any solution of your problem ? | |
Jan 10, 2018 at 8:10 | vote | accept | AndroidDev | ||
Feb 27, 2017 at 14:11 | comment | added | buræquete | There is no possible way to do it as you are suggesting, you have to define schemas beforehand at all cases, you should be using NoSQL dbs. | |
Feb 27, 2017 at 14:09 | comment | added | AndroidDev | My Problem still persists, I am still in search of a proper solution. | |
Feb 24, 2017 at 20:10 | history | bounty ended | CommunityBot | ||
Feb 24, 2017 at 6:54 | history | edited | buræquete | CC BY-SA 3.0 |
added 98 characters in body
|
Feb 24, 2017 at 6:40 | comment | added | buræquete | @LakshmiNaresh that is a terrible structure... Being that dynamic with such databases is not easy, why not use nosql databases? MongoDB etc? You can check the link I shared for using same connection for different schemas, but that also need those schemas to be defined in your product, I don't think it would be possible to have it completely dynamic. | |
Feb 24, 2017 at 6:38 | comment | added | AndroidDev | Hi, the number of schemas are in the hands of the user, he can create any number and he can delete them too. | |
Feb 24, 2017 at 2:56 | comment | added | buræquete | If you are still persistent on single connection & dynamically changing it -> stackoverflow.com/questions/13507522/… . As you see it ain't pretty. | |
Feb 23, 2017 at 23:58 | history | edited | buræquete | CC BY-SA 3.0 |
added 87 characters in body
|
Feb 23, 2017 at 22:37 | comment | added | buræquete | @LakshmiNaresh how many schemas are we talking about? Can't you prepare datasources for all possible schemas, and use the one that is requested from API call, doing multiple schema query with single datasource would be extremely slow (killing & reconnecting) | |
Feb 23, 2017 at 22:18 | comment | added | buræquete | @LakshmiNaresh kill & create connection would be really inefficient for your app, though it must be said that multiple connections to same db would cause an extra load on the target db, but at least that covers your requirement with efficiency. | |
Feb 23, 2017 at 22:16 | history | edited | buræquete | CC BY-SA 3.0 |
added 59 characters in body
|
Feb 23, 2017 at 22:15 | comment | added | buræquete | @LakshmiNaresh My suggestion would work with same database with different schemas, maybe it was a bit vague due to the missing url part. Did you try using it? | |
Feb 23, 2017 at 18:49 | comment | added | AndroidDev | can you tell me how can I kill and recreate the connection, it will be helpful. Thank you for your response. | |
Feb 23, 2017 at 17:31 | comment | added | AndroidDev | No, I am using signle db but different schemas and schema names are given through an api body, I need to query from multiple schemas and respond. | |
Feb 21, 2017 at 7:13 | history | answered | buræquete | CC BY-SA 3.0 |