Mantis - Resin
Viewing Issue Advanced Details
1621 minor always 02-21-07 09:38 06-20-07 11:24
hixxxxx  
ferg  
normal  
closed  
fixed  
none    
none 3.1.2  
0001621: hessian calls wrong methods
attached are sources for reproducing this bug (needs jetty). The essence of this bug is in Client.java:

HessianProxyFactory hpf = new HessianProxyFactory();
hpf.setOverloadEnabled(true);
Service service = (Service)hpf.create(Service.class, "http://localhost:1234/test/"); [^]
service.aMethod(new A());
service.aMethod(new B());

service is an interface with overloaded methods: aMethod(A), aMethod(B). Hessian calls on my linux machine (on win, it works!) on both calls aMethod(B) !

environment details: suse 10.2., jdk1.5.0_11, hessian 3.0.20
 hessianbug.zip [^] (5,565 bytes) 02-21-07 09:38

Notes
(0001825)
ferg   
04-06-07 15:28   
The overloading in isOverloadEnabled() is only based on the length of the arguments. In this case, both methods have a single argument.

So this behavior is as expected, currently. We can change/add the behavior to allow for overload based on the types as well.
(0001826)
hixxxxx   
04-07-07 02:08   
Well, I really didnt expect this "expected" behaviour. At least, it would be very important to document this unexpected expected behaviour ;) Where can you read about it currently (except for in the code)?
Still, I consider it to be a serious restriction...I would have to modify legacy code in order to use Hessian.
(0002070)
ferg   
06-20-07 11:24   
hessian/3452