You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2007/11/29 15:37:08 UTC
Re: svn commit: r599443 - in /incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling: scripting/ servlet/ slingservlets/
On Nov 29, 2007 3:10 PM, Felix Meschberger <Fe...@day.com> wrote:
> ...While it is probably useful in certain situations to have the session
> available, I am not so sure, whether this should be documented and
> become part of the API or whether we should just have it. ...
For microsling the JCR Session is required in several places, and
before this change it was acquired in an ugly way.
If it is needed in Sling as well, we could either add a
getJcrSession() method to SlingHttpServletRequest, or at least make
the attribute name a constant to expose its use.
>.... OTOH I am not
> a fan of these hidden features, you know are there, but seem to be part
> of an expected behaviour....
Agreed, so documenting the possible Request attributes might be the
best way to solve this.
-Bertrand
Re: svn commit: r599443 - in
/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling:
scripting/ servlet/ slingservlets/
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Am Donnerstag, den 29.11.2007, 22:22 +0100 schrieb Bertrand Delacretaz:
> On Nov 29, 2007 8:31 PM, Felix Meschberger <fm...@gmail.com> wrote:
>
> > > ...we could either add a
> > > getJcrSession() method to SlingHttpServletRequest, or at least make
> > > the attribute name a constant to expose its use....
> >
>
> > ...would define a attribute name as a constant in Sling and microsling and
> > document as part of the implementation documentation....
>
> Sounds good to me, especially using the Session class name as the
> attribute name.
Ok. I will use the Session class name, too.
Regards
Felix
Re: svn commit: r599443 - in /incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling: scripting/ servlet/ slingservlets/
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Nov 29, 2007 8:31 PM, Felix Meschberger <fm...@gmail.com> wrote:
> > ...we could either add a
> > getJcrSession() method to SlingHttpServletRequest, or at least make
> > the attribute name a constant to expose its use....
>
> ...would define a attribute name as a constant in Sling and microsling and
> document as part of the implementation documentation....
Sounds good to me, especially using the Session class name as the
attribute name.
-Bertrand
Re: svn commit: r599443 - in
/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling:
scripting/ servlet/ slingservlets/
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Am Donnerstag, den 29.11.2007, 15:37 +0100 schrieb Bertrand Delacretaz:
> On Nov 29, 2007 3:10 PM, Felix Meschberger <Fe...@day.com> wrote:
>
> > ...While it is probably useful in certain situations to have the session
> > available, I am not so sure, whether this should be documented and
> > become part of the API or whether we should just have it. ...
>
> For microsling the JCR Session is required in several places, and
> before this change it was acquired in an ugly way.
We will definitely have the same issue in Sling as soon as we merge the
super-duper default servlet from microsling into Sling.
> If it is needed in Sling as well, we could either add a
> getJcrSession() method to SlingHttpServletRequest, or at least make
> the attribute name a constant to expose its use.
I am somewhat reluctant to creating such a method in the API because
IMHO the main entry point to Resources is the ResourceResolver. Rather I
would define a attribute name as a constant in Sling and microsling and
document as part of the implementation documentation. The attribute
should not be part of the Sling API itself.
Regards
Felix