hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: Calls to registry.getService()
Date Fri, 17 Jun 2005 10:50:25 GMT
It's for type-safety.  If we were using JDK1.5, we would just have the
method return the type specified as the parameter.

-----Original Message-----
From: Glen Stampoultzis [mailto:gstamp@gmail.com] 
Sent: Friday, June 17, 2005 3:41 AM
To: hivemind-user@jakarta.apache.org; belaran
Subject: Re: Calls to registry.getService()

Seems reasonable.  I'm wondering why it requires a service name and a
interface.  I would have thought the service name would be enough to
determine what interface applies.

-- Glen

On 6/16/05, belaran <belaran@gmail.com> wrote:
> Glen,
>  
>  IMHO, i agree with Richard, it does seems best practise to "label" the
> class you're creating an instance. 
>  Reusabilité of the interface is one, important but you could had that
> having a very explicit code is generally good practice... ServiceName
allow
> you to be be very explicit, as the serviceName will generally be more
> clearer than the interface name.
> 
>  Belaran
>  
> 2005/6/16, Hensley, Richard <Richard.Hensley@mckesson.com>:
> > 
> > Glen,
> > 
> > It really depends on whether or not multiple services implementing the
> same
> > interface will be present in your registry. I personally, always specify
a
> > service name because it seems like I end up reusing an interface with a
> new 
> > implementation or an implementation with a different configuration,
either
> > of which has a new name.
> > 
> > Richard
> > 
> > -----Original Message-----
> > From: Glen Stampoultzis [mailto: gstamp@gmail.com]
> > Sent: Wednesday, June 15, 2005 4:55 PM
> > To: hivemind-user@jakarta.apache.org
> > Subject: Calls to registry.getService()
> > 
> > I'm wondering which is better practice - calling 
> > registry.getService(class) or registry.getService(serviceName, class)
> > ?
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> -- 
> Belaran,
> "What'do'ya mean ?"
> "As a moto, I just avoid meaning anything..."

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message