[ 
http://nagoya.apache.org/jira/browse/BEEHIVE-100?page=comments#action_56034 ]
     
Kyle Marvin commented on BEEHIVE-100:
-------------------------------------

I've been thinking about this some... but the route I was considering wasn't so 
much explicit configuration as it was implicit.

What I mean by this is to have a well-defined mapping of some sort (by 
convention or some other mechanism) from a service interface to locate its 
provider.   As an example, let's say the convention is that the contextual 
service XXX will have a provider named XXXProvider.  A slightly more elegant 
approach might be to use an annotation on the service interface to define the 
associated BeanContextServiceProvider class.

The runtime can then automatically locate the provider (via classloader) and do 
the service provisioning.   All that's required is to modify the 
BeanContext.getService() implementation to use the above algorithm, in addition 
to looking at a statically registered list.

The benefit of this is that adding new contextual services is as simple as 
dropping a jar into the appropriate location... no file manipulation required.

I look at external XML configuration as just a better way to build a static 
service list... but it's not particularly dynamic, because you have to modify 
local config files to see new services.

Totally agree the that current mechanism (a static list, defined in code) is 
not good enough.

Comments?

> Configurable services definition
> --------------------------------
>
>          Key: BEEHIVE-100
>          URL: http://nagoya.apache.org/jira/browse/BEEHIVE-100
>      Project: Beehive
>         Type: New Feature
>   Components: Controls
>     Versions: V1Alpha
>     Reporter: C Brett Bennett
>     Priority: Minor

>
> A simple scheme to allow for a container specific control container context 
> to have a configurable set of services to be defined. This scheme can then be 
> implemented within
> various containers, including standalone ones to define the services to be 
> provided within
> those container.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to