4 Replies Latest reply on May 30, 2008 11:16 AM by P J

    Cannot get JtdsDataSource from Jboss config setup

    P J Newbie

      I cannot get a net.sourceforge.jtds.jdbcx.JtdsDataSource from a element in a -ds.xml file. All I get is a CCE because the object returned form the JNDI lookup is a org.jboss.resource.adapter.jdbc.WrapperDataSource and not a JtdsDataSource, as I had hoped.

      Here are the informative files:
      [u]jsp file:
      InitialContext ic = new InitialContext();
      Object obj=ic.lookup( dsJNDI );
      jtds = (JtdsDataSource)ic.lookup( dsJNDI ); <--- CCE HERE
      con = jtds.getConnection();
      pr = con.prepareStatement("select count(*) from vpt_tblHits");


      <type-mapping>MS SQLSERVER2000</type-mapping>