1 Reply Latest reply on Oct 25, 2008 4:23 AM by jaikiran pai

    JNDI lookup for XADatasource fails with error


      This involves using JBOSS 4.2.3 GA, Spring 2.5 and SQLServer 2000 XA jdbc driver.

      I created a file pxdatasource-xa-ds.xml file in the deploy folder with the following definition-

      <new-connection-sql>select 1 from systypes</new-connection-sql>
      <check-valid-connection-sql>select 1 from systypes</check-valid-connection-sql>

      JBOSS is using org.jboss.resource.adapter.jdbc.WrapperDataSource class for this look up. If the object is assigned to object of type Datasource, there is no problem. But if it is assigned to the type XADatasource there is an exception.

      So even though I am defining a datasource that supports XA i.e. implements XADatasource the object that is returned to me somehow is of the type Datasource.

      How do I tell JBOSS that I need the looked up object to be XADatasource?