Accessing multiple database from a Java web application using JPA/EclipseLink/EJB

前端 未结 5 462
猫巷女王i
猫巷女王i 2020-12-29 15:21

I have built a simple SOAP java application(server side) and I am using Glassfish4,JPA/EclipseLink,EJB. I have set the db connections(resources/poo

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 15:44

    For sure it can be done more sophisticated way, but there is also a straight forward solution which comes into my mind. What if you deploy as many applications as many databases you have and design a small request routing application which will forward all your clientrequests to the corresponding app by 'databaseId' provided in the request. This solution will work great in a distributed environment.

提交回复
热议问题