Anyone aware of an implementation of SessionBroker on top of JPA or Hibernate API?

 

I mean by SessionBroker, an encapsulation of the fact that 2 EntityManager potentially pointing to 2 different databases are involved. So that the client is coded like just one EntityManager is used. Similar to: http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/b13698/oracle/toplink/sessionbroker/SessionBroker.html

 

This is having for constraint that each EntityManager do not reference the same classes so that query like below can be redirected to the right EntityManager transparently because can lookup the right EntityManager using the class: