Hi Matthew,

The binding between Control interfaces and the associated
implementation actually already is decoupled.   Controls expose the
interface->implementation binding as a property of the control,
meaning that it is possible to configure it in specific contexts.   
If the property is not set, it default to a mapping which is the name
of the original interface +  "Impl" making the sample one-to-one
mapping case easy.   The system controls use this default binding
model, but its possible to alter it.

Here's a simple example showing how to do it declaratively:

@Control
@BaseProperties(controlImplementation="org.someorg.webservices.Jsr109ServiceControlImpl")
MyServiceControl fooImpl;

It's also possible to do this type of configuration externally (i.e.
bind interface->impl from outside the source code), which is probably
the more common and useful strategy.   Sometime later today, I'm going
to be checking in a sample that shows Controls/Spring integration, and
binds interface->impl as part of a Spring bean definition used to
configure properties of a control to be instantiated.

-- Kyle

On 5/5/05, Matthew Stevens <[EMAIL PROTECTED]> wrote:
> Eddie,
> 
> Is it possible to decouple the Control interfaces for these controls
> from the specific implementations.  It strikes me that the beehive
> developer focus is on the Control interface and the Control
> implementation is replaceable.  I would think that developers would like
> to rely on a stable and common Control interface for staple controls
> like jdbc and jms...but not want to be dependent on the
> implementations.  For instance, one may want to have a J2EE JSR 109
> based implementation of the web service control versus an Axis based
> implementation.  Can you comment?
> 
> matt
> 
> Eddie O'Neil wrote:
> 
> > All--
> >
> >   I'd like to propose that we move the code / samples / tests /
> > documentation for the four core system controls from
> > www.controlhaus.org into the Beehive SVN repository.
> >
> >   These four controls would include those at:
> >
> >     jdbc.controlhaus.org
> >     ejb.controlhaus.org
> >     jms.controlhaus.org
> >     webservice.controlhaus.org
> >
> > We would put these into:
> >
> >     trunk/systemcontrols
> >
> > under the:
> >
> >     org.apache.beehive.controls.system.[jdbc|ejb|jms|webservice]
> >
> > packages.
> >
> >   I've just received confirmation that the code grant covering these
> > four controls (and all supporting files) has been received and
> > recorded by the ASF, so we should be clear of any legal / copyright
> > issues given that this code currently is BEA copyright in the
> > controlhaus SVN repository.  We *will* change this to the ASF
> > copyright before it's 'in the repository.
> >
> >   I for one am totally +1 on this -- it will be great to have all of
> > the code shipping with a Beehive distribution together in a single
> > repository with shared test / doc infrastructure, etc.
> >
> > Eddie
> >
> 
>

Reply via email to