We are developing a web application where it deals with more than 1 data bases using spring jpa. A login screen which allows the user to select the country and market. we have multiple databases and each database with respect to one country and market. So we decided that we plan to load all datasources (at present we have 10 databases). I have few questions on this.
- is it good practice to load all databases at once while application startup? (Later we may go with few more countries also) 2.We are planning to have single entity manager factory for all the data bases we load . can we acheive this using spring jpa ? 3.If we have a single entity manager, how we can handle the connection pooling for each database we load.
appreciate your help..