You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "hv @ Fashion Content" <in...@fashioncontent.com> on 2005/11/14 21:32:10 UTC
Create ASO per request from Request Attributes
In my tapestry 3 application I have a servlet filter and an engine service
that are attach three objects to the request as Servlet Request attributes.
As I understand it I could have an ASO on which I set these three as
properties, but I would need a scope of only the request.
How would I do this. Just create the ASO with some special scope define. Or
also create a service for retrieving the ASO ?
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Create ASO per request from Request Attributes
Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
Good one for reminding me to check <load-on-startup>1</load-on-startup> :-)
The other part involves parsing the context attributes to find all instances
of tapestry application servlets. Hardcoding the servlet name isn't really
something I want to do.
"Ron Piterman" <rp...@gmx.net> skrev i en meddelelse
news:dlbd1i$279$1@sea.gmane.org...
> The registry is initialized on the servlet's init() -
> I don't remember the details but you can set a servlet to initialize on
> context start - that way the registry will be there before the first
> request is handled...
>
>
>
> ����� hv @ Fashion Content:
>> I think that is the approach I will go for but I need to get around a
>> serious stumbling block.
>>
>> Hivemind Registry is set up in ApplicationServlet.....
>>
>> So if I try to access it in a servlet filter, it may not be created yet.
>>
>> Henrik
>>
>> "Ron Piterman" <rp...@gmx.net> skrev i en meddelelse
>> news:dlb30a$5k6$1@sea.gmane.org...
>>
>>>What about creating a hivemind service with the threaded model, which
>>>will hold your thread-state-values?
>>>
>>>����� hv @ Fashion Content:
>>>
>>>>Or perhaps I can somehow extend Infrastructure to hold these attributes
>>>>as well for the duration of the request.
>>>>
>>>>"hv @ Fashion Content" <in...@fashioncontent.com> skrev i en meddelelse
>>>>news:dlas87$f6c$1@sea.gmane.org...
>>>>
>>>>
>>>>>In my tapestry 3 application I have a servlet filter and an engine
>>>>>service that are attach three objects to the request as Servlet Request
>>>>>attributes. As I understand it I could have an ASO on which I set these
>>>>>three as properties, but I would need a scope of only the request.
>>>>>
>>>>>How would I do this. Just create the ASO with some special scope
>>>>>define. Or also create a service for retrieving the ASO ?
>>>>>
>>>>>Henrik
>>>>>
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Create ASO per request from Request Attributes
Posted by Ron Piterman <rp...@gmx.net>.
The registry is initialized on the servlet's init() -
I don't remember the details but you can set a servlet to initialize on
context start - that way the registry will be there before the first
request is handled...
����� hv @ Fashion Content:
> I think that is the approach I will go for but I need to get around a
> serious stumbling block.
>
> Hivemind Registry is set up in ApplicationServlet.....
>
> So if I try to access it in a servlet filter, it may not be created yet.
>
> Henrik
>
> "Ron Piterman" <rp...@gmx.net> skrev i en meddelelse
> news:dlb30a$5k6$1@sea.gmane.org...
>
>>What about creating a hivemind service with the threaded model, which will
>>hold your thread-state-values?
>>
>>����� hv @ Fashion Content:
>>
>>>Or perhaps I can somehow extend Infrastructure to hold these attributes
>>>as well for the duration of the request.
>>>
>>>"hv @ Fashion Content" <in...@fashioncontent.com> skrev i en meddelelse
>>>news:dlas87$f6c$1@sea.gmane.org...
>>>
>>>
>>>>In my tapestry 3 application I have a servlet filter and an engine
>>>>service that are attach three objects to the request as Servlet Request
>>>>attributes. As I understand it I could have an ASO on which I set these
>>>>three as properties, but I would need a scope of only the request.
>>>>
>>>>How would I do this. Just create the ASO with some special scope define.
>>>>Or also create a service for retrieving the ASO ?
>>>>
>>>>Henrik
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Create ASO per request from Request Attributes
Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
I think that is the approach I will go for but I need to get around a
serious stumbling block.
Hivemind Registry is set up in ApplicationServlet.....
So if I try to access it in a servlet filter, it may not be created yet.
Henrik
"Ron Piterman" <rp...@gmx.net> skrev i en meddelelse
news:dlb30a$5k6$1@sea.gmane.org...
> What about creating a hivemind service with the threaded model, which will
> hold your thread-state-values?
>
> ����� hv @ Fashion Content:
>> Or perhaps I can somehow extend Infrastructure to hold these attributes
>> as well for the duration of the request.
>>
>> "hv @ Fashion Content" <in...@fashioncontent.com> skrev i en meddelelse
>> news:dlas87$f6c$1@sea.gmane.org...
>>
>>>In my tapestry 3 application I have a servlet filter and an engine
>>>service that are attach three objects to the request as Servlet Request
>>>attributes. As I understand it I could have an ASO on which I set these
>>>three as properties, but I would need a scope of only the request.
>>>
>>>How would I do this. Just create the ASO with some special scope define.
>>>Or also create a service for retrieving the ASO ?
>>>
>>>Henrik
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Create ASO per request from Request Attributes
Posted by Ron Piterman <rp...@gmx.net>.
What about creating a hivemind service with the threaded model, which
will hold your thread-state-values?
����� hv @ Fashion Content:
> Or perhaps I can somehow extend Infrastructure to hold these attributes as
> well for the duration of the request.
>
> "hv @ Fashion Content" <in...@fashioncontent.com> skrev i en meddelelse
> news:dlas87$f6c$1@sea.gmane.org...
>
>>In my tapestry 3 application I have a servlet filter and an engine service
>>that are attach three objects to the request as Servlet Request
>>attributes. As I understand it I could have an ASO on which I set these
>>three as properties, but I would need a scope of only the request.
>>
>>How would I do this. Just create the ASO with some special scope define.
>>Or also create a service for retrieving the ASO ?
>>
>>Henrik
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Create ASO per request from Request Attributes
Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
Or perhaps I can somehow extend Infrastructure to hold these attributes as
well for the duration of the request.
"hv @ Fashion Content" <in...@fashioncontent.com> skrev i en meddelelse
news:dlas87$f6c$1@sea.gmane.org...
> In my tapestry 3 application I have a servlet filter and an engine service
> that are attach three objects to the request as Servlet Request
> attributes. As I understand it I could have an ASO on which I set these
> three as properties, but I would need a scope of only the request.
>
> How would I do this. Just create the ASO with some special scope define.
> Or also create a service for retrieving the ASO ?
>
> Henrik
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Create ASO per request from Request Attributes
Posted by Patrick Casey <pa...@adelphia.net>.
Couldn't you just set three threadlocals in your filter and then
access them through your ASO? That way you'd short-circuit the problem of
having to pass them around.
--- Pat
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of hv @ Fashion Content
> Sent: Monday, November 14, 2005 12:32 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Create ASO per request from Request Attributes
>
> In my tapestry 3 application I have a servlet filter and an engine service
> that are attach three objects to the request as Servlet Request
> attributes.
> As I understand it I could have an ASO on which I set these three as
> properties, but I would need a scope of only the request.
>
> How would I do this. Just create the ASO with some special scope define.
> Or
> also create a service for retrieving the ASO ?
>
> Henrik
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org