ok, that's exactly what I want to continue with... but, if others want
to chime in... this would be an easy JIRA for contributors to earn
some merits with providing patches... ;-)

 Bernd

On 6/29/06, Norman Maurer <[EMAIL PROTECTED]> wrote:
Hi Bernd,
i did such changes in the DNSRBLHandler .. Maybe you look there ( It
should be in the comment)..  I think we should use such method to get
better "api" for writing tests etc.. It also sems cleaner to me!

bye
Norman

Am Donnerstag, den 29.06.2006, 07:48 +0000 schrieb Bernd Fondermann
(JIRA):
>     [ 
http://issues.apache.org/jira/browse/JAMES-494?page=comments#action_12418403 ]
>
> Bernd Fondermann commented on JAMES-494:
> ----------------------------------------
>
> Anyone having any objections starting this?
> For me, the JNDI part  is a separate task so I would leave this out in the 
first place.
>
> > Refactor the service methods to inject services via setters
> > -----------------------------------------------------------
> >
> >          Key: JAMES-494
> >          URL: http://issues.apache.org/jira/browse/JAMES-494
> >      Project: James
> >         Type: Sub-task
>
> >     Versions: 2.4.0
> >     Reporter: Stefano Bagnara
> >     Assignee: Bernd Fondermann
> >      Fix For: 2.4.0
>
> >
> > Nothing worth more than an example:
> > Here is the current service method of the SMTPServer:
> > public void service( final ServiceManager manager ) throws ServiceException 
{
> >     super.service( manager );
> >     serviceManager = manager;
> >     mailetcontext = (MailetContext) 
manager.lookup("org.apache.mailet.MailetContext");
> >     mailServer = (MailServer) manager.lookup(MailServer.ROLE);
> >     users = (UsersRepository) manager.lookup(UsersRepository.ROLE);
> >     dnsServer = (DNSServer) manager.lookup(DNSServer.ROLE);
> > }
> > We could change it to
> > public void service( final ServiceManager manager ) throws ServiceException 
{
> >     super.service( manager );
> >     serviceManager = manager;
> >     setMailetContext((MailetContext) 
manager.lookup("org.apache.mailet.MailetContext"));
> >     setMailServer((MailServer) manager.lookup(MailServer.ROLE));
> >     setUsersRepository((UsersRepository) 
manager.lookup(UsersRepository.ROLE));
> >     setDNSServer((DNSServer) manager.lookup(DNSServer.ROLE));
> > }
> > and add the above setters.
> > This way we can fill dependencies of SMTPServer without using the 
Serviceable interface and the ServiceManager component.
> > Later we'll move the whole service method and Serviceable interface to the specific 
Avalon extension of the "container-agnostic" SMTPServer.
>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBEpBxgUWWO/2C5ZWARAjr5AKCfVI7o5gtR3SrJdZavxF7y4ra9UwCgheYA
/zkKGAIAVaPErzo64RZ95xo=
=VtfW
-----END PGP SIGNATURE-----




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to