Korrekturen um offene ResultSets zu verhindern

git-svn-id: https://svn.libreccm.org/ccm/trunk@669 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2011-01-05 16:13:27 +00:00
parent 4b4dd00cd4
commit 715e500fe8
3 changed files with 22 additions and 3 deletions

View File

@ -109,6 +109,9 @@ public class GenericContact extends ContentPage implements
collection.next();
dobj = collection.getDataObject();
// Close Collection to prevent an open ResultSet
collection.close();
return (GenericPerson) DomainObjectFactory.newInstance(dobj);
}
//return (GenericPerson) DomainObjectFactory.newInstance((DataObject)get(PERSON));
@ -190,7 +193,12 @@ public class GenericContact extends ContentPage implements
if(person != null) {
GenericPersonContactCollection collection = person.getContacts();
collection.next();
return (String) collection.getContactType();
String contactType = (String) collection.getContactType();
// Close Collection to prevent open ResultSet
collection.close();
return contactType;
} else {
return null;
}

View File

@ -151,7 +151,12 @@ public class GenericContactEntriesTable extends Table implements TableActionList
GenericContactEntryKeys keys = new GenericContactEntryKeys(m_contactEntry.getKey());
keys.addLanguageFilter(DispatcherHelper.getNegotiatedLocale().getLanguage());
if (keys.next()) {
return keys.getName();
Object key = keys.getName();
// Close Collection to prevent open ResultSet
keys.close();
return key;
}
return m_contactEntry.getKey();
case 1:

View File

@ -205,9 +205,15 @@ public class GenericPersonContactTable extends Table implements
contacttypes.getRelationAttribute(
m_contactCollection.getContactType(),
lang)));
return contacttypes.getRelationAttribute(
Object name = contacttypes.getRelationAttribute(
m_contactCollection.getContactType(),
lang).getName();
// Close collection to prevent open ResultSet
contacttypes.close();
return name;
case 1:
return m_contact.getTitle();
case 2: