You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Martin Holz <ho...@fiz-chemie.de> on 2002/01/18 19:23:04 UTC

Startable Components (hsql)

Hi,

in Cocoon#initialize the HSqlServer will be started, if it is not disabled in 
cocoon.xconf . This is a  hack to get the SQL examples running. 
If you want to run other services,  you must modify Cocoon.java.
Since Cocoon is a core class, that's usually not a good idea.

I have replaced the HSql start by a more general routine,
which starts all components, which are listed in cocoon.xconf.
You would add this section to cocoon.xconf

   <startable-list>
            <role name="org.apache.cocoon.components.hsqldb.Server" />
           <role name="your.own.StartableComponent" />	
   </startable-list>

Is it a problem, to add entries for non-components to cocoon.xconf?
Does anybody has a better name than startable-list?


Martin

  

 


RE: Startable Components (hsql)

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> 
> Martin Holz wrote:
> 
> > Hi,
> >
> > in Cocoon#initialize the HSqlServer will be started, if it is not
disabled
> > in
> > cocoon.xconf . This is a  hack to get the SQL examples running.
> > If you want to run other services,  you must modify Cocoon.java.
> > Since Cocoon is a core class, that's usually not a good idea.

The hack has been removed.


> Does the Component implement Startable?  Seriously, all components in
the
> configuration file (cocoon.xconf) are fully initialized by the ECM
when the
> ECM is initialized.  This currently works in CVS.

Thanks for the tip, Berin. It really works without this hack.

Thanks Martin for brining this issue.

Vadim


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Startable Components (hsql)

Posted by Berin Loritsch <bl...@apache.org>.
Martin Holz wrote:

> Hi,
> 
> in Cocoon#initialize the HSqlServer will be started, if it is not disabled in 
> cocoon.xconf . This is a  hack to get the SQL examples running. 
> If you want to run other services,  you must modify Cocoon.java.
> Since Cocoon is a core class, that's usually not a good idea.


Does the Component implement Startable?  Seriously, all components in the
configuration file (cocoon.xconf) are fully initialized by the ECM when the
ECM is initialized.  This currently works in CVS.



> I have replaced the HSql start by a more general routine,
> which starts all components, which are listed in cocoon.xconf.
> You would add this section to cocoon.xconf
> 
>    <startable-list>
>             <role name="org.apache.cocoon.components.hsqldb.Server" />
>            <role name="your.own.StartableComponent" />	
>    </startable-list>


I don't like this as it is a hack that should not be necessary.  Make
sure the initialize() method is called on ExcaliburComponentManager while
Cocoon is setting everything up.

> Is it a problem, to add entries for non-components to cocoon.xconf?
> Does anybody has a better name than startable-list?


My idea for any non-component elements in a configuration file would be
for global context information (additional values in Context).




-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org