For anyone who might be interested, this is what I ended up with for a
scheduler:
public class AServletContextListener implements ServletContextListener
{
private ScheduledExecutorService executor;
/**
* Constructs AServletContextListener object.
*/
public
On 14/07/2011 23:59, Terence M. Bandoian wrote:
On 1:59 PM, Mark Thomas wrote:
On 14/07/2011 06:11, Terence M. Bandoian wrote:
I can live with this. It's just one of those it would be nice not to
have to explain things and if Thread.sleep does the trick, I'm happy.
As I mentioned in my
On 1:59 PM, Mark Thomas wrote:
On 14/07/2011 23:59, Terence M. Bandoian wrote:
On 1:59 PM, Mark Thomas wrote:
On 14/07/2011 06:11, Terence M. Bandoian wrote:
I can live with this. It's just one of those it would be nice not to
have to explain things and if Thread.sleep does the trick, I'm
On 14/07/2011 06:05, Terence M. Bandoian wrote:
On 1:59 PM, Pid wrote:
ATimerTask is a private instance in AServletContextListener, is this
necessary and if so, why?
What logic is contained in ATimerTask?
Are you overriding TimerTask.cancel() and do you catch
InterruptedException?
p
On 1:59 PM, Pid wrote:
On 14/07/2011 06:05, Terence M. Bandoian wrote:
On 1:59 PM, Pid wrote:
ATimerTask is a private instance in AServletContextListener, is this
necessary and if so, why?
What logic is contained in ATimerTask?
Are you overriding TimerTask.cancel() and do you catch
On 14/07/2011 06:11, Terence M. Bandoian wrote:
I can live with this. It's just one of those it would be nice not to
have to explain things and if Thread.sleep does the trick, I'm happy.
As I mentioned in my original post, I wanted to find out if there was a
another way to accomplish the same
On 1:59 PM, Mark Thomas wrote:
On 14/07/2011 06:11, Terence M. Bandoian wrote:
I can live with this. It's just one of those it would be nice not to
have to explain things and if Thread.sleep does the trick, I'm happy.
As I mentioned in my original post, I wanted to find out if there was a
On 12/07/2011 20:47, Terence M. Bandoian wrote:
Hi, Kris-
I tried using ScheduledExecutorService but ran into the same problem.
After awaiting termination:
executorService.shutdown();
try
{
while (
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Terence,
On 7/12/2011 3:47 PM, Terence M. Bandoian wrote:
executorService.shutdown();
try { while ( !executorService.awaitTermination( 1, TimeUnit.SECONDS
) );
Thread.sleep( 1000 ); } catch ( InterruptedException ie ) { }
We use a
On 1:59 PM, Pid wrote:
ATimerTask is a private instance in AServletContextListener, is this
necessary and if so, why?
What logic is contained in ATimerTask?
Are you overriding TimerTask.cancel() and do you catch InterruptedException?
p
Hi, Pid-
For the sake of clarity, I'll repeat this
On 1:59 PM, Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Terence,
On 7/12/2011 3:47 PM, Terence M. Bandoian wrote:
executorService.shutdown();
try { while ( !executorService.awaitTermination( 1, TimeUnit.SECONDS
) );
Thread.sleep( 1000 ); } catch (
On 1:59 PM, Bill Miller wrote:
The problem is obviously that the thread within the Timer needs time to
properly shutdown, the
non-obvious part is how long does it need, and how do you detect it's done?.
Normally you would do
a Thread.join() to ensure a thread has stopped before continuing,
On 12/07/2011 02:06, Terence M. Bandoian wrote:
Hi-
I've been testing a web application on:
Tomcat 6.0.32 (32-bit)
Sun/Oracle JRE 1.6.0_25 (32-bit)
Windows Server 2008 R2
The web application includes a ServletContextListener which creates a
Timer in the contextInitialized method to
On 7/12/2011 4:11 AM, Pid wrote:
On 12/07/2011 02:06, Terence M. Bandoian wrote:
Hi-
I've been testing a web application on:
Tomcat 6.0.32 (32-bit)
Sun/Oracle JRE 1.6.0_25 (32-bit)
Windows Server 2008 R2
The web application includes a ServletContextListener which creates a
Timer in the
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Subject: Terminating Timer Thread Gracefully
Finally, in contextDestroyed, I inserted a call to
Thread.sleep after canceling the timer and the error
message disappeared.
You should be able to do a Thread.join() using the timer's Thread
On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Subject: Terminating Timer Thread Gracefully
Finally, in contextDestroyed, I inserted a call to
Thread.sleep after canceling the timer and the error
On 7/12/2011 9:59 AM, Kris Schneider wrote:
On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Subject: Terminating Timer Thread Gracefully
Finally, in contextDestroyed, I inserted a call to
On Tue, Jul 12, 2011 at 10:03 AM, David kerber dcker...@verizon.net wrote:
On 7/12/2011 9:59 AM, Kris Schneider wrote:
On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Subject: Terminating Timer
On Tue, Jul 12, 2011 at 10:03, David kerber dcker...@verizon.net wrote:
On 7/12/2011 9:59 AM, Kris Schneider wrote:
On Tue, Jul 12, 2011 at 7:59 AM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Subject: Terminating Timer
Hi, Kris-
I tried using ScheduledExecutorService but ran into the same problem.
After awaiting termination:
executorService.shutdown();
try
{
while ( !executorService.awaitTermination(
1, TimeUnit.SECONDS ) );
-Original Message-
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Sent: July 12, 2011 3:47 PM
To: Tomcat Users List
Subject: Re: Terminating Timer Thread Gracefully
Hi, Kris-
I tried using ScheduledExecutorService but ran into the same problem.
After awaiting termination
21 matches
Mail list logo