Configuring a SQL Server data source is a two step process if performed on a new installation.

  1. Configure the SQL Server module
  2. Configure the data source pool

To create the SQL Server module, create the following folder structure under the modules directory.

<JBOSS INSTALLATION>\modules\com\microsoft\sqlserver\main

Copy the Microsoft SQL Server JDBC jar into the main folder.

Create a module.xml file in the main folder and copy the following.

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="">
  <resource-root path="sqljdbc4-3.0.jar"/>
  <module name="javax.api"/>
  <module name="javax.transaction.api"/>

Next step is to configure the data source within the JBoss configuration of the system. Locate the data source subsystem

<subsystem xmlns="urn:jboss:domain:datasources:1.0">

And copy the following


Now the you’ll notice that in the <driver> node the value sqlserver, this is because this is not the actual driver class name but rather a link to a driver definition. The driver definition will make use of the module that was created earlier to actually load the database driver.  Copy the following driver definition to below or before the definition of the h2database database driver definition.

<driver name="sqlserver" module="">

The zip containing the SQL Server module can be downloaded here.