james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Somethings broken?
Date Wed, 25 Sep 2002 10:50:10 GMT

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 

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 ...


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

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message