You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by giacomo <gi...@apache.org> on 2001/05/18 08:20:29 UTC

Restricting objectModel

Dead developpers

A recent question on the user list "how can I put my own stuff into the
objectModel" forced me to rethink about the the concept of the
objectModel.

Let me resume: The Cocoon core engine doesn't really care about the
environment it runs in. Thus we introduced the notion of an abstract
Environment with the absolute minimum of functionality needed
exclusively by the Cocoon engine to be able to work. To have a contract
between a concrete Environment and the sitemap components, which are BTW
the only component which need to know about the conrete Environment they
run in, we introduced the objectModel as a container for important
environmental objects. The concrete servlet Environment implemented
today uses the objectModel to put in the Request, Response and Context
objects of the servlet environment. This enables the Cocoon engine to
operate in almost any environment (ie. Apache James [SMTP] or an EJB
container) by simply creating an concrete Environment class.

Now, I'd like to change the type of the objectModel from a Map to an
Avalon Context. This will downgrade it to an read-only object preventing
users from putting their own stuff in it.

If nobody gives me a reasonable -1 I'd volunteer to change it the way
I've proposed.

Please your quick comments about it.

Giacomo



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


Re: Restricting objectModel

Posted by Martin Man <Ma...@seznam.cz>.
On Fri, May 18, 2001 at 08:20:29AM +0200, giacomo wrote:
> 
> Dead developpers
> 
> A recent question on the user list "how can I put my own stuff into the
> objectModel" forced me to rethink about the the concept of the
> objectModel.
> 
> Let me resume: The Cocoon core engine doesn't really care about the
> environment it runs in. Thus we introduced the notion of an abstract
> Environment with the absolute minimum of functionality needed
> exclusively by the Cocoon engine to be able to work. To have a contract
> between a concrete Environment and the sitemap components, which are BTW
> the only component which need to know about the conrete Environment they
> run in, we introduced the objectModel as a container for important
> environmental objects. The concrete servlet Environment implemented
> today uses the objectModel to put in the Request, Response and Context
> objects of the servlet environment. This enables the Cocoon engine to
> operate in almost any environment (ie. Apache James [SMTP] or an EJB
> container) by simply creating an concrete Environment class.
> 
> Now, I'd like to change the type of the objectModel from a Map to an
> Avalon Context. This will downgrade it to an read-only object preventing
> users from putting their own stuff in it.
+1 for it, when I was designing the validator actions I found out that putting
anything to objectModel actually does not help anything, ..., mainly because
flow is now controlled in a sitemap, so what matters is a Map returned to
the sitemap, because it can be then used from sitemap

the direct communication among components I consider obscure, because
1) it is not transparent and visible, you don't know what and who put there
and under which name
2) the state of the webapp is normally maintained using session, and we have now
session abstracted from the servlet environment, so writable object model is
just duplication and confusion here...

though, I might be wrong, 

> 
> If nobody gives me a reasonable -1 I'd volunteer to change it the way
> I've proposed.
> 
> Please your quick comments about it.
> 
> Giacomo
> 
> 
martin
-- 
-------------------------------------------------------------------------------
"Only dead fish swims with a stream"
gpg_key_available: http://globales.cz/~mman/martin.man.gpg
gpg_key_fingerprint: 2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223

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


[C2] [Update] i18n sample updated

Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Hi, cocooners!

I have some questions about i18n:

1. Can anybody please apply this changes to the i18n sample (simply replace
old files by these new ones)?

I've changed it a little:
    - added 3 more translations - now you can see the page in 6 languages
(English, Russian, German, Polish, Spanish, Armenian. I am not sure for
German and Spanish translations, I simply used an application for
translation).
    - the date in the XSP sample now uses localized format.
    - added a documentation link.

2. New features suggested:
    - date translation:
        <i18n:date src-pattern="dd/MM/yyyy" pattern="dd:MMM:yyyy"
value="01/01/2001"/>
        src-pattern will be used to parse the 'value', then the date will be
formatted according to the current lang (Locale) using the 'pattern' format.

    - number localized formatting:
        <i18n:decimal pattern="0.##" value="2.0" /> - it will be useful for
Arabic, Indian number formatting.

I don't know if a special currency formatting is needed.
I am very interested in your comments.

3. Another thing, that is not possible yet and I don't know a good way of
implementing it are elements inside an i18n text, e.g.:
<i18n:translate>
    <i18n:text>See {0} for details.<i18n:text>
    <i18n:param><a href="http://xml.apache.org">Apache Web
Site</a></i18n:param>
</i18n:translate>

How is it possible to format such a string like this:

    See <a href="http://xml.apache.org">Apache Web Site</a> for details.

And more, how to translate the href and the 'Web Site' to the appropriate
language  inside a substitution param?


Any ideas are welcome!

Best regards,

Konstantin Piroumian
Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com









AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
>
> On Mon, 21 May 2001, Vadim Gritsenko wrote:
>
> > Carsten,
> >
> > I did try request attributes with <jsp:forward> - everything
> works fine for me;
> > I went through the weblogic.servlet.internal.ServletRequestImpl
> and RequestAttributes
> > (same package) - and, yes, there is check "instanceof
> Serializable", but no, all other
> > attributes are also alowed (just stored in another Map).
>
> I'm confused now. Is it possible for weblogic users to use
> request.setAttribute without the need to make the objects put there
> Serializable?
>
Yes, it is. But as our tests proved, there are problems if the
objects are not serializable. The test case for this is rather
complicated:
The servlet (cocoon) processes a request, we but some not Serializable
objects into the request attributes. Now the current thread starts
some (sub)threads and waits for them to finish.
And this is the cause for the problems. It seems (I am not an WLS expert),
that when the main threads starts sleeping the request object will be
serialized (don't ask me why). When the sub threads finish and the main
thread awakes the request object is deserialized. This serialization
is performed with all attributes of the request, regardless if they
are serializable or not (this is what the exception says).

So the usual test cases will work as the main thread never sleeps.

Carsten

> Giacomo
>
> >
> > PS My test is attached, run Test.jsp. If you can, please give
> me non-working test.
> >
> > Vadim
> >
> > > -----Original Message-----
> > > From: Carsten Ziegeler [mailto:cziegeler@sundn.de]
> > > Sent: Monday, May 21, 2001 1:41
> > > To: cocoon-dev@xml.apache.org
> > > Subject: AW: Restricting objectModel
> > >
> > >
> > > > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > > >
> > > > Carsten,
> > > >
> > > > Do you use WL6.0 or WL6.0sp1?
> > > >
> > > WL6.0sp1
> > >
> > > Carsten
> > >
> > > > Vadim
> > > >
> > > > > -----Original Message-----
> > > > > From: Matthew Langham [mailto:mlangham@sundn.de]
> > > > > Sent: Friday, May 18, 2001 9:44
> > > > > To: cocoon-dev@xml.apache.org
> > > > > Subject: AW: Restricting objectModel
> > > > >
> > > > >
> > > > > Vadim,
> > > > >
> > > > > >>
> > > > > And about request attributes - that may be done for
> automatic failover /
> > > > > load
> > > > > balancing - I'm not so sure why is this done this way...
> > > > > <<
> > > > > Carsten was only talking about the request attributes - not the
> > > > session. The
> > > > > serialization of request attributes seems to be a "feature" of
> > > > Bea WLS 6.0
> > > > > as we have not seen it on any other application server we
> have installed
> > > > > onto.
> > > > >
> > > > > Matthew
> > > > >
> > > > > --
> > > > > Open Source Group               sunShine - Lighting up e:Business
> > > > > =================================================================
> > > > > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > > > Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> > > > > =================================================================
> > > > >
> > > > >
> > > > > -----Ursprungliche Nachricht-----
> > > > > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > > > > Gesendet: Freitag, 18. Mai 2001 15:28
> > > > > An: cocoon-dev@xml.apache.org
> > > > > Betreff: RE: Restricting objectModel
> > > > >
> > > > >
> > > > > Carsten,
> > > > >
> > > > > </skip>
> > > > >
> > > > > > > > >
> > > > > > > > I forget some important point:
> > > > > > > > I know that the "correct" way of passing
> information should not be
> > > > > > > > the objectModel. You will tell me in your next email that
> > > > I could use
> > > > > > > > the session or the request object for this, right?
> > > > > > >
> > > > > > > Absolutely :)
> > > > > > >
> > > > > > > > The problem with this is that some servlet engines (like
> > > > BEA WLS 6.0)
> > > > > > > > requires that even the attributes of the request
> are serializable.
> > > > > > >
> > > > > > > Shit, is this a standard?
> > > > > >
> > > > > > Not sure about the standard, but BEA WLS 6.0 is known
> for exactly this
> > > > > > (there are discussions about this over on in the bea
> newsgroups.)
> > > > > > Our tests did prove this.
> > > > >
> > > > > You do not need to perform any tests to confirm this: If
> you think about
> > > > > running
> > > > > your application in clustered environment and remember that
> > > > serialization is
> > > > > the
> > > > > only way of replicating your session into backup server - than
> > > > it would be
> > > > > obvious
> > > > > to you why it's done this way :)
> > > > >
> > > > > And about request attributes - that may be done for
> automatic failover /
> > > > > load
> > > > > balancing - I'm not so sure why is this done this way...
> > > > >
> > > > > So, may be, you want your objects to be serializable to run
> > > > well in cluster.
> > > > >
> > > > > Regards,
> > > > > Vadim
> > > > >
> > > > >
> > > > > > >
> > > > > > > > And this prevents from putting anything into the
> request. Now we
> > > > > > > > could say: "Ok, that's a problem of the servlet engine
> > > > but not ours"
> > > > > > > > but this is of course no solution.
> > > > > > > > If there are really many votes with "+1" for
> changing to an avalon
> > > > > > > > context I would vote "+10000" for a container
> object which I can
> > > > > > > > get from the context to put any objects into for the
> > > > current request.
> > > > > > >
> > > > > > > Hmm..
> > > > > > >
> > > > > > >
> > > > > > > Can I read in between your lines that you already us
> it that way?
> > > > > >
> > > > > > Yes. And changing it would hit us hard.
> > > > > >
> > > > > >
> > > > > > Carsten
> > > > > >
> > > > > > Open Source Group                        sunShine - b:Integrated
> > > > > > ================================================================
> > > > > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > > > > www.sundn.de                          mailto: cziegeler@sundn.de
> > > > > > ================================================================
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


RE: Restricting objectModel

Posted by giacomo <gi...@apache.org>.

On Mon, 21 May 2001, Vadim Gritsenko wrote:

> Carsten,
>
> I did try request attributes with <jsp:forward> - everything works fine for me;
> I went through the weblogic.servlet.internal.ServletRequestImpl and RequestAttributes
> (same package) - and, yes, there is check "instanceof Serializable", but no, all other
> attributes are also alowed (just stored in another Map).

I'm confused now. Is it possible for weblogic users to use
request.setAttribute without the need to make the objects put there
Serializable?

Giacomo

>
> PS My test is attached, run Test.jsp. If you can, please give me non-working test.
>
> Vadim
>
> > -----Original Message-----
> > From: Carsten Ziegeler [mailto:cziegeler@sundn.de]
> > Sent: Monday, May 21, 2001 1:41
> > To: cocoon-dev@xml.apache.org
> > Subject: AW: Restricting objectModel
> >
> >
> > > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > >
> > > Carsten,
> > >
> > > Do you use WL6.0 or WL6.0sp1?
> > >
> > WL6.0sp1
> >
> > Carsten
> >
> > > Vadim
> > >
> > > > -----Original Message-----
> > > > From: Matthew Langham [mailto:mlangham@sundn.de]
> > > > Sent: Friday, May 18, 2001 9:44
> > > > To: cocoon-dev@xml.apache.org
> > > > Subject: AW: Restricting objectModel
> > > >
> > > >
> > > > Vadim,
> > > >
> > > > >>
> > > > And about request attributes - that may be done for automatic failover /
> > > > load
> > > > balancing - I'm not so sure why is this done this way...
> > > > <<
> > > > Carsten was only talking about the request attributes - not the
> > > session. The
> > > > serialization of request attributes seems to be a "feature" of
> > > Bea WLS 6.0
> > > > as we have not seen it on any other application server we have installed
> > > > onto.
> > > >
> > > > Matthew
> > > >
> > > > --
> > > > Open Source Group               sunShine - Lighting up e:Business
> > > > =================================================================
> > > > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > > Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> > > > =================================================================
> > > >
> > > >
> > > > -----Ursprungliche Nachricht-----
> > > > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > > > Gesendet: Freitag, 18. Mai 2001 15:28
> > > > An: cocoon-dev@xml.apache.org
> > > > Betreff: RE: Restricting objectModel
> > > >
> > > >
> > > > Carsten,
> > > >
> > > > </skip>
> > > >
> > > > > > > >
> > > > > > > I forget some important point:
> > > > > > > I know that the "correct" way of passing information should not be
> > > > > > > the objectModel. You will tell me in your next email that
> > > I could use
> > > > > > > the session or the request object for this, right?
> > > > > >
> > > > > > Absolutely :)
> > > > > >
> > > > > > > The problem with this is that some servlet engines (like
> > > BEA WLS 6.0)
> > > > > > > requires that even the attributes of the request are serializable.
> > > > > >
> > > > > > Shit, is this a standard?
> > > > >
> > > > > Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> > > > > (there are discussions about this over on in the bea newsgroups.)
> > > > > Our tests did prove this.
> > > >
> > > > You do not need to perform any tests to confirm this: If you think about
> > > > running
> > > > your application in clustered environment and remember that
> > > serialization is
> > > > the
> > > > only way of replicating your session into backup server - than
> > > it would be
> > > > obvious
> > > > to you why it's done this way :)
> > > >
> > > > And about request attributes - that may be done for automatic failover /
> > > > load
> > > > balancing - I'm not so sure why is this done this way...
> > > >
> > > > So, may be, you want your objects to be serializable to run
> > > well in cluster.
> > > >
> > > > Regards,
> > > > Vadim
> > > >
> > > >
> > > > > >
> > > > > > > And this prevents from putting anything into the request. Now we
> > > > > > > could say: "Ok, that's a problem of the servlet engine
> > > but not ours"
> > > > > > > but this is of course no solution.
> > > > > > > If there are really many votes with "+1" for changing to an avalon
> > > > > > > context I would vote "+10000" for a container object which I can
> > > > > > > get from the context to put any objects into for the
> > > current request.
> > > > > >
> > > > > > Hmm..
> > > > > >
> > > > > >
> > > > > > Can I read in between your lines that you already us it that way?
> > > > >
> > > > > Yes. And changing it would hit us hard.
> > > > >
> > > > >
> > > > > Carsten
> > > > >
> > > > > Open Source Group                        sunShine - b:Integrated
> > > > > ================================================================
> > > > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > > > www.sundn.de                          mailto: cziegeler@sundn.de
> > > > > ================================================================
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >


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


RE: Restricting objectModel

Posted by Vadim Gritsenko <vg...@hns.com>.
Carsten,

I did try request attributes with <jsp:forward> - everything works fine for me;
I went through the weblogic.servlet.internal.ServletRequestImpl and RequestAttributes
(same package) - and, yes, there is check "instanceof Serializable", but no, all other
attributes are also alowed (just stored in another Map).

PS My test is attached, run Test.jsp. If you can, please give me non-working test.

Vadim

> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@sundn.de]
> Sent: Monday, May 21, 2001 1:41
> To: cocoon-dev@xml.apache.org
> Subject: AW: Restricting objectModel
> 
> 
> > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> >
> > Carsten,
> >
> > Do you use WL6.0 or WL6.0sp1?
> >
> WL6.0sp1
> 
> Carsten
> 
> > Vadim
> >
> > > -----Original Message-----
> > > From: Matthew Langham [mailto:mlangham@sundn.de]
> > > Sent: Friday, May 18, 2001 9:44
> > > To: cocoon-dev@xml.apache.org
> > > Subject: AW: Restricting objectModel
> > >
> > >
> > > Vadim,
> > >
> > > >>
> > > And about request attributes - that may be done for automatic failover /
> > > load
> > > balancing - I'm not so sure why is this done this way...
> > > <<
> > > Carsten was only talking about the request attributes - not the
> > session. The
> > > serialization of request attributes seems to be a "feature" of
> > Bea WLS 6.0
> > > as we have not seen it on any other application server we have installed
> > > onto.
> > >
> > > Matthew
> > >
> > > --
> > > Open Source Group               sunShine - Lighting up e:Business
> > > =================================================================
> > > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> > > =================================================================
> > >
> > >
> > > -----Ursprungliche Nachricht-----
> > > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > > Gesendet: Freitag, 18. Mai 2001 15:28
> > > An: cocoon-dev@xml.apache.org
> > > Betreff: RE: Restricting objectModel
> > >
> > >
> > > Carsten,
> > >
> > > </skip>
> > >
> > > > > > >
> > > > > > I forget some important point:
> > > > > > I know that the "correct" way of passing information should not be
> > > > > > the objectModel. You will tell me in your next email that
> > I could use
> > > > > > the session or the request object for this, right?
> > > > >
> > > > > Absolutely :)
> > > > >
> > > > > > The problem with this is that some servlet engines (like
> > BEA WLS 6.0)
> > > > > > requires that even the attributes of the request are serializable.
> > > > >
> > > > > Shit, is this a standard?
> > > >
> > > > Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> > > > (there are discussions about this over on in the bea newsgroups.)
> > > > Our tests did prove this.
> > >
> > > You do not need to perform any tests to confirm this: If you think about
> > > running
> > > your application in clustered environment and remember that
> > serialization is
> > > the
> > > only way of replicating your session into backup server - than
> > it would be
> > > obvious
> > > to you why it's done this way :)
> > >
> > > And about request attributes - that may be done for automatic failover /
> > > load
> > > balancing - I'm not so sure why is this done this way...
> > >
> > > So, may be, you want your objects to be serializable to run
> > well in cluster.
> > >
> > > Regards,
> > > Vadim
> > >
> > >
> > > > >
> > > > > > And this prevents from putting anything into the request. Now we
> > > > > > could say: "Ok, that's a problem of the servlet engine
> > but not ours"
> > > > > > but this is of course no solution.
> > > > > > If there are really many votes with "+1" for changing to an avalon
> > > > > > context I would vote "+10000" for a container object which I can
> > > > > > get from the context to put any objects into for the
> > current request.
> > > > >
> > > > > Hmm..
> > > > >
> > > > >
> > > > > Can I read in between your lines that you already us it that way?
> > > >
> > > > Yes. And changing it would hit us hard.
> > > >
> > > >
> > > > Carsten
> > > >
> > > > Open Source Group                        sunShine - b:Integrated
> > > > ================================================================
> > > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > > www.sundn.de                          mailto: cziegeler@sundn.de
> > > > ================================================================
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
>
> Carsten,
>
> Do you use WL6.0 or WL6.0sp1?
>
WL6.0sp1

Carsten

> Vadim
>
> > -----Original Message-----
> > From: Matthew Langham [mailto:mlangham@sundn.de]
> > Sent: Friday, May 18, 2001 9:44
> > To: cocoon-dev@xml.apache.org
> > Subject: AW: Restricting objectModel
> >
> >
> > Vadim,
> >
> > >>
> > And about request attributes - that may be done for automatic failover /
> > load
> > balancing - I'm not so sure why is this done this way...
> > <<
> > Carsten was only talking about the request attributes - not the
> session. The
> > serialization of request attributes seems to be a "feature" of
> Bea WLS 6.0
> > as we have not seen it on any other application server we have installed
> > onto.
> >
> > Matthew
> >
> > --
> > Open Source Group               sunShine - Lighting up e:Business
> > =================================================================
> > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> > =================================================================
> >
> >
> > -----Ursprungliche Nachricht-----
> > Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> > Gesendet: Freitag, 18. Mai 2001 15:28
> > An: cocoon-dev@xml.apache.org
> > Betreff: RE: Restricting objectModel
> >
> >
> > Carsten,
> >
> > </skip>
> >
> > > > > >
> > > > > I forget some important point:
> > > > > I know that the "correct" way of passing information should not be
> > > > > the objectModel. You will tell me in your next email that
> I could use
> > > > > the session or the request object for this, right?
> > > >
> > > > Absolutely :)
> > > >
> > > > > The problem with this is that some servlet engines (like
> BEA WLS 6.0)
> > > > > requires that even the attributes of the request are serializable.
> > > >
> > > > Shit, is this a standard?
> > >
> > > Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> > > (there are discussions about this over on in the bea newsgroups.)
> > > Our tests did prove this.
> >
> > You do not need to perform any tests to confirm this: If you think about
> > running
> > your application in clustered environment and remember that
> serialization is
> > the
> > only way of replicating your session into backup server - than
> it would be
> > obvious
> > to you why it's done this way :)
> >
> > And about request attributes - that may be done for automatic failover /
> > load
> > balancing - I'm not so sure why is this done this way...
> >
> > So, may be, you want your objects to be serializable to run
> well in cluster.
> >
> > Regards,
> > Vadim
> >
> >
> > > >
> > > > > And this prevents from putting anything into the request. Now we
> > > > > could say: "Ok, that's a problem of the servlet engine
> but not ours"
> > > > > but this is of course no solution.
> > > > > If there are really many votes with "+1" for changing to an avalon
> > > > > context I would vote "+10000" for a container object which I can
> > > > > get from the context to put any objects into for the
> current request.
> > > >
> > > > Hmm..
> > > >
> > > >
> > > > Can I read in between your lines that you already us it that way?
> > >
> > > Yes. And changing it would hit us hard.
> > >
> > >
> > > Carsten
> > >
> > > Open Source Group                        sunShine - b:Integrated
> > > ================================================================
> > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > > www.sundn.de                          mailto: cziegeler@sundn.de
> > > ================================================================
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


