Your component can implement: - ThreadSafe - Runnable - Startable - Stoppable - Configurable - Parameterizable - ...
Read "Developing with Avalon" on the jakarta.apache.org/Avalon for more info. See also comments in these interfaces. Then, you will have methods: - run() - start() - stop() - configure() - parameterize() Your component should be declared in the cocoon.xconf. Declaration could look like: <component role="com.mycompany.myproject.MyComponent" class="com.mycompany.myproject.MyComponentImpl"> <!-- for parameterizable: --> <parameter name="param" value="value"/> </component> PS If you need logger, it is good idea to extend from AbstractLoggable. Vadim > -----Original Message----- > From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 04, 2002 6:59 PM > To: 'Vadim Gritsenko'; [EMAIL PROTECTED] > Subject: RE: Urgent: Execution of pipeline at startup > > Thank you for your quick response. > > After going thru the components information , sitemap basically consists > of information regarding components and pipelines. > > I have designed a Component, which basically extends > org.apache.avalon.framework.component.Component and as you specified it > has I have embedded the logic in start() and run() methods.. > > The questions I have is > 1. How do I register this components, currently in the sitemap, the > components defined are generators, transformers, serializers, actions, > selectors and readers? > > Could you please briefly explain as how to register my component in the > sitemap. > > 2. The only method which is defined in the Component interface is a log > method. Which class/interface should I extend so that the particular > method (which will iunvoke my start())gets invoked during startup. > > I hope I am clear... > > Thanks for your information in advance, > Regds, > Chiths > > > -----Original Message----- > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 02, 2002 7:51 AM > To: 'Chitharanjan Das' > Subject: RE: Urgent: Execution of pipeline at startup > > You could write own ThreadSafe, Runnable, Startable Component. It will > be loaded and started automatically on Cocoon startup. You can do > whatever you want in the start() or run() methods. > > Vadim > > > -----Original Message----- > > From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, March 02, 2002 2:05 AM > > To: [EMAIL PROTECTED] > > Subject: Urgent: Execution of pipeline at startup > > > > Hello, > > I had raised this issue earlier... > > Please confirm if this is possible at all. > > > > I need to cache some data structures and some schema elements. > > > > Is there a way to execute a pipeline or any other possibilities to > cache > > the information at COCOON'S startup. > > > > Currently, I am performing this caching at first access. > > > > I would surely like to cache the information at startup, rather than > at > > first access... > > > > Could any of you please provide an approach and if already > implemented, > > please share the implementation. > > > > Regds, > > Chiths --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>