The problem I am having is that I have two separate applications running on the same JBoss server, each with EJB session Beans and hibernate persistence layers, the problem is that which ever is the last to be deployed is the one that the hibernate.xml.cfg file is used for both apps.
I can't simply add both the mapping to the one hibernate.xml.cfg file as I am using two different data sources.
Should JBoss be using the hibernate.xml.cfg file that corresponds to the session bean I am using? or am I doing something wrong? Any suggestions?
Just thought that I would let you all know the solution to this problem, simple enought just make sure that the hibernate.xml.cfg file is in a different package for each project i.e one may be in org.mycompany.project1.util and the other in org.mycompany.project2.util and everything works fine.