dont you think this is too strict?
every implementaion of a Service must have all its public methods declared in the interface,and if you happen to need to add a public method to a specific implemetation class, you must declare it in the Interface,and since other implementations may need not use that method, you will have to have an abstract class also,just such a right rule.


no need and no way to break the rule?




From: Niclas Hedhman <[EMAIL PROTECTED]>
Reply-To: "Avalon framework users" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Subject: Re: Fortress: strange behavior
Date: Thu, 15 Jan 2004 18:00:49 -0800

On Thursday 15 January 2004 17:47, Mu Mike wrote:
> when I use a ServiceSelector this way
>
> Object obj=selector.select(MyService.ROLE+"."+hintOfMySpeicialService);
>
> I got an object of type [EMAIL PROTECTED], when I write this object to
String
> using its
> toString() method, it prints [EMAIL PROTECTED],the problem is ,
I
> can not cast
> obj to MySpecialService! this is really a series problem for me, and I
m
> wondering why
> anyone can help me?

I don't know for sure about Fortress, but in Merlin in specific it is not
allowed, and will not be allowed. A proxy is inserted in between for many
reasons. I can believe that Fortress does the same thing.

So why is this a problem? It is likely you are violating the IoC and SoC
principles by doing it, and I would like to know why/how...

Cheers
Niclas

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


_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com



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



Reply via email to