commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markos Charatzas <>
Subject Re: [digester] call-method-rule
Date Mon, 16 May 2005 15:56:49 GMT
Hey Simon,

Thanks for the detailed response.
I was afraid that a CallMethodParam and a CallMethodRule are associated the 
way you described.

Unfortunately (to me that is), I must have a CallMethodParam since the param 
derives from a pattern associated with an object-create-rule.

		<object-create-rule pattern="routes" classname="java.util.ArrayList" />
		<pattern value="routes/route">
classname="gr.forthnet.enosis.oli.pojos.ScheduledRoute" />									
      <call-method-rule methodname="setStart" paramcount="1" />
      <call-param-rule pattern="from/departure/long" paramnumber="0" />
	    <set-next-rule methodname="add" />
	 <pattern value="routes/route/from">
      <object-create-rule classname="gr.forthnet.enosis.oli.pojos.OLIPort" />
			<bean-property-setter-rule pattern="code" />
      <set-next-rule methodname="setFrom" />

Thanks again,

On Monday 16 May 2005 16:08, Simon Kitching wrote:
> Hi Markos,
> On Mon, 2005-05-16 at 14:01 +0300, Markos Charatzas wrote:
> > Is it possible to make a call to 2 different methods under the same
> > pattern?
> It depends. The *calls* will be made, but there is a design flaw in the
> way that CallMethodParam interacts with CallMethodRule that makes things
> tricky when using multiple "interlaced" CallMethodRules.
> If one of the calls is made using no parameters, or just one parameter
> being the body of the method, ie
>   digester.addCallMethod(pattern, methodname)
> or
>   digester.addCallMethod(pattern, methodname, 0)
> then I *think* the answer is yes (because no CallParamRule is being used
> for that call).
> If both calls have associated CallMethodRule instances, then I *think*
> you'll find that the params get mixed up. The problem is that there is
> just one "param stack", and that CallParamRule objects always work on
> the set of params on top of the param stack, rather than knowing which
> CallMethodRule they are supposed to be associated with.
> Please note that I'm not absolutely certain on this; it's been a while
> since I looked at CallMethodRule/CallParamRule.
> Regards,
> Simon
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message