Bug 1263183 - MSSQL Connection Guided has some error
MSSQL Connection Guided has some error
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity medium
: post-GA
: ---
Assigned To: Priyanka Nag
Jan Martiska
Documentation, Triaged
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-15 05:37 EDT by JEONGHUN KIM
Modified: 2015-10-20 08:58 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
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 08:58:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description JEONGHUN KIM 2015-09-15 05:37:17 EDT
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 08:34:41 EDT
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 02:17:15 EDT
Looks good now, thanks.

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