Hello, I'm trying to deploy 2 applications under JBoss 4.0.5. Both applications use a dbmanager library wich uses a static connection pool to database.
The structure of both my apps is the following:
| |-- MANIFEST.MF
| `-- application.xml
| |-- META-INF
| | `-- MANIFEST.MF
| |-- WEB-INF
| `-- index.jsp
| `-- dbmanager.jar
application.xml contains 2 web modules (FRONTEND & WEBSERVICES) and 1 java module (BACKEND).
dbmanager is used by BACKEND.jar and by the classes of WEBSERVICES.war
FRONTEND.war jsp's use BACKEND.jar
the 2 applications should connect to different databases and the connection is static so i need 2 different dbmanager jars.
The problem is the following:
- When i call a webservice of WEBSERVICES.war i noticed that the db connection used is the one of the first application deployed. It seems both applications use the same dbmanager and they get the same connection.
- When i use the BACKEND.jar from the frontend the separation is correct and the applications get different connection.
I tried to put true in
/J-Boss/server/default/deploy/ear-deployer.xml but i get the following:
- When i call a webservice of WEBSERVICES.war the separation is correct and the applications get different connection.
- When i use the BACKEND.jar from the frontend i get the exception:
java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/tc5/WebAppClassLoader) previously initiated loading for a different type with name "javax/xml/namespace/QName"