Create different DAOs/Repositories for the different databases. especially when you look at them in the sense of repositories, that they are two different places where you can put your data to be stored or get stored data from.
I can only imagine scenarios where it's good to have an own repository for each db.
For queries that need data from both databases:
These queries are something your application does. Sounds like domain logic to me, so I would put it in the right domain service (or maybe entity) where it is needed.
Like this you'll just have two Repositories/Daos with differently configured entityManagerFactorys injected. You can access both databases just as you wish. If there are references to be set between entities from one database to enities from the other, i think this can't be done automatically by hibernate (please correct me if i'm wrong)
But if you need them there are plenty of workarounds, I think. I just did something like this. I'm not sure if what I did is really "good". That's why I won't post it in detail. (What I did was injecting the repository to my entities by using an aspect with after advice on the constructor call. Finally in teh getter for the reference I checked if the reference is null and in that case made the call to teh repository. Pretty much some kind of self-made lazy loading)
If this is exactly what you need, feel free to ask for more. I'll post it then and maybe let someone with more experience correct me, if necessary
