AnsweredAssumed Answered

subscribe aspect

Question asked by xerox on Mar 29, 2006
Latest reply on Apr 3, 2006 by xerox
I made a link by every document(in de browse page) with subscribe.
the meaning of this is, that a person can subscribe himself on a document.
If you click on that link, it calls browsebean.subscribe.

code of browsebean.subscribe

public void Subscribe()
      UserTransaction tx = null;
         tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
         // add the versionable aspect to the node
         this.nodeService.addAspect(getDocument().getNodeRef(), ContentModel.ASPECT_SUBSCRIBABLE, null);
         // commit the transaction
         // reset the state of the current document
      catch (Throwable e)
         // rollback the transaction
         try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
               FacesContext.getCurrentInstance(), MSG_ERROR_ASPECT_SUBSCRIBE), e.getMessage()), e);
But this doesn't work.
Does someone know how to deal with the subscribe aspect?