?
=?iso-8859-1?B?THXtcyBBbW9yaW0=?=
Hi there.
I have a problem that consists of the following.
In my class, I have a method named getNativePreparedStatement that
receives a parameter of the type PreparedStatement:
private PreparedStatement getNativePreparedStatement(PreparedStatement
ps)
I pass to this method a non null object of the type:
org.apache.commons.dbcp.DelegatingPreparedStatement
Inside this method, I do a conditional instruction like this:
if(ps instanceof DelegatingPreparedStatement){
//some code here
}
What happens is that in the if instruction the instanceof operator does
not recognize the object ps as a DelegatingPreparedStatement object.
Now, I am sure ps is of the type DelegatingPreparedStatement.
Does anyone have some clue why this happens?
I am running this application under the Apache Tomcat application
server and I am using struts.
Regards,
LA
I have a problem that consists of the following.
In my class, I have a method named getNativePreparedStatement that
receives a parameter of the type PreparedStatement:
private PreparedStatement getNativePreparedStatement(PreparedStatement
ps)
I pass to this method a non null object of the type:
org.apache.commons.dbcp.DelegatingPreparedStatement
Inside this method, I do a conditional instruction like this:
if(ps instanceof DelegatingPreparedStatement){
//some code here
}
What happens is that in the if instruction the instanceof operator does
not recognize the object ps as a DelegatingPreparedStatement object.
Now, I am sure ps is of the type DelegatingPreparedStatement.
Does anyone have some clue why this happens?
I am running this application under the Apache Tomcat application
server and I am using struts.
Regards,
LA