On Sun, 27 May 2001, Berin Loritsch wrote:

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

Yeah... I'm using this on some of my classes, too
But since I need several different connections
this not really nice for this one. (I would have
to pass multiple connections)

Couldn't I just pass the object model map and
then look up the pool-controller from it?
Is looking up a component in the component manager
the same as looking it up in the object model?

Didn't get this one yet...


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

What about static attribute and methods within a component?
I'm thinking of making our application a component so it
will be easier to integrate with C2. But how does automatic
loading work when there are static methods or attributes...
Does this matter? or stays everything the same?
--
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to