Configuring JBoss For MSSqlServer2000
inquizitive Oct 8, 2002 7:16 AMHi Guys ,
For the past 2 days i have been trying to configure JBoss3.0.3 to work with MSSQLServer2000.
I have followed the following steps for configuring JBOSS with SQLServer2000,
The following are the steps that i have done in JBoss3.0.3 to get it working with SQLServer2000,
a) Copied mssqlservice.xml to {$JBOSS-HOME}/server/all/deploy/
b) Copied the 3 jar files given with the driver to {$JBOSS-HOME}/server/all/lib
c) Changed the standardjbosscmp-jdbc.xml to the following (i am pasting only the part which i have changed.)
java:/MSSQLDS
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
d) Changed the standardjaws.xml (i am pasting only the part which i have changed.)
java:/MSSQLDS
<type-mapping>MS SQLSERVER2000</type-mapping>
e) Changed the mssql-service.xml to the following ,
PersonEntity
<config-property name="ConnectionURL" type="java.lang.String"> jdbc:microsoft:sqlserver://localhost;DatabaseName=ContactInfo</config-property>
<config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config- property>
<!--set these only if you want only default logins, not through JAAS-->
<config-property name="UserName" type="java.lang.String">sa</config-property>
<config-property name="Password" type="java.lang.String">sa</config-property>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
0
50
5000
15-->
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)
ByContainerAndApplication
For the above line if i give use the following options it gives me the following error
a) ByContainerAndApplication - org.jboss.util.NestedSQLException: Need non-null subject for subject/cri based pooling; - nested throwable: (javax.resource.ResourceException:
b) ByApplication Or ByContainer - Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.); - nested throwable:
I would be grateful if u could tell me the following ,
- Whether i am following the right steps here.
- How to fix this problem?
Thank You very much
Dhiraj Ramakrishnan