Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timeout implemendation

 
babuce babuce
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am calling an AS400 application from JAVA program using the AS400 JAVA libraries.
Each time a request come I am creatin a separate thread to call AS400.

The AS400 application api does not support timeout feature and it hands indefinitly at times.

I want to implement the timeout feature in my JAVA code.

Can any one help me to implement this.



Thanks,
Babu
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way of doing this in core java is using ThreadObj.join(long millisec) on the main thread.
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, something like ....


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic