cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: AW: Restricting objectModel
Date Fri, 18 May 2001 09:59:55 GMT


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


Mime
View raw message