I am using a DataAccessObject pattern. I discovered you can speed up your procesing with SELECT statments us using an OraclePreparedStatment and setting defineColumnType; thereby reducing the number of trips the SQL is sent to the database.
Here is the code:
((OraclePreparedStatement)ps).defineColumnType(1, Types.BIGINT);
'ps' is a PreparedStatement.
However, at runtime, I am getting a class cast exception for the below reason. I am using WASD version 5.1.1. I was not aware IBM was using any specific classes in the JDBC drivers.
[
2005-05-23 15:36:59,855][Servlet.Engine.Transports : 2][ERROR][{TDAO}{getTWebInfos}{APP0000}{Unknown Contained Application Exception}{External Message:com/ibm/ws/rsadapter/jdbc/WSJdbcPreparedStatement incompatible with oracle/jdbc/OraclePreparedStatement}]
{TDAO}{getTWebInfos}{APP0000}{Unknown Contained Application Exception}{External Message:com/ibm/ws/rsadapter/jdbc/WSJdbcPreparedStatement incompatible with oracle/jdbc/OraclePreparedStatement}
at java.lang.Throwable.(Throwable.java)
Could someone please explain this to me? Any help would be greatly appreciated.