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:
Code:
<session-factory>
......................................................................
<property name="connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="connection.url">jdbc:mysql://192.168.1.17:3306/user</property>
............................................................................
webapp2 use hibernate2.cfg.xml in another application:
Code:
<session-factory>
......................................................................
<property name="connection.driver_class">com.oracle.jdbc.OracleDriver</property>
<property name="connection.url">jdbc:oracle@thin:192.168.1.17:3306/user</property>
............................................................................
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!