JBoss.org Community Documentation
Changing the external datasource to DefaultDS
is convenient. But if you have applications that assume the DefaultDS
always points to the factory-default HSQL DB, that approach could break your application. Also, changing DefaultDS
destination forces all JBoss services to use the external database. What if you want to use the external database only on some services?
A safer and more flexible way to hook up JBoss AS services with the external datasource is to manually change the DefaultDS
in all standard JBoss services to the datasource JNDI name defined in your *-ds.xml
file (e.g., the MySqlDS
in mysql-ds.xml
etc.). Below is a complete list of files that contain DefaultDS
. You can update them all to use the external database on all JBoss services or update some of them to use different combination of datasources for different services.
<JBoss_Home>/server/all/conf/login-config.xml
: This file is used in Java EE container managed security services.
<JBoss_Home>/server/all/conf/standardjbosscmp-jdbc.xml
: This file configures the CMP beans in the EJB container.
<JBoss_Home>/server/all/deploy/ejb-deployer.xml
: This file configures the JBoss EJB deployer.
<JBoss_Home>/server/all/deploy/schedule-manager-service.xml
: This file configures the EJB timer services.
<JBoss_Home>/server/all/deploy/snmp-adaptor.sar/attributes.xml
: This file is used by the SNMP service.
<JBoss_Home>/server/all/deploy/juddi-service.sar/META-INF/jboss-service.xml
: This file configures the UUDI service.
<JBoss_Home>/server/all/deploy/juddi-service.sar/juddi.war/WEB-INF/jboss-web.xml
: This file configures the UUDI service.
<JBoss_Home>/server/all/deploy/juddi-service.sar/juddi.war/WEB-INF/juddi.properties
: This file configures the UUDI service.
<JBoss_Home>/server/all/deploy/uuid-key-generator.sar/META-INF/jboss-service.xml
: This file configures the UUDI service.
<JBoss_Home>/server/all/jms/hsqldb-jdbc-state-service.xml
and <JBoss_Home>/server/all/deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml
: Those files configure the JMS persistence service as we discussed earlier.