RE: Restricting objectModel

Posted by Vadim Gritsenko <vg...@hns.com>.
Carsten,

Do you use WL6.0 or WL6.0sp1?

Vadim

> -----Original Message-----
> From: Matthew Langham [mailto:mlangham@sundn.de]
> Sent: Friday, May 18, 2001 9:44
> To: cocoon-dev@xml.apache.org
> Subject: AW: Restricting objectModel
> 
> 
> Vadim,
> 
> >>
> And about request attributes - that may be done for automatic failover /
> load
> balancing - I'm not so sure why is this done this way...
> <<
> Carsten was only talking about the request attributes - not the session. The
> serialization of request attributes seems to be a "feature" of Bea WLS 6.0
> as we have not seen it on any other application server we have installed
> onto.
> 
> Matthew
> 
> --
> Open Source Group               sunShine - Lighting up e:Business
> =================================================================
> Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
> =================================================================
> 
> 
> -----Ursprungliche Nachricht-----
> Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> Gesendet: Freitag, 18. Mai 2001 15:28
> An: cocoon-dev@xml.apache.org
> Betreff: RE: Restricting objectModel
> 
> 
> Carsten,
> 
> </skip>
> 
> > > > >
> > > > I forget some important point:
> > > > I know that the "correct" way of passing information should not be
> > > > the objectModel. You will tell me in your next email that I could use
> > > > the session or the request object for this, right?
> > >
> > > Absolutely :)
> > >
> > > > The problem with this is that some servlet engines (like BEA WLS 6.0)
> > > > requires that even the attributes of the request are serializable.
> > >
> > > Shit, is this a standard?
> >
> > Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> > (there are discussions about this over on in the bea newsgroups.)
> > Our tests did prove this.
> 
> You do not need to perform any tests to confirm this: If you think about
> running
> your application in clustered environment and remember that serialization is
> the
> only way of replicating your session into backup server - than it would be
> obvious
> to you why it's done this way :)
> 
> And about request attributes - that may be done for automatic failover /
> load
> balancing - I'm not so sure why is this done this way...
> 
> So, may be, you want your objects to be serializable to run well in cluster.
> 
> Regards,
> Vadim
> 
> 
> > >
> > > > And this prevents from putting anything into the request. Now we
> > > > could say: "Ok, that's a problem of the servlet engine but not ours"
> > > > but this is of course no solution.
> > > > If there are really many votes with "+1" for changing to an avalon
> > > > context I would vote "+10000" for a container object which I can
> > > > get from the context to put any objects into for the current request.
> > >
> > > Hmm..
> > >
> > >
> > > Can I read in between your lines that you already us it that way?
> >
> > Yes. And changing it would hit us hard.
> >
> >
> > Carsten
> >
> > Open Source Group                        sunShine - b:Integrated
> > ================================================================
> > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > www.sundn.de                          mailto: cziegeler@sundn.de
> > ================================================================
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

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


AW: Restricting objectModel

Posted by Matthew Langham <ml...@sundn.de>.
Vadim,

>>
And about request attributes - that may be done for automatic failover /
load
balancing - I'm not so sure why is this done this way...
<<
Carsten was only talking about the request attributes - not the session. The
serialization of request attributes seems to be a "feature" of Bea WLS 6.0
as we have not seen it on any other application server we have installed
onto.

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel: +49-5251-1581-30   [mlangham@sundn.de - http://www.sundn.de]
=================================================================


-----Ursprungliche Nachricht-----
Von: Vadim Gritsenko [mailto:vgritsenko@hns.com]
Gesendet: Freitag, 18. Mai 2001 15:28
An: cocoon-dev@xml.apache.org
Betreff: RE: Restricting objectModel


Carsten,

</skip>

> > > >
> > > I forget some important point:
> > > I know that the "correct" way of passing information should not be
> > > the objectModel. You will tell me in your next email that I could use
> > > the session or the request object for this, right?
> >
> > Absolutely :)
> >
> > > The problem with this is that some servlet engines (like BEA WLS 6.0)
> > > requires that even the attributes of the request are serializable.
> >
> > Shit, is this a standard?
>
> Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> (there are discussions about this over on in the bea newsgroups.)
> Our tests did prove this.

