commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aad Nales <>
Subject [Digester] how stateless is a Rules implementation supposed to be?
Date Wed, 03 Aug 2005 10:00:43 GMT

I am trying to create cachable parsing rules for a number of Digester 
objects that I am using in my app. From various source I have understood 
that a Class implementing the Rules interface is supposed to be 
stateless. Which seems very logical. Here is however what i don't get.

On the rules Interface a 'setDigester' exists which is used to associate 
the Rules object with the Digester. My question why? or perhaps more 
importantly what is the effect?

Suppose I create a Rules object holding my parser rules e.g. MyRules 
with a an instance myRules and I call digester.setRules(myRules). My 
guess is that some kind of call back takes place that associated this 
digester with the myRules.

Suppose I reuse the myRules object for digester2. What kind of effects 
should I expect? And if none (which I guess I am sort of hoping for :-) 
why is a RuleSet associated with a Rules object?

Any input is appreciated,

Aad Nales

View raw message