After some tweaking, I finally got the tutorial from hibernate's website to work. In it, a java servlet takes some some user input and stores it in a HSQL database. When I run this in Jboss, it works fine.
I created a second version in which the end database is MS SQL Server. That works fine as well.
But, when I run both versions at the same time (in 2 separate browser windows), everything gets crossed. That is, whichever version I launch first, that's the database where all the user input ends up. It's as though only 1 hibernate.cfg.xml file can exist at one time.
When I run both versions simultaneously through Resin, the problem goes away. So, it looks like in JBoss, some configuration needs to be done. The two versions are running in their own separate war files, so I can't figure out why the two versions are getting crossed. Any ideas?
The tutorial can be found at:
http://www.hibernate.org/hib_docs/v3/re ... orial.html
To download the source code for the tutorial directly (it requires tweaking to work):
http://www.hibernate.org/hib_docs/v3/reference/tutorial