db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Method check Platform.isCallableStatement is not sufficient
Date Fri, 22 Apr 2005 12:42:02 GMT
Martin Kalén wrote:
> In the 1.0.x branch, can you verify that your statements are actually 
> created
> on line 285 of StatementsForClassImpl (and not on line 295)?
>

yep, because the Platform.isCallableStatement always return 'true' for 
maxDB driver. If I override this method and return always false all is 
working fine. So the problem is this insufficient check/validation method.


> 
> If this is the case I think the driver has a somewhat weird class 
> structure...
> 

this could be the case, but there is no rule that say "don't do this 
it's evil" ;-)


> Maybe you could try to write a really small stand-alone JDBC test class
> and debug Connection#prepareStatement vs Connection#prepareCall and see
> if there is anything in the class structure that can be used to separate
> the two?

hmm, I don't like this. I think the assumption made in 
Platform.isCallableStatement is wrong, this is the problem not the 
driver implementation class (in next version of the driver tis can 
change....).


> 
> If you get a "separation hint" we could use this in OJB by overriding
> Platform#isCallableStatement in PlatformSapdbImpl.
> 

Doesn't OJB know when a stored procedure was used (e.g. the 
ClassDescriptor)? OJB requests a CallableStatement, because OJB want to 
use a stored procedure and not vice versa - right?
Doesn't the ClassDescriptor know when a SP was used?

regards,
Armin

> Regards,
>  Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message