public class TimeoutException extends PluginException
This Exception is thrown if a plug-in times out waiting for a response.
To avoid resource contention a plug-in should not block a request for long periods of time. Whenever possible, a plug-in should throw TimeOutException when a configurable amount of time has elapsed.
For example, during an approve() request, a plug-in could wait for at most 45 seconds. After that, since if the plug-in hasn't received a response from the back end (payment service provider), it will throw a TimeOutException.
Note that the plug-in should make the waiting period a configurable property in the plug-in deployment descriptor. What may be a short period for some applications, may be a long period for others.
Since plug-ins are stateless session beans (SSB) (and as such are not supposed to spawn their own background threads). Plug-ins may not be able to detect a timeout by themselves. In these cases, the EJB transaction which contains the plug-in request will be rolled back automatically by the EJB container according to a pre-configurable timeout.
Constructor and Description |
---|
TimeoutException()
This method is the default constructor.
|
TimeoutException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText)
This method is a constructor with a localized message.
|
TimeoutException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText, java.lang.Throwable exception)
This method constructor with a localized message and a chained exception.
|
TimeoutException(java.lang.Throwable exception)
This method constructor with a chained exception.
|
public TimeoutException()
This method is the default constructor.
public TimeoutException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText)
This method is a constructor with a localized message.
public TimeoutException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText, java.lang.Throwable exception)
This method constructor with a localized message and a chained exception.
public TimeoutException(java.lang.Throwable exception)
This method constructor with a chained exception.