Create a SQL Server JNDI data source on JBoss

Procedure

  1. Start the JBoss application server.
  2. Log in to the JBoss Admin Console.
  3. Click Deployments for the domain hosting PolicyCenter.
    JBoss does not show a domain for standalone installations.
  4. Click the Add button.
    The New Deployment wizard starts.
  5. Select Upload a new deployment and click Next.
  6. Click the Choose File button.
  7. Browse to the appropriate directory for your Java version, under PolicyCenter/admin/lib.
    OptionDescription
    Java 8 PolicyCenter/admin/lib/java8
    Java 11 PolicyCenter/admin/lib/java11
  8. Select the mssql-jdbc-<version>.jar file and click Next.
  9. Check the Enable check box (if not checked) and click Finish.
    A confirmation message box confirms that you deployed mssql-jdbc-<version>.jar successfully.
  10. Click the Configuration tab.
  11. Click Subsystems > Datasources > Non-XA.
  12. Click Add.
    The Create Datasource wizard starts.
  13. Select Microsoft SQLServer Datasource and click Next.
  14. Enter a Name for the data source.
  15. Enter a JNDI Name. The JNDI name must use the pattern java:jboss/datasources/name, where name is the name of the data source from the previous step.

    The JNDI name must match the value of the data source-name attribute of the <jndi-connection-pool> element in the database-config.xml file.

  16. Click Next.
  17. Select the SQL Server JDBC driver, (exactly as in step 8). Keep default values for other fields, and click Next.
  18. Enter the Connection URL, Username, and Password and click Next.
  19. Confirm information provided on the Summary page and click Finish.
    Message "Added datasource name" is shown. In case of error, the new data source was not added and you must repeat steps starting from 12.
  20. Select the newly added data source and click Test Connection.
    If you receive a message that the JDBC connection failed, check your connection settings.