Hi,

This didn't seem to get through last time ... possibly due to outage of Apache 
boxs.

----------  Forwarded Message  ----------

Subject: Somethings broken?
Date: Wed, 25 Sep 2002 20:50:10 +1000
From: Peter Donald <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

Hiya,

Someone told me that there has been some problems with compatability in
Phoenix stuff. If you can tell me what the problem is then I will fix it.

All services retrieved from either the ComponentManager or the ServiceManager
all implement the Component interface by virtue of being proxys constructed
to implement Block interface (which extends Component).

So you can quite easily go

Component c = componentManager.lookup( Whatever.ROLE );

and pass c around. So it should all be backwards compatible, the one
 exception being when you want to pass the "this" object around (because it
 is not proxied).

To solve this problem I proposed an enhancement about a year ago. Look at the
diff produced by (and in particular look at the getProxy() method).

cvs diff -r 1.5 -r 1.6 src/java/org/apache/avalon/phoenix/BlockContext.java

I actually asked a James developer (Serge was that you?) if it would useful
for James. The reason being that James had just discovered that some of their
blocks were not shutting down when told to and could potentially corrupt the
system during shutdown (they discovered that after an enhancement to Phoenix
caused a IllegalSateException to be thrown if a service was used after it had
been disposed of).

However at the time it was stated that it was not needed. However I could
quite easily implement this now (take almost 10 minutes). So if you needed to
pass around the "this" object and it needs to implement Component then that
should be no problem.

Or have I missed the point?

BTW I just re subscribed now and Apache archives seem to be down so haven't
read the thread as of yet ...

--
Cheers,

Peter Donald
Doubt is not a pleasant condition, but certainty is absurd.
                -- Voltaire

-------------------------------------------------------

-- 
Cheers,

Peter Donald
------------------------------------------------
 "No. Try not. Do. Or do not. There is no try." 
                                     -- Yoda 
------------------------------------------------ 


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

Reply via email to