Leo Sutic wrote:
>
> But the problem still remains:
>
> interface DataSourceComponent {
> String ROLE =
> "org.apache.avalon.excalibur.datasources.DataSourceComponentSelector";
>
> Connection getConnection();
> }
>
> Shouldn't the role be
> "org.apache.avalon.excalibur.datasources.DataSourceComponent"? According to
> the general rule?
For instances where you will have one and only one connection available, yes.
I know for Cocoon, we wanted the ability to have a reference to more than
one database. I can think of a number of applications where this is true.
That's why I had the ROLE as the "Selector" version.
There is nothing that is perfect in this world. The idiom I was proposing
works best for Excalibur because you want to ensure that the same Role
is used accross many systems. If you lower the barrier to writing out
our "impossibly long" role names, we encourage their use. Beyond that,
most components in Excalibur have only one role attached to them.
We want to be able to document the most common use for our components,
which for DataSourceComponent will most likely be the "Selector" dirivation.
For other components it is the default rule that we are enforcing.
We shouldn't try to write Components with interfaces that are identical
if we can help it. (The store example is an example of an acceptable
exception). We should only use one ROLE definition.
>
> Maybe:
>
> interface DataSourceComponent {
> String ROLE =
> "org.apache.avalon.excalibur.datasources.DataSourceComponent";
> String SELECTORROLE =
> "org.apache.avalon.excalibur.datasources.DataSourceComponentSelector";
> String MULTIPLEROLEROOT = "org.apache.avalon.excalibur.datasources.";
>
> Connection getConnection();
> }
>
> I'll wait for the paper, but I still see problems with your approach.
>
> /LS
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]