The output from my little standalone test class shows the following relationships
java.lang.Object
+ com.microsoft.jdbcx.base.BaseDataSource
implements javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, javax.naming.Referenceable, java.io.Serializable
+ com.microsoft.jdbcx.base.BaseXADataSource
implements javax.sql.XADataSource
+ com.microsoft.jdbcx.sqlserver.SQLServerDataSource
I also successfully created the class using
Class cls = Class.forName("com.microsoft.jdbcx.sqlserver.SQLServerDataSource");
XADataSource xads = (XADataSource)cls.newInstance();
This is essentially the same code that is throwing the ClassCastException in XAManagedConnectionFactory. When JBoss is creating a new instance the log shows
2002-07-23 16:46:36,129 TRACE [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory] XADatasourceClass: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
2002-07-23 16:46:36,379 WARN [org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory] Unable to create and initialize XADataSource:
java.lang.ClassCastException: com.microsoft.jdbcx.sqlserver.SQLServerDataSource
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADS(XAManagedConnectionFactory.java:452)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:368)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:236)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:101)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool..getConnection(JBossManagedConnectionPool.java:312)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
at org.jboss.resource.adapter.jdbc.JDBCDataSource.getConnection(JDBCDataSource.java:110)
XAManagedConnectionFactory lines 451 and 452 are
Class cls = Class.forName(xaDataSourceClass);
xads = (XADataSource)cls.newInstance();
xads is a class variable
private transient XADataSource xads;
It seems clear that JBoss is finding com.microsoft.jdbcx.sqlserver.SQLServerDataSource. If it couldnt find it l would expect a ClassNotFoundException. It also seems clear that it should be able to be cast it to javax.sql.XADataSource since the super class implements this.
Is there any value firing this over to the jboss-dev?
Why do you say that it should implement XAResource when its being cast as an XADataSource?
Anyone have any other suggestions?
Thanks
-----Original Message-----
From: Geer, Benjamin [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 12:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [JBoss-user] RE: MS SQL XA driver (was: "You are not getting the semantics you expect" warning)
In that case, I haven't a clue. You could try instantiating one of
those objects yourself (just in a little standalone test class), and
inspecting it using java.lang.reflect to see what interfaces it
implements. If you find that it doesn't implement XAResource, then you
could at least complain to Microsoft.
Benjamin
-----Original Message-----
From: Burns, Jamie [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2002 11:23
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] RE: MS SQL XA driver (was: "You are not getting
the semantics you expect" warning)
Im using v2.2.0022 which was released April 2002. This looks like the
same version that your link points to. Im using SQL Server 2000 version
8.00.534. The 3 MS SQL Server jars are in [JBOSS_HOME]\server\all\lib
folder. Im starting JBoss with "run -c all"
I have also followed the instructions under "Installing Stored
Procedures for JTA" in the SQL Server 2000 Driver for JDBC Users Guide
and Reference.
Thanks
-----Original Message-----
From: Geer, Benjamin [SMTP:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 5:30 PM
To: '[EMAIL PROTECTED]'
Cc: 'Burns, Jamie'
Subject: MS SQL XA driver (was: "You are not getting the
semantics you exp ect" warning)
> Ive configured the mssql-xa-service
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/exa
mple-config/Attic/mssql-xa-service.xml
I think I was the one who submitted that
2000 with this driver:
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.as
p?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml
Are you using SQL Server 2000, and an up-to-date copy of the driver?
Did you put msbase.jar, mssqlserver.jar and msutil.jar in your JBoss
server configuration's lib directory?
Benjamin
************************************************************************
********
This electronic mail system is used for information purposes and is
not intended to form any legal contract or binding agreement.
The content is confidential and may be legally privileged. Access
by anyone other than the addressee(s) is unauthorised and any
disclosure, copying, distribution or any other action taken in
reliance on it is prohibited and maybe unlawful
All incoming and outgoing e-mail communications and attachments
are scanned automatically by software designed to detect and remove
any material containing viruses or other unauthorised content. While
we undertake best endeavours to ensure that this content checking
software is up to date, recipients should take steps to assure
themselves
that e-mails received are secure .
************************************************************************
********
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
******************************************************************************** This electronic mail system is used for information purposes and is not intended to form any legal contract or binding agreement. The content is confidential and may be legally privileged. Access by anyone other than the addressee(s) is unauthorised and any disclosure, copying, distribution or any other action taken in reliance on it is prohibited and maybe unlawful All incoming and outgoing e-mail communications and attachments are scanned automatically by software designed to detect and remove any material containing viruses or other unauthorised content. While we undertake best endeavours to ensure that this content checking software is up to date, recipients should take steps to assure themselves that e-mails received are secure. ********************************************************************************