Author: chathura_ce
Date: Fri May 18 03:56:37 2007
New Revision: 539377
URL: http://svn.apache.org/viewvc?view=rev&rev=539377
Log:
Set default value of the suspend duration to -1, instead of Long.MAX_VALUE.
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java?view=diff&rev=539377&r1=539376&r2=539377
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializer.java
Fri May 18 03:56:37 2007
@@ -88,7 +88,7 @@
endpointElement.addChild(addressElement);
long suspendDuration = addressEndpoint.getSuspendOnFailDuration();
- if (suspendDuration != Long.MAX_VALUE) {
+ if (suspendDuration != -1) {
// user has set some value for this. let's serialize it.
OMElement suspendElement = fac.createOMElement(
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java?view=diff&rev=539377&r1=539376&r2=539377
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/WSDLEndpointSerializer.java
Fri May 18 03:56:37 2007
@@ -83,7 +83,7 @@
}
long suspendDuration = wsdlEndpoint.getSuspendOnFailDuration();
- if (suspendDuration != Long.MAX_VALUE) {
+ if (suspendDuration != -1) {
// user has set some value for this. let's serialize it.
OMElement suspendElement = fac.createOMElement(
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java?view=diff&rev=539377&r1=539376&r2=539377
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
Fri May 18 03:56:37 2007
@@ -66,9 +66,9 @@
/**
* Leaf level endpoints will be suspended for the specified time by this
variable, after a
- * failure. If this is not explicitly set, endpoints will be suspended
forever.
+ * failure. If this is not explicitly set, it is set to -1, which causes
endpoints to suspended forever.
*/
- private long suspendOnFailDuration = Long.MAX_VALUE;
+ private long suspendOnFailDuration = -1;
/**
* Time to recover a failed endpoint. Value of this is calculated when
endpoint is set as
@@ -125,8 +125,12 @@
// this is synchronized as recoverOn can be set to unpredictable
values if two threads call
// this method simultaneously.
- if (!active && suspendOnFailDuration != Long.MAX_VALUE) {
- recoverOn = System.currentTimeMillis() + suspendOnFailDuration;
+ if (!active) {
+ if (suspendOnFailDuration != -1) {
+ recoverOn = System.currentTimeMillis() + suspendOnFailDuration;
+ } else {
+ recoverOn = Long.MAX_VALUE;
+ }
}
this.active = active;
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java?view=diff&rev=539377&r1=539376&r2=539377
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
Fri May 18 03:56:37 2007
@@ -53,9 +53,9 @@
/**
* Leaf level endpoints will be suspended for the specified time by this
variable, after a
- * failure. If this is not explicitly set, endpoints will be suspended
forever.
+ * failure. If this is not explicitly set, it is set to -1, which causes
endpoints to suspended forever.
*/
- private long suspendOnFailDuration = Long.MAX_VALUE;
+ private long suspendOnFailDuration = -1;
/**
* Time to recover a failed endpoint. Value of this is calculated when
endpoint is set as
@@ -224,7 +224,11 @@
public void setActive(boolean active, MessageContext synMessageContext) {
if (!active) {
- recoverOn = System.currentTimeMillis() + suspendOnFailDuration;
+ if (suspendOnFailDuration != -1) {
+ recoverOn = System.currentTimeMillis() + suspendOnFailDuration;
+ } else {
+ recoverOn = Long.MAX_VALUE;
+ }
}
this.active = active;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]