Friend f = pm.getObjectById(Friend.class, fkey);
UserAccount parent_user = f.getUser();
// then trigger the notification, if the channel server is enabled.
if (ChannelServer.channelAPIEnabled()) {
logger.info("pushing 'new content' notification");
ChannelServer.pushMessage(parent_user, new ContentAvailableMessage());
}
}
finally {
pm.close();
}