You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ashoka Upadhya <AU...@art.com> on 2012/04/12 19:31:27 UTC

Markup parsing and caching

In our case Markup for the component comes from CMS. We want to parse
the markup and cache Markup object in memory.

Parsing happens asynchronously (depending on the content change in CMS)
in a separate thread from the request thread.

 

We have custom MarkupParser that extends AbstractMarkupParser but
AbstractMarkupParser has dependency on Application (In the constructor
it is getting MarkupSettings from application).  

 

Since we are doing parsing in a different thread which doesn't have
application set in the thread context., Is there any other way to parse
without setting dummy application object in the thread context?

 

Regards, 

 

Ashoka Upadhya 

Art.com


Re: Markup parsing and caching

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can create the parser before creating the thread and pass it as
parameter to the thread.

On Thu, Apr 12, 2012 at 8:31 PM, Ashoka Upadhya <AU...@art.com> wrote:
> In our case Markup for the component comes from CMS. We want to parse
> the markup and cache Markup object in memory.
>
> Parsing happens asynchronously (depending on the content change in CMS)
> in a separate thread from the request thread.
>
>
>
> We have custom MarkupParser that extends AbstractMarkupParser but
> AbstractMarkupParser has dependency on Application (In the constructor
> it is getting MarkupSettings from application).
>
>
>
> Since we are doing parsing in a different thread which doesn't have
> application set in the thread context., Is there any other way to parse
> without setting dummy application object in the thread context?
>
>
>
> Regards,
>
>
>
> Ashoka Upadhya
>
> Art.com
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org