Skip to content

Sharing CDI beans containing properties through the session cache does not work. #194

@ryahiaoui

Description

@ryahiaoui

The observed behavior with CDI session beans is unusual: after modifying a property of the bean, then calling session.getAttributeNames() within the same method, the shared session cache is not updated. However, if session.getAttributeNames() is not called, everything works correctly and the cache is updated.

  @SessionScoped
  @Named ("test")
  public class RoleManagementJspBean 
  {
      private String test = "init";
      
      public String process( HttpServletRequest request )
      {
         test= request.getParameter("test");
         HttpSession session = request.getSession( true );
         session.getAttributeNames();
       }
  }

Do you have any hypotheses about what could be causing this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions