|
From: Juergen H. <ju...@in...> - 2005-09-06 18:54:07
|
For what it's worth: We have a similar problem in MethodInvokingFactoryBean and its base class MethodInvoker. You might want to check the approach used there to find a matching method and even convert arguments if necessary. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Steven Devijver Sent: Saturday, September 03, 2005 2:15 AM To: spr...@li... Subject: [Springframework-developer] Improving spring binding Hi, After reading Keith's blog entry on dynamic method invocation on actions in SWF and passing arguments from the flow and request scope I've been hitting a number of problem with the implementations in spring binding. The first problem has to do with the conversion package. DefaultConversionService does not take into account assignable classes. If you specify for example java.util.Map as target class and java.util.HashMap is the source class conversion will fail with a message saying no conversion is found from HashMap to Map. The obvious solution to me seems to test if the target class is assignable to the source class and do no conversion in that case. Specifying no target type in the Argument class can circumvent this problem. A second problem however arises when searching for a method to execute. If your method for example is "execute(Map)" and the argument value is java.util.HashMap the method lookup will fail since the method signature and argument types to not match (Map != HashMap). The obvious solution to me seems to search for methods whose arguments are assignable by the argument types. This again implicates a significant change in key spring binding classes that probably should be discussed. Steven ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |