Change Other JBoss Enterprise Application Platform Services to use the External Database (The More Flexible Way)
13.3.5.2. The More Flexible Way 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 Enterprise Application Platform 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 (for example, 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/PROFILE/conf/login-config.xml: This file is used in Java EE container managed security services. $JBOSS_HOME/server/PROFILE/conf/standardjbosscmp-jdbc.xml: This file configures the CMP beans in the EJB container. $JBOSS_HOME/server/PROFILE/deploy/ejb2-timer-service.xml: This file configures the EJB timer services. $JBOSS_HOME/server/PROFILE/deploy/juddi-service.sar/META-INF/jboss-service.xml: This file configures the UUDI service. $JBOSS_HOME/server/PROFILE/deploy/juddi-service.sar/juddi.war/WEB-INF/jboss-web.xml: This file configures the UUDI service. $JBOSS_HOME/server/PROFILE/deploy/juddi-service.sar/juddi.war/WEB-INF/juddi.properties: This file configures the UUDI service. $JBOSS_HOME/server/PROFILE/deploy/uuid-key-generator.sar/META-INF/jboss-service.xml: This file configures the UUDI service. $JBOSS_HOME/server/PROFILE/deploy/messaging/messaging-jboss-beans.xml and $JBOSS_HOME/server/PROFILE/deploy/messaging/persistence-service.xml: Those files configure the JMS persistence service as we discussed earlier.