* @throws UserNotFoundException
*/
public void updateActivity(String userJID, ActivityEntry entry) throws UserNotFoundException, UnauthorizedException {
// Overide the actor to avoid spoofing
User user = UserManager.getInstance().getUser(new JID(userJID).getNode());
ActivityActor actor = activityFactory.actor();
actor.setUri(userJID);
actor.setName(user.getName());
actor.setEmail(user.getEmail());
// Persist the activities
final EntityManager em = OswPlugin.getEmFactory().createEntityManager();
em.getTransaction().begin();
PersistentActivityEntry oldEntry=em.find(PersistentActivityEntry.class, entry.getId());