You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/04/26 09:43:24 UTC
svn commit: r768675 -
/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java
Author: jleroux
Date: Sun Apr 26 07:43:24 2009
New Revision: 768675
URL: http://svn.apache.org/viewvc?rev=768675&view=rev
Log:
I have not seen this error for some times, but anyway this is more secure, suggested by Stephen Rufle on user ML
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java?rev=768675&r1=768674&r2=768675&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java Sun Apr 26 07:43:24 2009
@@ -20,11 +20,12 @@
import java.util.Date;
-import org.ofbiz.service.config.ServiceConfigUtil;
+import org.apache.commons.lang.math.NumberUtils;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
-import org.ofbiz.entity.transaction.TransactionUtil;
import org.ofbiz.entity.transaction.GenericTransactionException;
+import org.ofbiz.entity.transaction.TransactionUtil;
+import org.ofbiz.service.config.ServiceConfigUtil;
/**
* JobInvoker
@@ -281,7 +282,7 @@
long ttl = THREAD_TTL;
try {
- ttl = Long.parseLong(ServiceConfigUtil.getElementAttr("thread-pool", "ttl"));
+ ttl = NumberUtils.toLong(ServiceConfigUtil.getElementAttr("thread-pool", "ttl"));
} catch (NumberFormatException nfe) {
Debug.logError("Problems reading value from attribute [ttl] of element [thread-pool] in serviceengine.xml file [" + nfe.toString() + "]. Using default (" + THREAD_TTL + ").", module);
}