2 Replies Latest reply on Feb 20, 2010 1:45 PM by slawek t

    Seam RememberMe component extending problem

    slawek t Novice

      I'm trying to extend RememberMe component with my ExtendedRememberMe class which looks like:


      @Name( "org.jboss.seam.security.rememberMe" )
      @Scope( ScopeType.SESSION )
      @Install( precedence = Install.APPLICATION, classDependencies = "javax.faces.context.FacesContext" )
      @BypassInterceptors
      public class ExtendedRememberMe extends RememberMe {
      
          ...
      
          @Observer( Credentials.EVENT_INIT_CREDENTIALS )
          public void initCredentials( ExtendedCredentials credentials ) {
            ...      
          }
      
      }
      



      The problem is that method


      initCredentials( ... )
      



      is calling twice - once in my ExtendedRememberMe and another one in original RememberMe class.



      I'm convinced that it should be called ones because my ExtendedRememberMe with Install.APPLICATION shout override original RememberMe with Install.BUILD_IN but it isn't like I thought.


      What I'm doing wrong?


      Slawek

        • 1. Re: Seam RememberMe component extending problem
          slawek t Novice

          Both components have exactly the same name

          @Name("org.jboss.seam.security.rememberMe")



          Both are in session context

          @Scope( ScopeType.SESSION )



          Seam doesn't notify that there is somenthing wrong with components.


          When I'm debbuging I see that as first is invoking method initCredentials() from my extended component and later original initCredentials() from Seam's RememberMe component. Unfotunatelly the original component overrides my operations on credentials as invoked as second.


          How it's possible that bot components exits in one project with no conflict and both are visible (and invoking by raising event Credentials.EVENTINITCREDENTIALS) by Seam?


          • 2. Re: Seam RememberMe component extending problem
            slawek t Novice

            Really nobody faced a problem described by my?


            Shoud I put a more details to better describe my issue?