tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Frankson" <dfrank...@qwest.net>
Subject JDBC tyrex pool with JNetDirect JDBC drivers
Date Tue, 23 Oct 2001 22:46:46 GMT
    I'm struggling to get the JDBC-JNDI-Tyrex connection pool working with
the Netdirect JDBC driver and I keep getting a cast exception error

java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource


I configured the JBDC according to the Tomcat 4.0 docs, but I must be
missing something...

web.xml -

 <resource-ref>
   <description>Campus Datasource</description>
   <res-ref-name>jdbc/campus</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
 </resource-ref>



server.xml -

 <Resource name="jdbc/campus" auth="Container" type="javax.sql.DataSource"/>
 <ResourceParams name="jdbc/campus">
  <parameter>
   <name>user</name><value>sa</value>
  </parameter>
  <parameter>
   <name>password</name><value>...</value>
  </parameter>
  <parameter>
   <name>driverClassName</name><value>com.jnetdirect.jsql.JSQLDriver</value>
  </parameter>
  <parameter>
   <name>driverName</name>
   <value>jdbc:JSQLConnect://localhost:1433/database=campus</value>
  </parameter>

 </ResourceParams>

Application -

 Context env = (Context) new InitialContext().lookup("java:comp/env");
 DataSource ds = (DataSource) env.lookup("jdbc/campus");



The J-netdirect drivers come with a JSQLXADataSource class, do I somehow use
this instead?  If anyone has figured this out, I'd appreciate a tip.

Dave


Mime
View raw message