Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8306809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:24:15+00:00 2026-06-08T18:24:15+00:00

We have an ideological problem while creating a Web Application in JSF, EJB and

  • 0

We have an ideological problem while creating a Web Application in JSF, EJB and JPA.

Our example situation is:

Admin displays the list of users in datatable. Next, he selects user1, which leads him to new user-edition site. The issue occure if he tries to open second card or window and select user2 for simultaneous edition in the same session.
When we try to save user1 data after edition it is not possible, because it is being overwritten in Endpoint by user2.

Data storing:
Because we do not store any data in View part of our project [diagram available below], after displaying it the Managed Beans are being destroyed. Therefore in Controller part we decided to keep the currently selected user as a field in Endpoint [Stateful EJB Bean] which is constant for a session as it is held by Session Scoped Managed Bean.
We believe we should not store any Collections in Endpoint or Session Scope Managed Bean.

Problem:
Particular case is an overview of the situation. In our application we want to edit multiple entities of the same type during on session.

Question:
Where and how should we store the current selections of User/Admin, which lead to edition of that selected entity.

Storing data in view, request scoped part allowed us to control multiple entities in the same session, though we think it is not appropriate approach. But now storing it in controller part leads to limit of one entity of the same type being edited in the same session.

DIAGRAM HERE: https://i.stack.imgur.com/9PyYr.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:24:16+00:00Added an answer on June 8, 2026 at 6:24 pm

    Since you are using a Java EE server (Glassfish 3.1) you could get advantage of using CDI which supports different scopes than JSF. There is a CDI extension called CODI which provides the so called “window scope”, allowing you to scope your beans per browser window which will solve your problem. More info about the window scope can be found here.

    Another option is to use IceFaces JSF library that also supports its own window scope. More info can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a n-tire web application and search often times out after 30 secs. How
Have the following problem example . The problem is that because of the border
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
have a nice day. I got problem when trying to create an image from
I have some kind of an ideological question, so: Suppose I have some templated
Some programming languages have support for strings, that are stored as folows: For example,
I am at the start of my cocos2d adventure, and have some ideological questions
Have a look at one of my websites: moskah.com The problem is that it
Have such a problem, hope you'll help me.. Can't find anywhere. Here is the
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.