0 Replies Latest reply on Jul 28, 2010 8:02 AM by Tanya Ruttenberg

    Seam component not available in RevisionListener

    Tanya Ruttenberg Expert

      I've tried to implement the custom RevisionListener exactly as you have it in your example, but the components are not found apparently.  Here is the code


      public void newRevision(Object revisionEntity) {
              Identity id = (Identity) Component.getInstance("org.jboss.seam.security.Identity");
              IdentityRevisionEntity revEntity = (IdentityRevisionEntity) revisionEntity;


      I get a NullPointerException on the id.  And yet when I look at the debug page, that component definitely exists in the session context.  I've tried to use Component.getInstance() on other components and each time I get null.  I've tried explicitly stating in which context to find the component. Nothing. 


      I must be missing something crucial here. Any idea what?