Today we shall talk about creating data source in JBoss. You can create a data source in JBoss for any RDBMS in five simple steps.
1. Find your RDBM’s data source xml from JBOSS_HOME\docs\examples\jca, for example if you wanted to create a data source for DB2 then pick db2-ds.xml.
2. Edit the db2-ds.xml file and update the URL, username, password and JNDI name. This JNDI name shall be used on the time of data source look up from your application.
3. Please the db2-ds.xml file in JBOSS_HOME/SERVER_INSTANCE/deploy.
4. Place the db2 jdbc driver jar (SPI jar) in JBOSS_HOME/lib
5. Restart the JBoss instance.
You should be able to very the data source in the JBoss JMX console under jboss.jdbc section.