Author: indika
Date: Tue May 20 09:25:05 2008
New Revision: 17189
Log:
fix for ESBJAVA 474
Modified:
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/ESBRegistry.java
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/WSO2RegistryAdapter.java
Modified:
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/ESBRegistry.java
==============================================================================
---
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/ESBRegistry.java
(original)
+++
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/ESBRegistry.java
Tue May 20 09:25:05 2008
@@ -199,6 +199,7 @@
} finally {
try {
+ result.detach();
inputStream.close();
} catch (IOException e) {
log.error("Error in closing the input stream.", e);
Modified:
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/WSO2RegistryAdapter.java
==============================================================================
---
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/WSO2RegistryAdapter.java
(original)
+++
branches/esb/java/1.7/esb/java/modules/core/src/main/java/org/wso2/esb/registry/WSO2RegistryAdapter.java
Tue May 20 09:25:05 2008
@@ -216,30 +216,15 @@
entry.setLastModified(resource.getLastModified().getTime());
entry.setVersion(resource.getLastModified().getTime());
- String expiration = resource.getProperty(EXPIRY_TIME);
- long expirationTime = 0;
- if (expiration != null) {
+ String cachableDuration = resource.getProperty(CACHABLE_DURATION);
+ long cacheTime = 0;
+ if (cachableDuration != null) {
try {
- expirationTime = Long.parseLong(expiration);
+ cacheTime = Long.parseLong(cachableDuration);
} catch (NumberFormatException e) {
- handleException("Couldn't pass the expiry time as a long",
e);
- }
- }
-
- if (expirationTime > 0) {
- entry.setCachableDuration(
- expirationTime - System.currentTimeMillis());
- } else {
- String cachableDuration =
resource.getProperty(CACHABLE_DURATION);
- long cacheTime = 0;
- if (cachableDuration != null) {
- try {
- cacheTime = Long.parseLong(cachableDuration);
- } catch (NumberFormatException e) {
- handleException("Couldn't pass the cachableDuration as
a long", e);
- }
- entry.setCachableDuration(cacheTime);
+ handleException("Couldn't pass the cachableDuration as a
long", e);
}
+ entry.setCachableDuration(cacheTime);
}
}
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev