Re: [xsl] Asynchronous transformation in a (Java) Web app

Subject: Re: [xsl] Asynchronous transformation in a (Java) Web app
From: Martynas Jusevicius <martynas.jusevicius@xxxxxxxxx>
Date: Mon, 13 Sep 2010 22:29:52 +0200
The initial problem is not thread-safety per se, but long-running
transformations that I want to put in the background.
My main concern was that some (rather non-authoritative) online
sources warn generally against spawning threads from servlets.
But if that's not a problem, and my test code seems to confirm that, I
think I'll figure the rest out.

On Mon, Sep 13, 2010 at 6:14 PM, Michael Dykman <mdykman@xxxxxxxxx> wrote:
> I have quite a bit of experience in this type of implementation.
> Being thread safe does not mean you have to create threads to use it,
> you just have to make sure that you can deal with the points where
> threads will cross each other.  If this is a plain. vanilla servlet,
> you can store your Templates object in the application-level space
> (javax.servlet.Servletcontext get/setAttribute).  If not found,
> compile once, store it in the application space and reuse for the rest
> of the server's lifetime.
>
> I am doing a similar thing in my last couple of projects (using the
> Spring bean factory) and it results in a very fast transformation
> service.
>
>  - michael dykman
>
> On Mon, Sep 13, 2010 at 4:36 AM, Ludwig, Michael
> <Michael.Ludwig@xxxxxxxxxxxx> wrote:
>>> -----Original Message-----
>>> From: Greg Hunt
>>> Subject: Re: [xsl] Asynchronous transformation in a (Java) Web app
>>>
>>> Why would you pick the more approach that requires more
>>> infrastructure?
>>
>> Not experience; just belief in its technological superiority.
>> And I might be wrong. (Wouldn't be the first time.) If you've
>> got experience to share, I'm all ears. But let's not pursue
>> this publicly any further, it might alert the list police.
>>
>>> > A simple thread has worked for me, but JMS is more advanced.
>>> > I'd go the JMS way now.
>>
>> --
>> Michael Ludwig
>>
>>
>
>
>
> --
>  - michael dykman
>  - mdykman@xxxxxxxxx
>
>  May the Source be with you.

Current Thread