2 Replies Latest reply on Sep 1, 2007 4:47 PM by abdelghani.tag

    Stateless or Statefull

    abdelghani.tag

      Hi
      im new in Jboss seam, i need to clear one issue
      i have many web pages where i get the Data from DB and also i add, delete, update, whats the best practice to use @Stateless or @StateFull
      most my page look like this
      @Stateless
      @Name("action")
      @Scope(ScopeType.SESSION)


      thanks in advance.

        • 1. Re: Stateless or Statefull
          asookazian

          in short, you use stateful SB's to maintain client state. This is required for conversation context use cases (multiple screen navigation).

          stateless SB's are usually providing a service for any client (e.g. run somebody's credit).

          If you want to use instance variables, you must use a stateful SB.

          read the Seam doc in your seam download.

          • 2. Re: Stateless or Statefull
            abdelghani.tag

            thanks for reply
            i just wanna tell u that im using DataModel and DataModelSelection and some Out Variable,
            is that mean i must use statfull SB
            does that statfull SB expires when the session ends unders session scope