users@glassfish.java.net

Re: pdf creation in synchronized block

From: ymajoros <yannick.majoros_at_uclouvain.be>
Date: Wed, 26 Aug 2009 01:45:35 -0700 (PDT)

Hello,

I think this is the next step. This would let the job be processed when the
time is right and tell the user when it's done (mail, ...).

In the meantime, I would like to leave the presentation code and just change
this synchronized block, if needed. I'm looking for a way to wait for some
lock to be available and process the request when a new lock is acquired.
Any recommandation for this?

Yannick


Dick Davies wrote:
>
> How about putting the job in a message queue, then letting something else
> do the work later?
>
> On Mon, Aug 24, 2009 at 3:54 PM, ymajoros<yannick.majoros_at_uclouvain.be>
> wrote:
>>
>> Hi,
>>
>> I inherited a web application where big pdf creations happen in a
>> 'synchronized' block. I don't feel this is right: I think thread
>> management
>> is part of the application server and shouldn't be managed there, in my
>> opinion.
>>
>> Still, management insists only one thread should be able to generate a
>> big
>> document at a time. So, I thought I'd implement some kind of locking
>> scheme.
>>
>> I need opinions: is there a recommanded way to go, or should I even leave
>> those synchronized blocks alone?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/pdf-creation-in-synchronized-block-tp25117516p25117516.html
>> Sent from the java.net - glassfish users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/pdf-creation-in-synchronized-block-tp25117516p25148891.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.