--- Peter Severin <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I cannot understand clearly the role of the xconf and roles
> configuration files. The way I see things, roles file is used to declare
> components which will be managed by the container. As it is a pretty
> tedios task to update this file we have an ant task for this. Xconf file
> on the other hand is used to provide some configuration for components.
> The problem is that even if I don't need a configuration for a component
> I still have to put a corresponding empty tag in this file because
> overwise my component is not deployed. Why is this ? Doesn't container
> have enough information from roles file to do the deployment ? As we are
> going to have a large number of different services/components the need
> to manually manage an additional file full of empty tags doesn't look
> very attractive.
>
Actually, it's the roles file which is the extra one. You can get away with
just the xconf file. For example, if you don't use meta-info or a roles file,
you can declare your components in your xconf file like this (or at least you
used to):
<component
role="org.apache.bizserver.docs.DocumentRepository"
class="org.apache.bizserver.docs.DatabaseDocumentRepository">
<dbpool>documents</dbpool>
</component>
<component
role="org.apache.bizserver.docs.GuardianComponent"
class="org.apache.bizserver.docs.DocumentGuardianComponent">
<dbpool>security</dbpool>
<policy file="/home/system/document.policy"/>
</component>
[stolen from the Developing with Avalon whitepaper]
The roles file is just there for convenience, so that you don't have to write
out the <component> element in the xconf file.
Moreover, with the use of meta-info tags and corresponding ant tasks, you can
get rid of the roles files but still use the shorter names in your xconf.
Honestly, I'm still not all that familiar with Fortress's use of meta-info, so
perhaps someone else can show an example of that.
Point is, it's the xconf file which is the important one, _not_ the roles file.
jaaron
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]