You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Max Pfingsthorn <m....@hippo.nl> on 2005/12/02 12:43:26 UTC

"Standalone" components?

Hi!

I've had a bit of trouble with components that are not referenced by others. I need to start (i.e. service, configure, initialize, etc) a component once the container is started. Can I do this somehow?
I noticed an attribute called "activation" (next to "logger") which can be set to "inline" in cocoon.xconf, but that doesn't seem to work. Xdoclet tags for avalon like "@x-avalon.lifestyle type=singleton" and things don't do it either (yes, I do extract the metadata in my build process).

My specific usecase is:
I have a component which is not really a service as other components don't depend on it. This component subscribes itself as a listener of another component, and according to events acts on yet another component. I want to use this to consume event messages (from the eventcache block) and notify an object model, which is reachable through another component.

Any ideas?

Best regards,

Max Pfingsthorn

Hippo  

Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
m.pfingsthorn@hippo.nl / www.hippo.nl
-------------------------------------------------------------

Re: "Standalone" components?

Posted by Berin Loritsch <bl...@d-haven.org>.
Max Pfingsthorn wrote:

>Hi!
>
>I've had a bit of trouble with components that are not referenced by others. I need to start (i.e. service, configure, initialize, etc) a component once the container is started. Can I do this somehow?
>I noticed an attribute called "activation" (next to "logger") which can be set to "inline" in cocoon.xconf, but that doesn't seem to work. Xdoclet tags for avalon like "@x-avalon.lifestyle type=singleton" and things don't do it either (yes, I do extract the metadata in my build process).
>  
>

FYI, Cocoon is not using Fortress, so the XDoclet tags aren't going to 
do anything for components in Cocoon.


Re: "Standalone" components?

Posted by Torsten Curdt <tc...@apache.org>.
> Hi!
>
> I've had a bit of trouble with components that are not referenced  
> by others. I need to start (i.e. service, configure, initialize,  
> etc) a component once the container is started. Can I do this somehow?

Not sure whether I understand the exact problem but threadsafe  
components are started on container startup.

cheers
--
Torsten