You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mats Norén <ma...@alma.nu> on 2003/01/14 11:39:37 UTC

Flow-questions

Hi,
I´ve been looking at the code for the flow layer and I have a couple of 
questions:

Is there any way for me to get access to the component-manager within 
the flow layer?

We´ve developed a persistence-manager based on Jakarta-OJB, which by the 
way is a great product, and now we would like to use it from the flow layer.
It´s avalon-based and therefore there weren´t any problems deploying it 
in the cocoon.xconf and cocoon.roles.
BUT we don´t want our business-components in the cocoon core.
So we need another solution... :(
Come to think of it, what I would really like is some functionality for 
registring avalon-components to the current scope of a flow-application.
This shouldn´t necessarily be the cocoon-componentmanager but instead a
componentmanager for business-objects.
The BCM can be instantiated in the JavaScriptInterpreter maybe and 
registered to the scope.

Is there a better way of tying in our businessobjects into C2?

It seems to me that this kind of functionality is somewhat out of the 
current scope of C2 but I would be very interested in the views of the 
developer community on how this integration could/should be done in a 
"buzzword compliant" fashion ;)

Regards Mats













---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Flow-questions

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Reinhard Poetz/Stefano Mazzocchi wrote
> Carsten Ziegeler wrote:
> > Isn't it possible to use the usual Composable stuff?
> 
> What do you mean with "... the usual composable stuff"?
> 
Sorry, this was perhaps a little bit too short, ok:
Cocoon is based on components. If a component needs a ComponentManager
it simply implements the Composable interface from Avalon
and gets the ComponentManager set.

So, if you implement a component, the usual way is to implement
the Composable interface.

(I'm sure, you all know this and I thought that if I write
"the usual Composable stuff" it's obvious what I mean. I was wrong.)

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Flow-questions

Posted by re...@gmx.net.
> > > Is there any way for me to get access to the component-manager within
> > > the flow layer?
> >
> > cocoon.environment.getComponentManager() should do the trick. Haven't
> > tested it though.
> >

Try "cocoon.componentManager.lookup(...)" to access the component manager.


> I warn you using the method above, because it's an internally used method
> which should not be access from own components.
> Isn't it possible to use the usual Composable stuff?

What do you mean with "... the usual composable stuff"?

Regards,
Reinhard
 
> Carsten

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Stefano Mazzocchi <st...@apache.org>.
Carsten Ziegeler wrote:
> Ugo Cei wrote:
> 
>>Mats Norén wrote:
>>
>>>Hi,
>>>I´ve been looking at the code for the flow layer and I have a couple of
>>>questions:
>>>
>>>Is there any way for me to get access to the component-manager within
>>>the flow layer?
>>
>>cocoon.environment.getComponentManager() should do the trick. Haven't
>>tested it though.
>>
> 
> I warn you using the method above, because it's an internally used method
> which should not be access from own components.

?? then why is it part of the Environment?

> Isn't it possible to use the usual Composable stuff?

what do you mean?

-- 
Stefano Mazzocchi                               <st...@apache.org>
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Mats Norén <ma...@alma.nu>.
Thanks! That worked as well. Weird though that the performance was 
substantially slower... :)

Ugo Cei wrote:

> 
> A brief look at the API docs for the JSCocoon class reveals that you 
> should be able to access the manager as a property of the "cocoon" 
> object, as in:
> 
>     var manager = cocoon.componentManager;
> 
> Even though JSCocoon does not implement Composable, somehow a manger is 
> passed to it via the setContext() method, so I suppose it is set by the 
> Composable that creates JSCocoon, whatever it is.
> 
> I'll let Ovidiu comment on this, as soon as he's finished unpacking his 
> bags ;-).
> 
>     Ugo
> 





---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Ovidiu Predescu <ov...@apache.org>.
On Tuesday, Jan 14, 2003, at 06:18 US/Pacific, Ugo Cei wrote:

> Carsten Ziegeler wrote:
>>> cocoon.environment.getComponentManager() should do the trick. Haven't
>>> tested it though.
>> I warn you using the method above, because it's an internally used 
>> method
>> which should not be access from own components.
>> Isn't it possible to use the usual Composable stuff?
>
> A brief look at the API docs for the JSCocoon class reveals that you 
> should be able to access the manager as a property of the "cocoon" 
> object, as in:
>
> 	var manager = cocoon.componentManager;
>
> Even though JSCocoon does not implement Composable, somehow a manger 
> is passed to it via the setContext() method, so I suppose it is set by 
> the Composable that creates JSCocoon, whatever it is.

Yes, this is exactly right, you can use the componentManager accessible 
through the 'cocoon' global variable.

> I'll let Ovidiu comment on this, as soon as he's finished unpacking 
> his bags ;-).

I've done it before, hope you don't mind :)

Cheers,
-- 
Ovidiu Predescu <ov...@apache.org>
http://www.google.com/search?btnI=&q=ovidiu (Are you feeling lucky?)


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Ugo Cei <u....@cbim.it>.
Carsten Ziegeler wrote:
>>cocoon.environment.getComponentManager() should do the trick. Haven't
>>tested it though.
> I warn you using the method above, because it's an internally used method
> which should not be access from own components.
> Isn't it possible to use the usual Composable stuff?

A brief look at the API docs for the JSCocoon class reveals that you 
should be able to access the manager as a property of the "cocoon" 
object, as in:

	var manager = cocoon.componentManager;

Even though JSCocoon does not implement Composable, somehow a manger is 
passed to it via the setContext() method, so I suppose it is set by the 
Composable that creates JSCocoon, whatever it is.

I'll let Ovidiu comment on this, as soon as he's finished unpacking his 
bags ;-).

	Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Mats Norén <ma...@alma.nu>.
Carsten Ziegeler wrote:

<snip/>

> 
> I warn you using the method above, because it's an internally used method
> which should not be access from own components.

Ok.

> Isn't it possible to use the usual Composable stuff?

Hmm..not sure I follow you. :)
What I was after is a Container of some sort for the Avalon-based 
business-components we have.
We don´t want to put the objects in the cocoon.xconf and cocoon.roles 
but since there is no alternative solution we opted for that anyway.
How do you mean?

Regards Mats


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Flow-questions

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Ugo Cei wrote:
>
> Mats Norén wrote:
> > Hi,
> > I´ve been looking at the code for the flow layer and I have a couple of
> > questions:
> >
> > Is there any way for me to get access to the component-manager within
> > the flow layer?
>
> cocoon.environment.getComponentManager() should do the trick. Haven't
> tested it though.
>
I warn you using the method above, because it's an internally used method
which should not be access from own components.
Isn't it possible to use the usual Composable stuff?

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Flow-questions

Posted by Ugo Cei <u....@cbim.it>.
Mats Norén wrote:
> Hi,
> I´ve been looking at the code for the flow layer and I have a couple of 
> questions:
> 
> Is there any way for me to get access to the component-manager within 
> the flow layer?

cocoon.environment.getComponentManager() should do the trick. Haven't 
tested it though.

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org