Refer to the documentation provided with the JBoss application server for detailed information about creating and configuring a data source.
Copy the JDBC driver classes for your database type to the lib directory of your server configuration, for example JBossInstallDir\server\default\lib.
Create a data source configuration file. These end in -ds.xml. Example files can be found in JBossInstallDir\docs\examples\jca. The file should configure a local transaction data source.
Copy the configuration file to the deploy directory on your server configuration, for example JBossInstallDir\server\default\lib.
Make sure that the WSHOME and JAVA_HOME environment variables are set correctly.
Set the repository using the lh command and the no check option:
lh setRepo -n -ofile -ttype -iInitContextFactory -fDataSourcePath |
For example:
lh setRepo -n -oServerRepository.xml -tOracle -iorg.jnp.interfaces.NamingContextFactory -fjava:DatasourceName |
The lh setRepo command is documented in Appendix F, setRepo Reference.
Make a backup copy of the ServerRepository.xml file located in %WSHOME%\WEB-INF (Windows) or $WSHOME/WEB-INF (UNIX).
Copy the new ServerRepository.xml config file to %WSHOME%\WEB-INF (Windows) or $WSHOME/WEB-INF (UNIX).
Create a .war file from WSHOME
Copy the idm.war file to your server configuration.
Start the JBoss server.