Another great idea!  I was thinking the same thing that maybe this could be
some sort of configuration and we'll use some intelligent defaults based on
the most common usage scenarios.

-----Original Message-----
From: Russell, Paul [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 31, 2006 9:51 AM
To: 'dev@hivemind.apache.org'
Subject: RE: New convention?

This does kind of feel like the kind of thing that could lead to scenario
explosion; I'm sure there are all sorts of policies that different companies
have implemented. Would it be better to have an SPI for it? Something like
the following contributed to a configuration point:

public interface ServiceImplementationLocator {
        /** Attempt to discover a service implementation for a service
         * implementing serviceInterface
         * @return the implementation class for the service, or null if
         *      one could not be determined automatically.
         */
        public Class discoverServiceImplementation(Class serviceInterface);
}

Just a thought,


Paul

-----Original Message-----
From: Pablo Lalloni [mailto:[EMAIL PROTECTED]
Sent: 31 July 2006 14:47
To: dev@hivemind.apache.org
Cc: James Carman
Subject: Re: New convention?


El Lunes, 31 de Julio de 2006 07:49, James Carman escribió:
> Yes, *Impl in the same package might even be the first place it looks. 
> Then look for an *Impl in the impl subpackage.  I normally use the latter
> setup, but many folks do just put the implementation classes in the same
> package as their interface.  I'd like to make HiveMind very simple to
> configure with minimal effort.  That's why we offer the option to use
> "convention over configuration."

In cases when there will be just a single impl or a "default" one for a
given 
service we just make it a static inner class of the service interface. 

public interface SomeService {
  ...
  public static class Default implements SomeService {
    ...
  }
} 

So if the impl "search path" includes this idiom, it would be great for us
as 
this is definitely the most frequent case here.

-- 
Pablo


This e-mail (and any attachments) may contain privileged and/or confidential
information. If you are not the intended recipient please do not disclose,
copy, distribute, disseminate or take any action in reliance on it. If you
have received this message in error please reply and tell us and then delete
it. Should you wish to communicate with us by e-mail we cannot guarantee the
security of any data outside our own computer systems. For the protection of
Legal & General's systems and staff, incoming emails will be automatically
scanned.

Any information contained in this message may be subject to applicable terms
and conditions and must not be construed as giving investment advice within
or outside the United Kingdom.

The following companies are subsidiary companies of the Legal & General
Group Plc which are authorised and regulated by the Financial Services
Authority for advising and arranging the products shown: Legal & General
Partnership Services Limited (insurance and mortgages), Legal & General
Insurance Limited (insurance), Legal & General Assurance Society Limited 
(life assurance, pensions and investments), Legal & General Unit Trust
Managers Limited and Legal & General Portfolio Management Services Limited
(investments).

They are registered in England under numbers shown.
The registered office is Temple Court, 11 Queen Victoria Street, London EC4N
4TP.

Legal & General Partnership Services Limited: 5045000 Legal & General
Assurance Society Limited: 166055 Legal & General (Unit Trust Managers)
Limited: 1009418 Legal & General (Portfolio Management Services) Limited:
2457525 Legal & General Insurance Limited: 423930

They are registered with the Financial Services Authority under numbers
shown. You can check this at www.fsa.gov.uk/register

Legal & General Partnership Services Limited: 300792 Legal & General
Assurance Society Limited: 117659 Legal & General (Unit Trust Managers)
Limited: 119273 Legal & General (Portfolio Management Services) Limited:
146786 Legal & General Insurance Limited: 202050



Reply via email to