[ https://issues.apache.org/jira/browse/AXIS2-4328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pétur Runólfsson updated AXIS2-4328: ------------------------------------ Attachment: AXIS2-4328-1.patch OK, here's a starter. This converts all methods in RPCUtil from static to instance methods. Objects that use RPCUtil access it through a protected method (that can be overridden per class) that by default calls a factory method in RPCUtil that looks uses a RPCUtilClass parameter to create an instance, or returns a default instance if the parameter is not found. There's a couple of potential downsides to this: It breaks compatibility for RPCUtil (does this matter?), and RPCUtil isn't really a good name for a class containing instance methods. It would be possible to fix both by creating a new class (maybe RPCProcessor? RPCHandler?) that would have all the code in instance methods, and let RPCUtil have a static instance of this class that it would forward to. Also, this doesn't really fix my original problem - the methods I would like to override are in BeanUtil and SimpleTypeMapper. If this patch is accepted, more patches are needed to convert those too. > Please make RPCMessageReceiver and related classes more flexible > ---------------------------------------------------------------- > > Key: AXIS2-4328 > URL: https://issues.apache.org/jira/browse/AXIS2-4328 > Project: Axis 2.0 (Axis2) > Issue Type: Improvement > Components: adb > Affects Versions: 1.4.1 > Reporter: Pétur Runólfsson > Attachments: AXIS2-4328-1.patch > > > RPCMessageReceiver calls a number of static methods, that call other static > and private methods. Many of these methods are also very long. This makes it > near impossible to customize RPCMessageReceiver via inheritance. > This situation would be improved a lot by this: > * Change static methods in RPCUtil, BeanUtil, ConverterUtil, SimpleTypeMapper > etc. to instance methods > * Allow subtypes to be used instead of each of those classes (for example by > creating instances in factory methods that may be overridden) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.