[jboss-dev-forums] [Design of POJO Server] - Re: Locking in DeploymentRepository
alesj
do-not-reply at jboss.com
Fri Mar 6 16:05:52 EST 2009
"alesj" wrote :
| Looking at HDScanner's activeScan I think I might get away with
| calling cancel on it, and spinning a bit around until it's done (activeScan.isDone == true).
| public synchronized void suspend()
| {
| suspended = (activeScan != null);
| if (activeScan != null)
| {
| activeScan.cancel(false);
| while(activeScan.isDone() == false)
| {
| try
| {
| Thread.sleep(100);
| }
| catch (InterruptedException ignored)
| {
| }
| }
| activeScan = null;
| }
| }
|
| public synchronized void resume()
| {
| if (suspended)
| {
| start();
| }
| suspended = false;
| }
|
Or too hack-ish? :-)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215870#4215870
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215870
More information about the jboss-dev-forums
mailing list