Linked Questions

16 votes
1 answer
8k views

I am trying to configure my Spring Boot application to use specific datasources when certain environmental variables exist. For example, if the MY_PROD_DATASOURCE environmental variable exists, I ...
nmagerko's user avatar
  • 6,874
5 votes
4 answers
14k views

I'm working on a web application that uses Spring MVC 3 and Hibernate I want to use 2 datasource MySql and Oracle databases for my web application, I've been read many tutorial and problem solving ...
splatter_fadli's user avatar
12 votes
3 answers
3k views

In hibernate-cfg.xml file, as per my understanding hibernate-configuration can have only one session-factory and one or zero security tags if we configure multiple session-factory then we should ...
Sasikumar Murugesan's user avatar
11 votes
4 answers
11k views

I have implemented Hibernate's multitenant database architecture, where a specific database connection is chosen depending on the tenant. I'm using Spring 4.3 and Hibernate 5.2. All good when tenants ...
gdrt's user avatar
  • 3,345
6 votes
5 answers
988 views

I have a requirement to use 2 different databases within single DAO class. One of the databases is read/write while the other is read only. I have created 2 data sources, 2 session factories and 2 ...
nilgun's user avatar
  • 10.6k
2 votes
1 answer
2k views

We are configuring Hibernate using java, here is our code to configure hibernate. @Configuration @EnableTransactionManagement @ComponentScan({ "org.npcc.ccms.config" }) @PropertySource(value = { "...
Ramu's user avatar
  • 199
0 votes
1 answer
1k views

I am having a main datasource, where I have read/write access and another datasource, where I just pull the data out and import it into my main datasource. At the moment my whole application just ...
Carol.Kar's user avatar
  • 5,271
0 votes
2 answers
1k views

Is it possible to configure multiple data sources within spring session factory? DataSource 1 is java:/comp/env/jdbc/names; DataSource 2 is java:/comp/env/jdbc/address; Session Factory ...
Angular_Newbie's user avatar
-1 votes
2 answers
614 views

I have a monolithic service at work. There is a single mysql database say X to which it connects. X has a lot of tables. X has now become a bottleneck for scaling up and hence I am working on removing ...
Prateek Gupta's user avatar
0 votes
1 answer
717 views

I am working on a Spring-MVC application in which as of now we had a single data source. For our requirements, where most of the transactions are either short lived, we do have applications which ...
We are Borg's user avatar
  • 5,313
0 votes
1 answer
174 views

I am developing a Java application using Spring + Hibernate. i want this application to run on more then one Database on same time. For Example if user tries to search for some data, Application has ...
Kushal's user avatar
  • 81
0 votes
2 answers
50 views

I have 2 different databases in my application,(I'm using spring Mvc``hibernate ) One in localhost and the other is a remote Database. do I have the possibility to declare two datasources in the ...
pietà's user avatar
  • 770