views:

37

answers:

1

I am working with two different web applications built upon GXT. But the problem is that both the applications are accessing the same database and the hibernate is not allowing to do so when we tried to deploy together in Apache Tomcat and then access them simultaneously. Can you tell me how can we access the same database using hibernate from both the applications? We are using c3p0 connection pool for this.

+1  A: 

(...) Hibernate is not allowing to do so when we tried to deploy together in Apache Tomcat and then access them simultaneously.

And what was the problem? What error did you get? Provide some details might help to get an answer.

Can you tell me how can we access the same database using hibernate from both the applications? We are using c3p0 connection pool for this.

Just do it, I don't see anything blocking here (which is why answering the mentioned questions will help). Instantiating several SessionFactory in different JVMs is actually a very common scenario (e.g. when running a single application on a cluster, which is technically equivalent to your scenario).

Pascal Thivent