wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Topic: How to get another web app's SessionFactory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Topic: How to get another web app Watch "Topic: How to get another web app New topic
Author

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

Yashnoo lyo
Ranch Hand

Joined: Feb 17, 2003
Posts: 152
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?
Thks!
:roll:


When I face C# and Java I choose Java.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Topic: How to get another web app's SessionFactory?
 
Similar Threads
How to pass Session object between two web apps
InvalidMappingException in Hibernate
How to get another webapp's jndi object from local?
How to use Hibernate along with GWT instantiation on eclipse 3.2
Hibernte Error