5 Replies Latest reply on Jun 19, 2009 5:48 AM by nbelaevski

    keepAlive issue

      Hi guys,

      I have problem with keepAlive component. As being said on developers guide it can be used to keep request bean as if it is in session bean(or something like that).

      My problem is that, when I add <a4j:keepAlive beanName="mybeanname" /> in any place on my page I dont realize any change in page state. It behaves as if I dont use keepAlive component and allways enter the constructor of the bean.

      But when I use keepAlive as annotation it keeps my bean's state and seems to never release it during session.

      what is different between annotation and page usage of this component? in case of using annotation, how long does the annotated bean live? Is it safer to use annotation version of this component?

      thanks in advance

        • 1. Re: keepAlive issue

          hi friends I need help. could you please give me some idea about the usage of this component?

          • 2. Re: keepAlive issue
            nbelaevski

            Hi Mustafa,

            Both versions should work much the same. So, are you keeping annotated bean in "session" scope? Redirect navigation may cause the bean to loose state, do you use it?

            • 3. Re: keepAlive issue

              first of all thanks for your reply nbelaevski.

              I dont keep annotated bean in the session scope. but it behaves as if it is in the session scope. first of all I want to learn when does annotated bean will be swapped out from memory. what is its timeout?
              Also I dont use redirect navigation.

              As I said before when I use the a4j:keepAlive in the jsp page it desnt work. is there any special place for this component?

              how long does it live in case of using annotation?

              thanks in advance,

              • 4. Re: keepAlive issue
                nbelaevski

                Mustafa,

                No, tag placement should not affect the component functionality.

                Keep-alived objects marked with annotation are removed when you explicitly remove them from the "request" scope. There are no timeouts for this.

                • 5. Re: keepAlive issue
                  nbelaevski