• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Topic: How to get another web app's SessionFactory?

Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:

Could I get a sessionfactory of another webapp's? (I use Tomcat5) I have two web applications,WebApp1 and WebApp2. They use hibernate but using different databases. Webapp1 use hibernate1.cfg.xml as the following:

webapp2 use hibernate2.cfg.xml in another application:

Now , I want to operate the sessionfactory1 in webapp2
How to do it? I mean that it is possible to get the sessionfactory1 in webapp2? I want to bind the sessionfactory1 to jndi tree,then how to get the sessionfactory1 in my second webapp2?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic