JBoss3.x and 4.x with SQLServer JDBC driver

xiaoxiao2021-03-06  40

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:

MSSQLDS JDBC: Microsoft: SQLServer: // localhost: 1433; DatabaseName = MyDatabase

com.microsoft.jdbc.sqlserver.sqlserverdriver

x

y

ms sqlserver2000

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 Java: / MSSQLDS

Join MS SQLServer2000

STANDARDJWS.XML

Modify Java: / MSSQLDS

ms sqlserver2000

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'.)

转载请注明原文地址:https://www.9cbs.com/read-63063.html

New Post(0)