@RequestScoped @Timeout public class DefaultTimeoutClient extends Object
Constructor and Description |
---|
DefaultTimeoutClient() |
Modifier and Type | Method and Description |
---|---|
Connection |
serviceA(long timeToSleep)
serviceA uses the default Fault Tolerance timeout of 1 second.
|
Connection |
serviceB(long timeToSleep)
serviceB specifies a an overriding Timeout longer than the default, at 2 seconds
|
public Connection serviceA(long timeToSleep)
timeToSleep
- How long should the execution take in millis@Timeout(value=2000L) public Connection serviceB(long timeToSleep)
timeToSleep
- How long should the execution take in millisCopyright © 2020 Eclipse Foundation. All rights reserved.