Linked Questions
12 questions linked to/from Hibernate configuring multiple datasources and multiple session factories
16
votes
1
answer
8k
views
Spring Datasources based on Environment
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 ...
5
votes
4
answers
14k
views
Spring-Hibernate using multiple datasource/database
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 ...
12
votes
3
answers
3k
views
What is the use of session-factory name property in hibernate-configuration file
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 ...
11
votes
4
answers
11k
views
Setting hibernate dialect dynamically
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 ...
6
votes
5
answers
988
views
Hibernate random "Session is closed error" with 2 databases
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 ...
2
votes
1
answer
2k
views
How to configure multiple datasources using java Hibernate configuration class
We are configuring Hibernate using java, here is our code to configure hibernate.
@Configuration
@EnableTransactionManagement
@ComponentScan({ "org.npcc.ccms.config" })
@PropertySource(value = { "...
0
votes
1
answer
1k
views
Using multiple DataSources in Spring and Hibernate
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 ...
0
votes
2
answers
1k
views
How to configure multiple Hibernate DataSources?
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 ...
-1
votes
2
answers
614
views
Performing writes to tables in two separate databases from a single monolithic springboot application
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 ...
0
votes
1
answer
717
views
Java, Spring : Create a separate datasource bean throws NonUnique error
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 ...
0
votes
1
answer
174
views
How can I develop an application which will run on more than one database at a same time using Spring + Hibernate?
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 ...
0
votes
2
answers
50
views
declaration of 2 dataSources in dispacher Servlet - Spring Mvc
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 ...