This is what i think about the usage of JPA
Is it worth the effort to map everything when I will only ever read from the DB?
One main usage of JPA is make things more structured and easy to use state as the requirements grow. If you just need some limited number of data to be displayed, then go for the direct way, but make sure that you put an end after that.
The building and maintaining JPA reduces a lot of overhead, it significantly simplify database programming. My suggestion is to go with the JPA, because its easy to create, its easy to configure and will make the code looks beautiful. So why you go for a complex way.
How does one connect to multiple databases using JPA?
You can use many annotations like one to one
, one to many
etc. You can look here for different fetch strategies.
Using multiple Database Server in one project.
Well let me tell you one thing first, the JPA class is an object-relational mapping facility . It has nothing to do with the Server that you are using.
You can specify the schema name using this
@Table(name = "TABLENAME", schema="DATABASENAME")
But that wont help you switch the servers. So if you want to use multiple server then you must create multiple connections. And execute the corresponding query.
Dealing with multiple server is already explained in this link.