You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Mark Woon <mo...@SMI.Stanford.EDU> on 2002/02/10 10:19:46 UTC

Question

Hi all...

I'm a little confused about a few things, and I'm hoping someone can
clear some things up for me.

Can two containers that use the same component?  Specifically, can I
have two components that use the same JdbcDataSource?  I would assume
so, but what does it mean to release the component?  Is this because
ExcaliburComponentManager does some sort of reference counting for
resource management or something?

It seems odd to have to hold on to a reference to the container so that
I can release the component.  The syntax is
container.release(component), right?  For example, in the case where I'm
accessing a component through a ComponentSelector, I have to hold on to
the ComponentSelector just so I can release the component, and hold on
to the ComponentManager, just so that I can release the
ComponentSelector.  I guess I don't really have a question here and just
want confirmation that I'm doing things correctly.

Question 2:  I'm currently only using the JdbcDataSource and one custom
Component within the Avalon framework, and I'm trying to integrate them
into the rest of my application.  I'm wondering if anyone else has tried
to do something similar, or does everyone just develop with the Avalon
framework from the ground up?

I'm currently trying to write an Adaptor class that gives me a hook to
ExcaliburComponentManager so  that I can directly access Components.
The Adaptor only has one method:  getComponent.  Unfortunately, I don't
think I can guarantee that the ComponentManager will be disposed
properly since I'd just rely on the Adaptor's finalize method to do the
job.

Am I going about this correctly, or am I completely off base?

Thanks,
-Mark


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>