I think we can do more:
 a) Load statically the methods of an action, I mean for the hashmap methods
b) Use unspecified also for getDefaultMethod (or getFallbackMethod)
c) In getMethod we only try to get the method from the hashmap without using 
reflection in this method. If method for the parameter name doesn't exist , 
so it's not null, try to do methods.get(getDefaultMerthod()); if also this 
operation return a method null arise a NotSuchMethodException. 
 I think it will be faster than now because reflection is used only on 
bootstrap phase.
What do you think?
 Hear you tomorrow

 On Apr 12, 2005 7:39 PM, Martin Cooper <[EMAIL PROTECTED]> wrote: 
> 
> On Apr 12, 2005 6:12 AM, Joe Germuska <[EMAIL PROTECTED]> wrote:
> > This seems like a generally useful strategy. Is your intention to
> > name another method to which control would be dispatched? In that
> > case, what if that name failed too -- just throw an exception at that
> > point?
> >
> > How would you configure the name of the fallback method? Would you
> > define a constant method name like "onLookupFailure" and then advise
> > implementors to create a method with that name and their preferred
> > signature?
> 
> I'd prefer to see us have a consistent mechanism for (a) when a method
> name is not provided and (b) when it's provided but the method doesn't
> exist. For (a), we already have the 'unspecified' method, so I'd
> prefer to see us add a 'fallback' (or something) method in the same
> manner. That would also be the simplest option.
> 
> Alternatively, if we want to make it more configurable (which I'm not
> convinced is necessary), we should do that for both cases.
> 
> --
> Martin Cooper
> 
> 
> > Anyway, I'd suggest filing an "enhancement" ticket in Bugzilla and if
> > you can attach patches to implement this, so much the better!
> >
> > http://issues.apache.org/bugzilla/enter_bug.cgi?product=Struts
> >
> > Joe
> >
> >
> > At 12:23 PM +0200 4/12/05, Giovanni Santini wrote:
> > >Hi,
> > > We use a Dispatch Action for each setup screen that we've to develop.
> > >Setup screen are called from overview and workflow screen. I think it's 
> good
> > >to add in the NoSuchMethodException a call to a method, something like
> > >"getFallbackMethod" defined in the dispatch action base class. In that 
> case
> > >if the user overwritten this method can call a fallback method (or 
> default
> > >method) without mapping all external call.
> > >What do you think?
> > > Graag gedaan
> >
> > --
> > Joe Germuska
> > [EMAIL PROTECTED]
> > http://blog.germuska.com
> > "Narrow minds are weapons made for mass destruction" -The Ex
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Graag gedaan 
_____________________________
Giovanni Santini
EDS Italy
ABN-AMRO Working Capital OLS
Loc: Kostverlorenhof 2 AK8000
1183HE Amstelveen (Amsterdam)
The Netherlands
Mobile: +31 (0) 652245333
Tel: +31 (0) 203437771
Fax: +31 (0) 206299404

Reply via email to