wood burning stoves 2.0*
The moose likes Java in General and the fly likes current thread not owner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "current thread not owner" Watch "current thread not owner" New topic
Author

current thread not owner

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi i have created on small application and want to use threading the small application prints the current thread busy (jboss server) which need to be printed after every few interval and should never end printing

Code :



ERROR :



Jigar Naik


Ramesh Shankar
Greenhorn

Joined: Jun 13, 2005
Posts: 4
t.wait() should come inside a synchronized block
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
I have replaced t.wait with t.sleep(1000);

at Console :

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Can anybody tell me what modification should i do in the following progame to keep the System.out.println line executing again and again agter the interval of 1000 ms ???

Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638



apigee, a better way to API!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Moving to threads forum...


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
 
subject: current thread not owner
 
Similar Threads
Servlet with XML
Problem loading updated input while expanding in Treeviewer
Cannot access a servlet from a Java application
current thread not owner
Multithreading client socket throws Stream corrupted exception