Generating a timeout in a computer software application
First Claim
1. A method comprising:
- invoking a timeout helper main thread from a session bean for an outbound call associated with a container;
creating a timeout helper worker thread by the timeout helper main thread;
starting a local timer with the timeout helper worker thread to detect a first timeout condition based on a first timeout interval;
initiating, by the timeout helper worker thread, a client object request broker (ORB) to detect a second timeout condition based on a second timeout interval, wherein a fixed value N>
0 is added to the first timeout interval to determine the second timeout interval;
returning a result object from the timeout helper worker thread to the timeout helper main thread when the timeout helper worker thread receives the result object for the outbound call;
throwing a timeout exception from the timeout helper main thread to the session bean when the outbound call has not completed within the first timeout interval;
throwing a second exception by the client ORB to the timeout helper worker thread when the outbound call has not completed within the second timeout interval, wherein the second exception is used to stop communication on the client ORB; and
reclaiming one or more resources associated with the outbound call in response to the second exception with a virtual machine of a computer system.
4 Assignments
0 Petitions
Accused Products
Abstract
A timeout helper main thread is created for an outbound call associated with a container. The main thread creates a timeout helper worker thread. A local timer is started to detect a first timeout condition based on a first timeout interval. The worker thread initiates a client Object Request Broker (ORB) to detect a second timeout condition based on a second timeout interval. If the outbound call completes within the first timeout interval, a result object is returned from the main thread. Otherwise, the main thread throws a timeout exception. If the outbound call has not completed within the second timeout interval, the client ORB throws an exception to the worker thread and one or more resources associated with the outbound call are reclaimed. As an alternative to the client ORB, an HTTP client can detect the second timeout condition.
-
Citations
20 Claims
-
1. A method comprising:
-
invoking a timeout helper main thread from a session bean for an outbound call associated with a container; creating a timeout helper worker thread by the timeout helper main thread; starting a local timer with the timeout helper worker thread to detect a first timeout condition based on a first timeout interval; initiating, by the timeout helper worker thread, a client object request broker (ORB) to detect a second timeout condition based on a second timeout interval, wherein a fixed value N>
0 is added to the first timeout interval to determine the second timeout interval;returning a result object from the timeout helper worker thread to the timeout helper main thread when the timeout helper worker thread receives the result object for the outbound call; throwing a timeout exception from the timeout helper main thread to the session bean when the outbound call has not completed within the first timeout interval; throwing a second exception by the client ORB to the timeout helper worker thread when the outbound call has not completed within the second timeout interval, wherein the second exception is used to stop communication on the client ORB; and reclaiming one or more resources associated with the outbound call in response to the second exception with a virtual machine of a computer system. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method comprising:
-
invoking a timeout helper main thread from a session bean for an outbound call associated with a container; creating a timeout helper worker thread by the timeout helper main thread; starting a local timer to detect a first timeout condition based on a first timeout interval; returning a result object from the timeout helper worker thread to the timeout helper main thread when the timeout helper worker thread receives the result object from a hypertext transfer protocol (HTTP) client; throwing a timeout exception from the timeout helper main thread to the session bean when the outbound call has not completed within the first timeout interval; using the HTTP client to detect a second timeout condition based on a second timeout interval, wherein a fixed value N>
0 is added to the first timeout interval to determine the second timeout interval;receiving, by the timeout helper worker thread, a timeout from the HTTP client when the outbound call has not completed within the second timeout interval; stopping communication with the HTTP client when the timeout from the HTTP client is received; and reclaiming one or more resources associated with the outbound call in response to the timeout from the HTTP client with a virtual machine of a computer system. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A computer-readable medium having computer-readable program code to cause a computer system to:
-
invoke a timeout helper main thread from a session bean for an outbound call associated with a container; create a timeout helper worker thread by the timeout helper main thread; start a local timer with the timeout helper worker thread to detect a first timeout condition based on a first timeout interval; initiate, by the timeout helper worker thread, a client object request broker (ORB) to detect a second timeout condition based on a second timeout interval, wherein a fixed value N>
0 is added to the first timeout interval to determine the second timeout interval;return a result object from the timeout helper worker thread to the timeout helper main thread when the timeout helper worker thread receives the result object for the outbound call; throw a timeout exception from the timeout helper main thread to the session bean when the outbound call has not completed within the first timeout interval; throw a second exception by the client ORB to the timeout helper worker thread when the outbound call has not completed within the second timeout interval, wherein the second exception is used to stop communication on the client ORB; and reclaim one or more resources associated with the outbound call in response to the second exception with a virtual machine of a computer system. - View Dependent Claims (15, 16, 17)
-
-
18. A computer-readable medium having computer-readable program code to cause a computer system to:
-
invoke a timeout helper main thread from a session bean for an outbound call associated with a container; create a timeout helper worker thread by the timeout helper main thread; start a local timer to detect a first timeout condition based on a first timeout interval; return a result object from the timeout helper worker thread to the timeout helper main thread when the timeout helper worker thread receives the result object from a hypertext transfer protocol (HTTP) client; throw a timeout exception from the timeout helper main thread to the session bean when the outbound call has not completed within the first timeout interval; use the HTTP client to detect a second timeout condition based on a second timeout interval, wherein a fixed value N>
0 is added to the first timeout interval to determine the second timeout interval;receive, by the timeout helper worker thread, a timeout from the HTTP client when the outbound call has not completed within the second timeout interval; stop communication with the HTTP client when the timeout from the HTTP client is received; and reclaim one or more resources associated with the outbound call in response to the timeout from the HTTP client with a virtual machine of a computer system. - View Dependent Claims (19, 20)
-
Specification