cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@yahoo.com>
Subject Re: [C2] ComponentManager and ConnectionPool
Date Sun, 27 May 2001 13:10:45 GMT
The approach I have taken for my beans is that I wrote
them to accept a Connection object from outside. 
Since
I expected to batch a group of method calls from the
different beans, I left the commit call for the
calling
entity.

So I use the Action or Generator I wrote, grab the
Connection Object, and pass it to the beans.

The other alternative to that approach, is I use the
user-roles attribute on the root configuration
element:

<cocoon version="2.0" user-roles="WEB-INF/user.roles">
 <!-- ..... -->
</cocoon>

And set up my roles and then do the configurations in
the cocoon.xconf file.  I had a Component that I wrote
to act like a daemon in the background, so I have a
configuration element like this:

<daemon class="my.class.for.Daemon">
  <use-connection>myconnection</use-connection>
  <export dir="/path/to/exported/images"/>
</daemon>

The Component Manager automatically loads the
component.  It isn't initialized until it is actually
needed though.  I might change that to make Component
Manager initializable so that after configuration,
all components are at least initialized...  That's
a bit of extra complexity I don't have time to handle
yet.

--- Torsten Curdt <tcurdt@dff.st> wrote:
> In some beans I'd like to use the ConnectioPool
> from C2. As far as I can see I need to get hold
> of the ComponentManager to get the ConncetionPool
> instance. But the ComponentManager is only
> accessible for Cocoon or Components that are
> loaded from Cocoon.
> 
> What is the proposed way for integration?
> 
> Should I make my application and beans become
> a C2 component?
> 
> I guess this a question for Berin but others
> of course also more than welcome to answer ;)
> --
> Torsten
> 
> 
>
---------------------------------------------------------------------
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:
> <cocoon-users-help@xml.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message