You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Royal <pr...@managingpartners.com> on 2001/05/04 18:07:43 UTC
[C2] Adding custom Avalon components
(If this needs to go to the dev list let me know, I've subbed to that also.
I'm uncertain as to where usage questions belong at the moment)
I'm working on re-writing a legacy application (originally in Basic2C for
the wang!) with cocoon. I've got a simple prototype up and working in C1
and now i'm porting that to C2 before starting full-fledged development.
In C1 I had a single producer that handled everything. Upon its
initialization I would add a custom Actor to the director. Obviously that
is no longer a valid approach in C2 :)
I've figured out that I need to create my own avalon-based component. From
reading the C2-dev list archives, I've figured out that I need to define a
role and then provide a class to implement it (info from
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=98691119526333&w=2). I see
that C2 has its roles defined in cocoon.roles, and then pulls the actors
for those roles from cocoon.xconf.
I'd like to have my component created and added to the component manager
when cocoon inits. I realize that I could add my component information to
both the .roles and .xconf file, but since the .roles file in buried in the
cocoon source tree (and thus in the jar for deployment).
So, my question is, what is the sanctioned way of added new roles to the
system? If there isn't one, any suggestions/recommendations on how I should
go about writing that patch? :)
-pete
--
peter royal -> proyal@managingpartners.com
managing partners, inc. -> http://www.managingpartners.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [C2] Adding custom Avalon components
Posted by Peter Royal <pr...@managingpartners.com>.
At 10:40 PM 5/4/2001 +0200, you wrote:
>There is no patch needed to deploy your own Avalon component. Use the
>full syntax to descibe your components:
>
> <component role="org.foo.MyRole" class="org.foo.MyRoleImpl"/>
>
>The roles.xconf file is used to initialize a RoleManager to reduce
>verbosity in the cocoon.xconf file.
>
>Hope this helps.
Yes, thanks! I didn't realize there was a full syntax to describe the
components. I didn't recall seeing that syntax being used in the C2 conf
files, and since those and the code comprise most of the documentation now,
the shortcuts can be hard to find!
thanks!
-pete
--
peter royal -> proyal@managingpartners.com
managing partners, inc. -> http://www.managingpartners.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: [C2] Adding custom Avalon components
Posted by giacomo <gi...@apache.org>.
On Fri, 4 May 2001, Peter Royal wrote:
> (If this needs to go to the dev list let me know, I've subbed to that also.
> I'm uncertain as to where usage questions belong at the moment)
>
> I'm working on re-writing a legacy application (originally in Basic2C for
> the wang!) with cocoon. I've got a simple prototype up and working in C1
> and now i'm porting that to C2 before starting full-fledged development.
>
> In C1 I had a single producer that handled everything. Upon its
> initialization I would add a custom Actor to the director. Obviously that
> is no longer a valid approach in C2 :)
>
> I've figured out that I need to create my own avalon-based component. From
> reading the C2-dev list archives, I've figured out that I need to define a
> role and then provide a class to implement it (info from
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=98691119526333&w=2). I see
> that C2 has its roles defined in cocoon.roles, and then pulls the actors
> for those roles from cocoon.xconf.
Yup.
> I'd like to have my component created and added to the component manager
> when cocoon inits. I realize that I could add my component information to
> both the .roles and .xconf file, but since the .roles file in buried in the
> cocoon source tree (and thus in the jar for deployment).
Yes, I've thought about moving the roles.xconf file out of the jar
somewhere near the cocoon.xconf file and have a confiuration element in
cocoon.xconf to point to the roles.xconf file.
> So, my question is, what is the sanctioned way of added new roles to the
> system? If there isn't one, any suggestions/recommendations on how I should
> go about writing that patch? :)
There is no patch needed to deploy your own Avalon component. Use the
full syntax to descibe your components:
<component role="org.foo.MyRole" class="org.foo.MyRoleImpl"/>
The roles.xconf file is used to initialize a RoleManager to reduce
verbosity in the cocoon.xconf file.
Hope this helps.
Giacomo
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>