Search code examples
javahibernategwtgilead

How to setup multiple database connections in gilead, GWT and Hiberante?


How could I connect to multiple databases in GWT and Gilead ? I have successfully implemented this for one database as follows:

HibernateUtil hibernateUtil = new HibernateUtil();
hibernateUtil.setSessionFactory(SchoolHibernateUtil.getSessionFactory());
PersistentBeanManager persistentBeanManager = new PersistentBeanManager();
persistentBeanManager.setPersistenceUtil(hibernateUtil);
StatelessProxyStore proxyStore = new StatelessProxyStore();
proxyStore.setProxySerializer(new GwtProxySerialization());
persistentBeanManager.setProxyStore(proxyStore);

setBeanManager(persistentBeanManager);

How Could I define the second database here?

Thanks


Solution

  • Somebody on the GWT mailing list was working on something that allows you to use two or more databases at once, don't know if his project or he himself can help with this: http://code.google.com/p/gwt-spring-jpa-lucene/wiki/PersistenceUnitSetup