Bug 1263183 - MSSQL Connection Guided has some error
Summary: MSSQL Connection Guided has some error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: post-GA
: ---
Assignee: Priyanka Nag
QA Contact: Jan Martiska
URL:
Whiteboard: Documentation, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-15 09:37 UTC by JEONGHUN KIM
Modified: 2015-10-20 12:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 22815, Administration and Configuration Guide-6.3-1 Build Date: 19-11-2014 09:29:31 Topic ID: 5698-718141 [Latest]
Last Closed: 2015-10-20 12:58:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description JEONGHUN KIM 2015-09-15 09:37:17 UTC
Title: Example Microsoft SQLServer Datasource

Describe the issue: 
in Chapter 6.8.7, Example 6.16, 
Connection URL and Datasource needs update.

Suggestions for improvement:
<connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>
->
<connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=MyDatabase</connection-url>

================================================================================
 <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
->
 <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</xa-datasource-class>



Additional information:

Comment 4 Jan Martiska 2015-09-25 12:34:41 UTC
That's incorrect. The xa-datasource-class value needs to refer to a class implementing javax.sql.XADataSource, not java.sql.Driver.
If you configure it this way, you will get a java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be cast to javax.sql.XADataSource

Jeonghun Kim: maybe you were confused by the fact that there is no reference to the JDBC driver class. It is not necessary, because it is detected automatically from the META-INF/services/java.sql.Driver file. You don't need to specify the driver class (com.microsoft.sqlserver.jdbc.SQLServerDriver) anywhere. 

You also don't actually need to specify the xa-datasource-class element at all if you are planning to create a non-XA data source out of it. And we are talking about example 6.29, which is about a non-XA datasource. In this case, including xa-datasource-class might be confusing. I suggest that we remove the  xa-datasource-class completely. But only from "Example 6.29. SQLserver datasource configuration". It has to stay in "Example 6.31. SQLserver XA datasource". And the value is correct there.

In short - what needs to be fixed:
- please remove the <xa-datasource-class> element from "Example 6.29. SQLserver datasource configuration" completely, it is unnecessary and confusing (now also with incorrect value - the previous one was correct) 
- leave the <xa-datasource-class> element in "Example 6.31. SQLserver XA datasource" as it is! It's correct there.

Used 6.4.0-39 for verification.

Comment 8 Jan Martiska 2015-10-13 06:17:15 UTC
Looks good now, thanks.


Note You need to log in before you can comment on or make changes to this bug.