• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Strange database problem in Glassfish

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to all,

This is a very strange problem and I hope I can explain it properly. I have two web applications deployed in Glassfish 2.1. Both apps are Spring-based and they use Hibernate. Both are configured via properties files in the classpath. When only one application is deployed all is well and good. However, when the apps are both deployed there is this behaviour:

One of the apps fails because it tries to use the database which does not belong to it i.e. the db that was configured for the other app. So I get a situation where the application is accessing the wrong database and trying to use tables and then failing to find those table well, because it's the wrong db. What could be causing this? Is it a Hibernate issue? The apps work fine in Tomcat. I have verified that both applications are configured using the correct property files when they are deployed.

Please shed some light because I'm going nuts. Anthing will be helpful at this stage ;) Thanks.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic