I have coded a Session Broker framework. It is designed to also
support Hibernate specific APIs by deriving from neutral classes.
Please take a look at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=260258
From: Sebastien Tardif
Sent: Monday, April 20, 2009 3:27 PM
To: 'hibernate-users@lists.jboss.org'
Subject: Anyone aware of an implementation of SessionBroker on top of
JPA or Hibernate API?
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: