JBoss3.x and 4.x with SQLServer JDBC driver
When you configure Hibernate for JBOSS, you found the questions and experience, and take it out.
1. Use Microsoft's SQLServer2000 driver, for three files mssqlser.jar, msutil.jar and Mbase.jar, Copy to Server / Default / LIB.
2. Set the MSSQL-DS.XML, see the JBoss documentation in the specific setting method. We can find the default a variety of corresponding database configuration file templates under / DOCS / Examples / JCA. MSSQL-DS.XML is:
XML Version = "1.0" encoding = "UTF-8"?>
metadata>
local-tx-datasource>
datasources>
Modify the corresponding properties, generally modify JNDI-NAME, ONNECTION-URL, User-name, Password.
Copy the modified MSSQL-DS.XML to the Server / Default / Deploy directory and remove the default HSQLDB-DS.xml
3. Set the serverjws.xml and standardjbosscmp-jdbc.xml JNDI Name and Type-mapping in Server / Default / Conf directory:
Standardjbosscmp-jdbc.xml:
Modify
Join
STANDARDJWS.XML
Modify
4. Configure JMS:
Here JBoss3.x and 4.x have some differences
Copy MSSQL-JDBC2.XML to Defult / Deploy / JMS / folder in 3.x and remove the default HSQLDB-JDBC2.XML
Copy MSSQL-JDBC2-Service.XML to the Defult / Deploy-Hasingleton / JMS folder in 4.x and remove the default HSQLDB-JDBC2-Service.xml.
MSSQL-JDBC2.XML and MSSQL-JDBC2-Service.xml can find templates in DOCS / EXAMPLES / JMS
If this is not set, an exception will be reported on JMS_MESSAGES of: org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions Message recovery may not be accurate; - nested throwable: (java.sql.SQLException: [Microsoft] [SQLServer 2000 Driver for JDBC] [SQLSERVER] SELECT Permission Denied On Object 'JMS_MESSAGES', DATABASE 'TEST'.)