On Wed, 2 Oct 2002 06:39, Berin Loritsch wrote:
> > interface Releaseable
> > {
> > void release();
> > }
> >
> > The magic thing about what I am going to propose in about amonth is that
> > no component will ever implement this interface ;)
>
> So is it something that will always exist? IOW, how would the user
> releae it?
Probably something like
if( object instanceof Releaseable )
{
((Releaseable)object).release();
}
or maybe
ReleaseUtil.release( object );
> > Lets assume that every component is exposed via a proxy with an
> > interceptor chain attached to it. So when you invoke a method it will be
> > passed through each interceptor in chain.
> >
> > Just say our chain looks something like
> >
> > Service Interface
> >
> > v
> > Pooling Interceptor
> >
> > V
> > Target Method
>
> *!A light bulb goes off over my head!*
>
> If we have sessions, etc. then the proxied interface performs the
> release() and the client never sees it! That would rock!
yeppo - now imagine you generalize this to all
> >><dependencies>
> >> <dependency>
> >> <service name="org.apache.MyService" as="#"/>
> >> </dependency>
> >></dependency>
> >
> > That was how I originally implemented it today but it introduced more
> > complexity into the code and into documentation. Part of this is because
> > of BlockInfo format (Service is shared between service publishing
> > declaration and service dependency declaration). Effectively the above is
> > same as
> >
> > <dependencies>
> > <dependency>
> > <role>org.apache.MyService</role>
> > <service name="org.apache.MyService[]"/>
> > </dependency>
> > </dependency>
>
> Ah. That is in contrast to the "Meta" package (Stephen's baby) which
> has a distinction between ServiceDefinition and ReferenceDescriptor.
> IOW, a Dependancy is separate from the service definition. I like the
> Service being a first class item (is that done for Phoenix?), and then
> using a reference object when looking it up.
Not in Phoenix for backwards compatability reasons but it will be handled like
that when we upgrade to Info.
> Yes, but as long as you don't *force* it to be like that, it is ok. I
> am seeing the value of being able to name my components whatever I want,
> and the container resolving them for me.
yep.
> Yes, but the fewer places we declare the array/map/selector requirement,
> the better. Imagine this scenario:
>
> <dependency>
> <service name="org.apache.MyService{}"/>
> </dependency>
>
> ---------------------
>
> <block class="org.apache.MyComponent" name="myComp">
> <provide name="service1" role="org.apache.Myservice[]"/>
> <provide name="service2" role="org.apache.Myservice[]"/>
> <provide name="service3" role="org.apache.Myservice[]"/>
> </block>
This would generate en error. Something along the lines of;
"myComp" of type "..." does not have a dependency on type
"org.apache.Myservice[]" but was provided one in assembly.xml (or something
similar).
--
Cheers,
Peter Donald
--------------------------------------------------
"An intellectual is someone who has been educated
beyond their intelligence."
--------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>