// Create a new guestbook entry transfer object for each entry and add
// them to the list
List<GuestbookEntryTransferObject> entryTransferObjects =
new ArrayList<GuestbookEntryTransferObject>(entries.size());
for (GuestbookEntry entry : entries) {
entryTransferObjects.add(new GuestbookEntryTransferObject(entry
.getName(), entry.getMessage()));
}
return entryTransferObjects;
} finally {
if (pm.currentTransaction().isActive()) {