james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Hilmer ...@tefs.dk>
Subject Re: Delegation hides specialization
Date Mon, 09 Feb 2004 16:18:53 GMT
As far as I can see the only way is to introduce a new JamesConnectionManager 
interface (extending ConnectionManager) which adds the methods we need.
Make SimpleConnectionManager implement that and finally use the new interface 
in assembly.xml.

Then in AbstractJamesService we can use instanceof against the new interface 
as the Proxy will certainly implement that, and we are home free.

--Søren


On Monday 09 February 2004 15:04, Noel J. Bergman wrote:
> > > Looks to me that if the connection manager is not our
> > > SimpleConnectionManager, we won't use the service-specific setting.
> >
> > the piece of offending code in AbstractJamesService is:
> >   if (connectionManager instanceof SimpleConnectionManager)
> > This is never true, as connectionManager is an instanceof Proxy!
>
> Anyone have an idea for how to handle this?
>
> See lines 408-430 of
> http://cvs.apache.org/viewcvs.cgi/james-server/src/java/org/apache/james/co
>r e/AbstractJamesService.java?annotate=1.12 and lines of 362-377
> http://cvs.apache.org/viewcvs.cgi/james-server/src/java/org/apache/james/co
>r e/AbstractJamesService.java?annotate=1.4.4.2&only_with_tag=branch_2_1_fcs
>
> Apparently, the Avalon container is blocking our visibility to our
> specialized and extended ConnectionManager:
> http://cvs.apache.org/viewcvs.cgi/james-server/src/java/org/apache/james/ut
>i l/connection/SimpleConnectionManager.java
>
> 	--- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org

-- 
Søren Hilmer, M.Sc.
R&D manager		Phone:	+45 70 27 64 00
TietoEnator IT+		Fax:	+45 70 27 64 40
Ved Lunden 12		Direct:	+45 87 46 64 57
DK-8230 Åbyhøj		Email:	soren.hilmer <at> tietoenator.com



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message