[jboss-user] [Remoting] - Re: Socket Read Timeout on stressing calls for validating pr
ron.sigal@jboss.com
do-not-reply at jboss.com
Thu Jan 22 17:06:24 EST 2009
"vink" wrote :
| ... can we use the local fixed version in our product where org.jboss.remoting.Client class is working with static invokerDestructionTimer instance & other places instantiating timer object in disconnect() is commented.
|
That may be a two part question.
1. If you have a support contract and are using an EAP product, then there's no support for a nonstandard library.
2. Technically, it's not enough to just create a static Timer, because, in the absence of TimerTasks, a Timer can turn itself off and become unusable. I do something like this:
| private static Timer timer;
| private static Object timerLock = new Object();
| ...
|
| {
| ...
| synchronized (timerLock)
| {
| if (timer == null)
| {
| timer = new Timer(true);
| }
| try
| {
| timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
| }
| catch (IllegalStateException e)
| {
| log.debug("Unable to schedule TimerTask on existing Timer", e);
| timer = new Timer(true);
| timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
| }
| }
| ...
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204142#4204142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204142
More information about the jboss-user
mailing list