|
From: <php...@li...> - 2007-07-25 20:07:49
|
Hi
[please excuse the delay]
your code is a little bit unusual because it uses a generated proxy class. Looking at the
current implementation it seems that the bridge caches the generated proxies, which it shouldn't
do. But this is a minor problem.
> public class ObjPassing
> {
> public void visit( Object o)
> { System.out.println("first visit method"); }
>
> public void visit( IVisit o) // <-- i wish to run this one
> { System.out.println("second visit method"); }
> }
>
> I need to pass a php object(Obj is it's name) who implements my IVisit
> java interface, to ObjPassing, but i never manage to invoke the second
> method: the first method is always invoked.
The bridge should invoke the second method, because the closure (the dynamic proxy) implements the
IVisit interface, which makes it cheaper than the first method which should have a weight of at
least 32 (IVisit -> Object conversion)
> is it possible to call the second method? if yes, where is my fault?
Can you please set the log level to 5 or above? The bridge should display the weight and why it
has selected the wrong method. My guess is that you have loaded IVisit from a different
classloader, so that it is assignment-incompatible with IVisit used by the visit method. Do you
have two java_require() calls in your code?
Regards,
Jost Boekemeier
__________________________________ Wissenswertes zum Thema PC, Zubehör oder Programme. BE A BETTER INTERNET-GURU! www.yahoo.de/clever
|