> -----Original Message-----
> From: Pawel X Karendys [mailto:[EMAIL PROTECTED]
>
> In your email you've essentially stated: "Component = Service". So far so
> good but what happens if I want my Component (well, Service) to implement
> more than one service? In the "old days", when components used to be
> "Components", one could say:
>
> my Component provides/implements/exposes two Services
>
<snip/>
A component can implement more than one service. That's not a problem. Of
course, "client" code only ever sees the component as one service or
another.
public class MyComponent
extends AbstractLogEnabled
implements Serviceable, Initializable, MyServiceOne, MyServiceTwo
{
...
}
and then in some 'client' code:
MyServiceOne serviceOne = (MyServiceOne) manager.lookup("serviceOne");
MyServiceTwo serviceTwo = (MyServiceTwo) manager.lookup("serviceTwo");
serviceOne and serviceTwo may in fact be the same "component" (or even
instance) but client code will only be able to handle them via the role
interface by which they were retrieved.
I know this is definitely possible in Merlin. I haven't tried it with
Fortress (Fortress may create two instances, one for each service, I'm not
sure). But the concept is definitely possible and allowed.
J. Aaron Farr
SONY ELECTRONICS
DDP-CIM
(724) 696-7653
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]