You don't need a working interface. But it is better practice to so.
That way you don't expose any lifecycle interfaces to the clients of
your component even if you only plan to have one implementation only.
/**
* @avalon.component
* @avalon.service type=MyComponent
* @x-avalon.info name=mine
* @x-avalon.lifestyle type=singleton
*/
public class MyComponent
{
}
<container-config>
<mine id="default" />
</container-config>
public class MyClient
{
public void service(ServiceManager serviceManager)
{
MyComponent mine = (MyComponent) serviceManager.lookup(
MyComponent.class.getName() );
}
}
Regards,
Unico
>
> -----Original Message-----
> From: David Bernard [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 8 juli 2003 14:11
> To: [EMAIL PROTECTED]
>
> Hi,
>
> Is it possible to define a component without wrote an
> interface (with ROLE) ?
>
> If yes how ?
>
> --------------------------------------------------------------
> David "Dwayne" Bernard Freelance Developer (Java)
> mailto:[EMAIL PROTECTED]
> \|/ http://dwayne.java-fan.com/
> --o0O @.@ O0o-------------------------------------------------
>
>
>
> ----------------------------------------------------------------
> Ce service de mailing vous est offert par http://www.freesurf.fr.
> FreeSurf, votre acces ADSL a partir de 29 euros/mois
> http://www.freesurf.fr/adsl/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]