Leon Messerschmidt wrote:
> 
> Hi
> 
> Just a thought on the two proposed properties:
> 
> > Anyway it will be based on two properties:
> >
> > turbine.external.init.classname=<CLASSNAME>
> > turbine.external.init.onstartup=<BOOLEAN>
> >
> 
> Why not add 2 methods to the interface (one called at init() and the other
> at doGet() ) and therefore eliminate the need for
> turbine.external.init.onstartup=<BOOLEAN>.

I thought of this... but decided against it because some might consider
passing RunData onto init as a kludge.  However, I am 50/50.  

/**
Called on Turbine.init()
*/
public void init() 

/**
Called on Turbine.doGet()
*/
public void init( RunData rundata )

IMO this is the better way because we never have a null RunData (no
future NPEs) and we can get early and late initialization.

So if there are no -1s that this is a kludge I will do this.

> Classes the just ignore the unnecessary one.  A hypothetical future class
> will the be able to do initialization in both cases - init() AND doGet().

yup
 
> On the other hand, maybe classes that don't implement the doGet()
> initializer causes extra overhead for calling an empty method on every
> request :-)

It wouldn't get called ever time... only the first time.
 
> As I said - just some food for thought.

yup

-- 
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN:  "Please Open Source Java!"
"For evil to win is for good men to do nothing."


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to