You do not need to perform any tests to confirm this: If you think about
running
your application in clustered environment and remember that serialization is
the
only way of replicating your session into backup server - than it would be
obvious
to you why it's done this way :)

And about request attributes - that may be done for automatic failover /
load
balancing - I'm not so sure why is this done this way...

So, may be, you want your objects to be serializable to run well in cluster.

Regards,
Vadim


> >
> > > And this prevents from putting anything into the request. Now we
> > > could say: "Ok, that's a problem of the servlet engine but not ours"
> > > but this is of course no solution.
> > > If there are really many votes with "+1" for changing to an avalon
> > > context I would vote "+10000" for a container object which I can
> > > get from the context to put any objects into for the current request.
> >
> > Hmm..
> >
> >
> > Can I read in between your lines that you already us it that way?
>
> Yes. And changing it would hit us hard.
>
>
> Carsten
>
> Open Source Group                        sunShine - b:Integrated
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.sundn.de                          mailto: cziegeler@sundn.de
> ================================================================


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


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


AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Vadim Gritsenko wrote:
>
> Carsten,
>
> </skip>
>
> > > > >
> > > > I forget some important point:
> > > > I know that the "correct" way of passing information should not be
> > > > the objectModel. You will tell me in your next email that I
> could use
> > > > the session or the request object for this, right?
> > >
> > > Absolutely :)
> > >
> > > > The problem with this is that some servlet engines (like
> BEA WLS 6.0)
> > > > requires that even the attributes of the request are serializable.
> > >
> > > Shit, is this a standard?
> >
> > Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> > (there are discussions about this over on in the bea newsgroups.)
> > Our tests did prove this.
>
> You do not need to perform any tests to confirm this: If you
> think about running
> your application in clustered environment and remember that
> serialization is the
> only way of replicating your session into backup server - than it
> would be obvious
> to you why it's done this way :)
>
This is really no new information. I didn't speak about the session.
The object in question is the request. And personally I see not really
a sense in making a request serializable even not for failover.
How would that work?

> And about request attributes - that may be done for automatic
> failover / load
> balancing - I'm not so sure why is this done this way...
>
> So, may be, you want your objects to be serializable to run well
> in cluster.
>
Yes, try to make everything serializable is not always possible.
Just remember that the request object knows the environment which
might now the avalon ComponentManager which knows all configured
avalon components and so on. You really can't assure that all is
serializable.


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================
>
> > >
> > > > And this prevents from putting anything into the request. Now we
> > > > could say: "Ok, that's a problem of the servlet engine but not ours"
> > > > but this is of course no solution.
> > > > If there are really many votes with "+1" for changing to an avalon
> > > > context I would vote "+10000" for a container object which I can
> > > > get from the context to put any objects into for the
> current request.
> > >
> > > Hmm..
> > >
> > >
> > > Can I read in between your lines that you already us it that way?
> >
> > Yes. And changing it would hit us hard.
> >
> >
> > Carsten
> >
> > Open Source Group                        sunShine - b:Integrated
> > ================================================================
> > Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > www.sundn.de                          mailto: cziegeler@sundn.de
> > ================================================================
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


RE: Restricting objectModel

Posted by Vadim Gritsenko <vg...@hns.com>.
Carsten,

</skip>

> > > >
> > > I forget some important point:
> > > I know that the "correct" way of passing information should not be
> > > the objectModel. You will tell me in your next email that I could use
> > > the session or the request object for this, right?
> >
> > Absolutely :)
> >
> > > The problem with this is that some servlet engines (like BEA WLS 6.0)
> > > requires that even the attributes of the request are serializable.
> >
> > Shit, is this a standard?
> 
> Not sure about the standard, but BEA WLS 6.0 is known for exactly this
> (there are discussions about this over on in the bea newsgroups.)
> Our tests did prove this.

You do not need to perform any tests to confirm this: If you think about running
your application in clustered environment and remember that serialization is the
only way of replicating your session into backup server - than it would be obvious
to you why it's done this way :)

And about request attributes - that may be done for automatic failover / load
balancing - I'm not so sure why is this done this way...

So, may be, you want your objects to be serializable to run well in cluster.

Regards,
Vadim


> >
> > > And this prevents from putting anything into the request. Now we
> > > could say: "Ok, that's a problem of the servlet engine but not ours"
> > > but this is of course no solution.
> > > If there are really many votes with "+1" for changing to an avalon
> > > context I would vote "+10000" for a container object which I can
> > > get from the context to put any objects into for the current request.
> >
> > Hmm..
> >
> >
> > Can I read in between your lines that you already us it that way?
> 
> Yes. And changing it would hit us hard.
> 
> 
> Carsten
> 
> Open Source Group                        sunShine - b:Integrated
> ================================================================
> Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> www.sundn.de                          mailto: cziegeler@sundn.de
> ================================================================


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


AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
>
> On Fri, 18 May 2001, Carsten Ziegeler wrote:
>
> > > Carsten Ziegeler wrote:
> > > > Giacomo Pati wrote:
> > > >
> > > > Dead developpers
> > > >
> > > > A recent question on the user list "how can I put my own
> stuff into the
> > > > objectModel" forced me to rethink about the the concept of the
> > > > objectModel.
> > > >
> > > > Let me resume: The Cocoon core engine doesn't really care about the
> > > > environment it runs in. Thus we introduced the notion of an abstract
> > > > Environment with the absolute minimum of functionality needed
> > > > exclusively by the Cocoon engine to be able to work. To
> have a contract
> > > > between a concrete Environment and the sitemap components,
> which are BTW
> > > > the only component which need to know about the conrete
> Environment they
> > > > run in, we introduced the objectModel as a container for important
> > > > environmental objects. The concrete servlet Environment implemented
> > > > today uses the objectModel to put in the Request, Response
> and Context
> > > > objects of the servlet environment. This enables the Cocoon
> engine to
> > > > operate in almost any environment (ie. Apache James [SMTP] or an EJB
> > > > container) by simply creating an concrete Environment class.
> > > >
> > > > Now, I'd like to change the type of the objectModel from a Map to an
> > > > Avalon Context. This will downgrade it to an read-only
> object preventing
> > > > users from putting their own stuff in it.
> > > >
> > > > If nobody gives me a reasonable -1 I'd volunteer to change
> it the way
> > > > I've proposed.
> > > >
> > > So here it is:
> > > -1
> > >
> > > The objectModel is the central object which is passed to nearly all
> > > components (except serializers). Besides the sax events it is the
> > > only possibility to pass any information from one component
> to another.
> > > For example an action can enhance the objectModel by putting important
> > > information in it which is retrieved by some other components (perhaps
> > > again an action).
> > > If we would use an avalon context there is no possibility to share
> > > information between those components.
> > >
> > >
> > I forget some important point:
> > I know that the "correct" way of passing information should not be
> > the objectModel. You will tell me in your next email that I could use
> > the session or the request object for this, right?
>
> Absolutely :)
>
> > The problem with this is that some servlet engines (like BEA WLS 6.0)
> > requires that even the attributes of the request are serializable.
>
> Shit, is this a standard?

Not sure about the standard, but BEA WLS 6.0 is known for exactly this
(there are discussions about this over on in the bea newsgroups.)
Our tests did prove this.

>
> > And this prevents from putting anything into the request. Now we
> > could say: "Ok, that's a problem of the servlet engine but not ours"
> > but this is of course no solution.
> > If there are really many votes with "+1" for changing to an avalon
> > context I would vote "+10000" for a container object which I can
> > get from the context to put any objects into for the current request.
>
> Hmm..
>
>
> Can I read in between your lines that you already us it that way?

Yes. And changing it would hit us hard.


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================


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


Re: AW: Restricting objectModel

Posted by giacomo <gi...@apache.org>.

On Fri, 18 May 2001, Carsten Ziegeler wrote:

> > Carsten Ziegeler wrote:
> > > Giacomo Pati wrote:
> > >
> > > Dead developpers
> > >
> > > A recent question on the user list "how can I put my own stuff into the
> > > objectModel" forced me to rethink about the the concept of the
> > > objectModel.
> > >
> > > Let me resume: The Cocoon core engine doesn't really care about the
> > > environment it runs in. Thus we introduced the notion of an abstract
> > > Environment with the absolute minimum of functionality needed
> > > exclusively by the Cocoon engine to be able to work. To have a contract
> > > between a concrete Environment and the sitemap components, which are BTW
> > > the only component which need to know about the conrete Environment they
> > > run in, we introduced the objectModel as a container for important
> > > environmental objects. The concrete servlet Environment implemented
> > > today uses the objectModel to put in the Request, Response and Context
> > > objects of the servlet environment. This enables the Cocoon engine to
> > > operate in almost any environment (ie. Apache James [SMTP] or an EJB
> > > container) by simply creating an concrete Environment class.
> > >
> > > Now, I'd like to change the type of the objectModel from a Map to an
> > > Avalon Context. This will downgrade it to an read-only object preventing
> > > users from putting their own stuff in it.
> > >
> > > If nobody gives me a reasonable -1 I'd volunteer to change it the way
> > > I've proposed.
> > >
> > So here it is:
> > -1
> >
> > The objectModel is the central object which is passed to nearly all
> > components (except serializers). Besides the sax events it is the
> > only possibility to pass any information from one component to another.
> > For example an action can enhance the objectModel by putting important
> > information in it which is retrieved by some other components (perhaps
> > again an action).
> > If we would use an avalon context there is no possibility to share
> > information between those components.
> >
> >
> I forget some important point:
> I know that the "correct" way of passing information should not be
> the objectModel. You will tell me in your next email that I could use
> the session or the request object for this, right?

Absolutely :)

> The problem with this is that some servlet engines (like BEA WLS 6.0)
> requires that even the attributes of the request are serializable.

Shit, is this a standard?

> And this prevents from putting anything into the request. Now we
> could say: "Ok, that's a problem of the servlet engine but not ours"
> but this is of course no solution.
> If there are really many votes with "+1" for changing to an avalon
> context I would vote "+10000" for a container object which I can
> get from the context to put any objects into for the current request.

Hmm..

Giacomo


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


AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Carsten Ziegeler wrote:
> > Giacomo Pati wrote:
> >
> > Dead developpers
> >
> > A recent question on the user list "how can I put my own stuff into the
> > objectModel" forced me to rethink about the the concept of the
> > objectModel.
> >
> > Let me resume: The Cocoon core engine doesn't really care about the
> > environment it runs in. Thus we introduced the notion of an abstract
> > Environment with the absolute minimum of functionality needed
> > exclusively by the Cocoon engine to be able to work. To have a contract
> > between a concrete Environment and the sitemap components, which are BTW
> > the only component which need to know about the conrete Environment they
> > run in, we introduced the objectModel as a container for important
> > environmental objects. The concrete servlet Environment implemented
> > today uses the objectModel to put in the Request, Response and Context
> > objects of the servlet environment. This enables the Cocoon engine to
> > operate in almost any environment (ie. Apache James [SMTP] or an EJB
> > container) by simply creating an concrete Environment class.
> >
> > Now, I'd like to change the type of the objectModel from a Map to an
> > Avalon Context. This will downgrade it to an read-only object preventing
> > users from putting their own stuff in it.
> >
> > If nobody gives me a reasonable -1 I'd volunteer to change it the way
> > I've proposed.
> >
> So here it is:
> -1
>
> The objectModel is the central object which is passed to nearly all
> components (except serializers). Besides the sax events it is the
> only possibility to pass any information from one component to another.
> For example an action can enhance the objectModel by putting important
> information in it which is retrieved by some other components (perhaps
> again an action).
> If we would use an avalon context there is no possibility to share
> information between those components.
>
>
I forget some important point:
I know that the "correct" way of passing information should not be
the objectModel. You will tell me in your next email that I could use
the session or the request object for this, right?
The problem with this is that some servlet engines (like BEA WLS 6.0)
requires that even the attributes of the request are serializable.
And this prevents from putting anything into the request. Now we
could say: "Ok, that's a problem of the servlet engine but not ours"
but this is of course no solution.
If there are really many votes with "+1" for changing to an avalon
context I would vote "+10000" for a container object which I can
get from the context to put any objects into for the current request.


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================


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


Re: AW: Restricting objectModel

Posted by giacomo <gi...@apache.org>.

On Fri, 18 May 2001, Carsten Ziegeler wrote:

> > Giacomo Pati wrote:
> >
> > Dead developpers
> >
> > A recent question on the user list "how can I put my own stuff into the
> > objectModel" forced me to rethink about the the concept of the
> > objectModel.
> >
> > Let me resume: The Cocoon core engine doesn't really care about the
> > environment it runs in. Thus we introduced the notion of an abstract
> > Environment with the absolute minimum of functionality needed
> > exclusively by the Cocoon engine to be able to work. To have a contract
> > between a concrete Environment and the sitemap components, which are BTW
> > the only component which need to know about the conrete Environment they
> > run in, we introduced the objectModel as a container for important
> > environmental objects. The concrete servlet Environment implemented
> > today uses the objectModel to put in the Request, Response and Context
> > objects of the servlet environment. This enables the Cocoon engine to
> > operate in almost any environment (ie. Apache James [SMTP] or an EJB
> > container) by simply creating an concrete Environment class.
> >
> > Now, I'd like to change the type of the objectModel from a Map to an
> > Avalon Context. This will downgrade it to an read-only object preventing
> > users from putting their own stuff in it.
> >
> > If nobody gives me a reasonable -1 I'd volunteer to change it the way
> > I've proposed.
> >
> So here it is:
> -1
>
> The objectModel is the central object which is passed to nearly all
> components (except serializers). Besides the sax events it is the
> only possibility to pass any information from one component to another.
> For example an action can enhance the objectModel by putting important
> information in it which is retrieved by some other components (perhaps
> again an action).
> If we would use an avalon context there is no possibility to share
> information between those components.

Don't you think that attributes of the session and request objects are
more suitable for your approach (aren't they made for that purpose)?
They are also passed to all components so your argument is not really
convincing me. The objectModel was never meant to be a placeholder for
application specific objects.

Can I read in between your lines that you already us it that way?

Giacomo


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


AW: Restricting objectModel

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
> 
> Dead developpers
> 
> A recent question on the user list "how can I put my own stuff into the
> objectModel" forced me to rethink about the the concept of the
> objectModel.
> 
> Let me resume: The Cocoon core engine doesn't really care about the
> environment it runs in. Thus we introduced the notion of an abstract
> Environment with the absolute minimum of functionality needed
> exclusively by the Cocoon engine to be able to work. To have a contract
> between a concrete Environment and the sitemap components, which are BTW
> the only component which need to know about the conrete Environment they
> run in, we introduced the objectModel as a container for important
> environmental objects. The concrete servlet Environment implemented
> today uses the objectModel to put in the Request, Response and Context
> objects of the servlet environment. This enables the Cocoon engine to
> operate in almost any environment (ie. Apache James [SMTP] or an EJB
> container) by simply creating an concrete Environment class.
> 
> Now, I'd like to change the type of the objectModel from a Map to an
> Avalon Context. This will downgrade it to an read-only object preventing
> users from putting their own stuff in it.
> 
> If nobody gives me a reasonable -1 I'd volunteer to change it the way
> I've proposed.
> 
So here it is:
-1

The objectModel is the central object which is passed to nearly all 
components (except serializers). Besides the sax events it is the
only possibility to pass any information from one component to another.
For example an action can enhance the objectModel by putting important
information in it which is retrieved by some other components (perhaps
again an action).
If we would use an avalon context there is no possibility to share
information between those components.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================



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