| Article: |
Configuring JBoss 4.0 JDBC Connectivity | |
| Subject: | SQL Server 2000 | |
| Date: | 2004-03-10 12:19:58 | |
| From: | razmaspaz | |
| Does anyone know how to configure for SQL Server 2000 using the ms jdbc driver? | ||
Showing messages 1 through 3 of 3.
-
SQL Server 2000
2005-12-29 15:34:04 helica [View]
-
SQL Server 2000
2005-11-22 02:58:38 gamle01 [View]
Hi,
How should I configure 2 different datasources for MSSQL Server connection, in the same standardjbosscmp-jdbc.xml and other config files?
I've tried this but it doesn't work...
<defaults>
<datasource>java:/DEMODS</datasource>
<datasource>java:/DEMO2DS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
....
thanks in advance.
cheers,
g
-
SQL Server 2000
2004-05-13 05:50:04 Deepak Vohra | [View]
MS SQL Server Database Configuration
To configure JBoss 4.0 with MS SQL Server database, MS SQL Server driver classes are required in the Classpath.Copy MS SQL Server JDBC driver class jar filesmssqlserver.jar, msbase.jar, msutil.jarto theserver/default/libdir. To configure with non-xa MS SQL Server datasource copy/docs/examples/jca/mssql-ds.xmlto/server/default/deploydir. To configure with MS SQL Server XA datasource copy/docs/examples/jca/mssql-xa-ds.xmlto/server/default/deploydir. Modifymssql-ds.xmlconfiguration file. Driver Class and Connection URL settings for MS SQL Server JDBC Drivers
Driver Class:com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection URL:jdbc:microsoft:sqlserver://localhost:1433;
DatabaseName=MyDatabase
To configure with XA JDBC driver for MS SQL Server modify the mssql-xa-ds.xml configuration file.
Driver Class:com.microsoft.jdbcx.sqlserver.SQLServerDataSource
The standardjaws.xml file is configured with Hypersonic database by default. To configure JBoss server with MS SQL Server database modify/server/default/conf/standardjaws.xmlconfiguration file. Set <datasource> and <type-mapping> elements.
<jaws>
<datasource>java:/MSSQLDS</datasource>
<type-mapping>MS SQLSERVER2000</type-mapping>
</jaws>
The standardjbosscmp-jdbc.xml configuration file is configured with Hypersonic database. To configure JBoss server with MS SQL Server modify /server/default/conf/standardjbosscmp-jdbc.xml configuration file. Set the <datasource> and <datasource-mapping> elements.
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSSQLDS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
</defaults>
</jbosscmp-jdbc>
Modify login-config.xml configuration file with MS SQL Server database settings. Add the following <application-policy/> element to login-config.xml.
<application-policy name = "MSSQLDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=MSSQLDS
</module-option>
</login-module>
</authentication>
</application-policy>
By modifying the mssql-ds.xml, standardjaws.xml, standardjbosscmp-jdbc.xml and login-config.xml the JBoss 4.0 server is configured to be used with a MS SQL Server database.


