You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by Maarten Coene <Ma...@ToughGuy.net> on 2002/01/23 03:19:13 UTC

[jUDDI-developers] init() and destroy()

Hi,

in a lot of interfaces, there is an init() and destroy() method (for 
example: UUIDGen, Authenticator, Configurator, ...). Shouldn't this init() 
method be used in the corresponding factory? What happens now is that in 
some interface implementations, the init() method is called in the 
constructor (SimpleAuthenticator, JavaUUIDGen) or isn't called at all 
(SimpleConfigurator). I think the factory should call this init() method 
after creating the object. For example with the AutenticatorFactory:


     try
     {
       Class authClass = Class.forName(authClassName);

       Authenticator authenticator = (Authenticator) authClass.newInstance();
       authenticator.init();
       return authenticator;
     }


What do you think?

Maarten