You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Alex Sherwin <al...@acadiasoft.com> on 2010/03/10 00:13:58 UTC

Where to modify IBatis 3.x to change return types

We're dynamically generating some classes (javassist) and loading them 
at runtime, basically, they're simple extensions to POJO's with some new 
wrapper methods added.

What I want to do (as inefficient as this may be, but I can optimize 
using details within our code etc) is this:

Find the point in the IBatis 3.x code which determines the return type 
for a mapped statement.  I've been debugging and tracing for awhile now, 
and there's a missing step I don't know how to trace (a dynamic proxy 
apparently?) which then forwards to:

MapperProxy.invoke(Object proxy, Method method, Object[] args). 

At this point, the best I can tell is that everything will now be (or 
already is?) based off of the Method object, which has the return type 
set on it. There's obviously no setter on this Method object for 
returnType, and I can't construct a new one (it's package-private 
constructor), and as far as I know I can't use javassist to modify an 
Object instance... I can't figure out how to change what returnType 
IBatis thinks it should be using.

Any help is greatly appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org