Jon Stevens wrote:
>
> on 5/24/2000 1:17 PM, Kevin A. Burton at [EMAIL PROTECTED] wrote:
>
> > Thoughts?
>
> I am 100% behind the need for this.
cool.
> I'm not 100% on your proposal for implementation (more like 90%). I want to
> make sure that we do this right the first time and catch all the cases. So,
> I will want to talk about it a bit before implementation. Is that ok?
Yup. That is why it is in PROPOSAL mode :)
> What I would like is the ability to somehow "register" classes that need to
> be initialized and then go through each of those classes and initialize
> them. You have covered this with your proposal. What you have not covered is
> the methodology to do all of the registration of the initializations. It can
> be as simple as properties in a properties file. Do we need to consider that
> some things might need to be registered before other things?
I could see it happening. But I think that the mechanism that we create
might be too crude for this.
What do I mean?
If we are initializing multiple projects:
turbine.init.classname=CocoonInitializer
turbine.init.classname=JetspeedInitializer
How do we handle a case of dependencies? Jetspeed can't work without an
initialized Cocoon so maybe we should just terminate here.
Maybe turbine.init.classname shouldn't a Vector but should just be a
String. Then individual projects would be required to code their own
initialization mechanisms.
Then in the above Example JetspeedInitializer would just call
CocoonInitializer. Also, init(RunData rundata) should probably throw an
InitializationException
> Also, you are passing in a RunData object in TurbineInitable.init()...since
> that really won't be available at this point in time, I think it would be
> better to essentially extend the Servlet API HttpServlet.init() method and
> pass in a ServletConfig object instead...
I would normally agree. However, I need RunData for initializing
Portlets. RunData provides us with the most flexibility because you get
the Request, Response and Config. We could have TurbineInitable setup
like this:
public interface TurbineInitable {
public void init() throws InitializationException;
public RunData getRunData();
public void setRunData( RunData rundata );
}
Then we could just call setRunData() before we call init(). This is a
cleaner solution because it allows people to not even think about
RunData if they don't need it. This way you get your Servlet style
initialization and I get my RunData.
--
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN: "Please Open Source Java!"
I just patented "one click e-mail", when you hit the "reply" button you
own me 50 cents.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]