[
https://issues.apache.org/jira/browse/OFBIZ-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14489693#comment-14489693 ]
Nicolas Malin edited comment on OFBIZ-6218 at 4/10/15 2:13 PM:
---------------------------------------------------------------
:) I blame these tests myself !
{quote}
Right now my gut feeling is that this is not a problem in DBCP, but in our code.
{quote}
I know that, and it's THE problem because I don't understand where is the beast to kill.
To simplify the code reading, I create a private function
{code}
private List<GenericValue> getCompleteList(Map<String, Object> context) {
EntityListIterator listIt = (EntityListIterator) context.get("listIt");
List<GenericValue> foundElements = new LinkedList<GenericValue>();
if (listIt != null) {
try {
foundElements = listIt.getCompleteList();
} catch (GenericEntityException e) {
Debug.logError(" Failed to extract values from EntityListIterator after a performFind service", module);
} finally {
try {
listIt.close();
} catch (GenericEntityException e) {
Debug.logError(" Failed to close EntityListIterator after a performFind service", module);
}
}
}
return foundElements;
}
{code}
It's the only location where I use an EntityListIterator in performFind tests
was (Author: soledad):
:) I blame these test myself !
{quote}
Right now my gut feeling is that this is not a problem in DBCP, but in our code.
{quote}
I know that, and it's THE problem because I don't understand where is the beast to kill.
To simplify the code reading, I create a private function
{code}
private List<GenericValue> getCompleteList(Map<String, Object> context) {
EntityListIterator listIt = (EntityListIterator) context.get("listIt");
List<GenericValue> foundElements = new LinkedList<GenericValue>();
if (listIt != null) {
try {
foundElements = listIt.getCompleteList();
} catch (GenericEntityException e) {
Debug.logError(" Failed to extract values from EntityListIterator after a performFind service", module);
} finally {
try {
listIt.close();
} catch (GenericEntityException e) {
Debug.logError(" Failed to close EntityListIterator after a performFind service", module);
}
}
}
return foundElements;
}
{code}
It's the only location where I use an EntityListIterator in performFind tests
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)