xsl-list
[Top] [All Lists]

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

2010-09-13 15:30:04
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(_at_)gmail(_dot_)com> 
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(_dot_)Ludwig(_at_)delphi-mb(_dot_)de> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--
 - michael dykman
 - mdykman(_at_)gmail(_dot_)com

 May the Source be with you.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--