excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Need some help with Sources
Date Mon, 09 May 2005 16:23:00 GMT
Torsten Schlabach wrote:

>>>this 'hint', "myxmldatabase", would be the protocol. so a URL you
>>>pass to the source resolver would be myxmldatabase://my/custom/path
>But aren't hints usually placed in .roles files? This is where I loose
>track. Taking a look at the cocoon.roles for example, there is not a
>single hint in the <role
>name="org.apache.excalibur.source.SourceFactorySelector"> part of the
>file. I would have expected to find hints for "cocoon:" and "sitemap:"
>there for example.
>Instead, there is a couple of <component-instance> tags in cocoon.xconf
>where I find this information. Why is it there and not in the .roles file?
>My understanding so far was that if I need to choose one out of many
>components implementing the same role, I would use hints in the .roles

Hints in the roles file can be used to define notation shorthands in the 
xconf file. They are the equivalent for selectors to what shorthands are 
for regular components.

If you look e.g. at the datasource-related roles, you'll see the following:

  <hint shorthand="jdbc" 
  <hint shorthand="j2ee" 
  <hint shorthand="informix" 

This allows to write the following in cocoon.xconf:
  <jdbc name="foo">
  <j2ee name="bar">

But this could equally be written:
  <component-instance name="foo" 
  <component-instance name="foo" 

There are no such hints for source factories, certainly because it's 
unlikely for one implementation to be used several times.

Hope this helps,

Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director

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

View raw message