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 248581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:21:18+00:00 2026-05-11T21:21:18+00:00

I’m a undergrad Student at a German University. I have a team Programming Course

  • 0

I’m a undergrad Student at a German University.
I have a team Programming Course .. where we have to use JavaEE/JSF to make a social networking site .. like LinkedIn.
Anyway my group has created a lot of beans. Which IMHO is too much .

    <?xml version='1.0' encoding='UTF-8'?>

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config version="1.2" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <managed-bean>
        <managed-bean-name>SessionBean1</managed-bean-name>
        <managed-bean-class>egispartnerprofile.SessionBean1</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>ApplicationBean1</managed-bean-name>
        <managed-bean-class>egispartnerprofile.ApplicationBean1</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>RequestBean1</managed-bean-name>
        <managed-bean-class>egispartnerprofile.RequestBean1</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Hauptseite</managed-bean-name>
        <managed-bean-class>egispartnerprofile.Hauptseite</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>PasswordVergessen</managed-bean-name>
        <managed-bean-class>egispartnerprofile.PasswordVergessen</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>registery</managed-bean-name>
        <managed-bean-class>egispartnerprofile.registery</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Page1</managed-bean-name>
        <managed-bean-class>egispartnerprofile.Page1</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <validator>
        <validator-id>login.EmailValidator</validator-id>
        <validator-class>Login.EmailValidator</validator-class>
    </validator>

    <managed-bean>
        <managed-bean-name>Bewertung</managed-bean-name>
        <managed-bean-class>group52.infoholders.Bewertung</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Mitarbeiter</managed-bean-name>
        <managed-bean-class>group52.infoholders.Mitarbeiter</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Nachrichten</managed-bean-name>
        <managed-bean-class>group52.infoholders.Nachrichten</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Benutrzer</managed-bean-name>
        <managed-bean-class>group52.infoholders.Benutzer</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>view$MainPage</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.MainPage</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>view$NavigationBar</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.NavigationBar</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>view$PartnerProfilePage</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.PartnerProfilePage</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>view$PartnerProfileChange</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.PartnerProfileChange</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>view$ProfilePage</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.ProfilePage</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <from-view-id>/Page1.jsp</from-view-id>
        <navigation-case>
            <from-outcome>case1</from-outcome>
            <to-view-id>/view/MainPage.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/view/MainPage.jsp</from-view-id>
        <navigation-case>
            <from-outcome>case1</from-outcome>
            <to-view-id>/view/ProfilePage.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <managed-bean>
        <managed-bean-name>view$ProfileChange</managed-bean-name>
        <managed-bean-class>egispartnerprofile.view.ProfileChange</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
</faces-config>

Actually :

  • Ever Site is a Bean
  • We have 3 Application Beans
  • I just use 1 Session Bean

I think they missunderstood the purpose of Beans.(did they? or am I wrong ?!)
How can i make them clear … that 1 Session Bean is ( or could be) enough?

  • 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-05-11T21:21:18+00:00Added an answer on May 11, 2026 at 9:21 pm

    It doesn’t look like there are too many beans, but of course it depends on what the beans do and how they are used. The “one bean per view” rule is quite common and there is usually nothing wrong with this. Of course, if you can write some beans that are more general and can be used on many/all views, you should certainly do this, just try to keep their purpose clear and focused on a single task.

    The fact that most of your beans are request-scoped is good. Only beans which have to keep some state during the whole duration of a user session should be put into session scope (hence the name). This also keeps the per session memory consumption low. Application scope is usually used for beans that have to be created once and are used by all users of your site. Like global variables/singletons, you should use them sparingly.

    But about your idea that one session bean is enough: There is no general rule how many beans have to be in which scope. Design and develop the beans and then decide in which scope they need to be. As I said, it’s very likely to have the number of beans in session scope lower than the number of beans in request scope, but if a bean has to be in session scope to work properly, you shouldn’t be afraid of it.

    Don’t try to squeeze everything into a single session bean, just because you want to have only one bean in session scope. This would be called a God Object, which is an anti-pattern.

    So for example, you have some user information (e.g. full name, status, role…) stored in a database, which you want to display on all pages when a user is logged in (like the grey bar at the top here on SO). This would be something you could implement as a session-scoped bean which is used on all of your pages (or better yet, in some header which is included on every page). This bean would be created as soon as the user logs on and fetches the information just once from the database.

    In an online store, another session scoped bean could be used for storing the shopping basket of the user. Yet another session scoped bean could be used for managing a separate shopping list…

    Apart from that, I would like to comment on the naming rules/style you and your team uses:

    • You should decide on one language (preferrably English) and stick to it, so no class/method/variable names like “PasswordVergessen”
    • Every class/method/variable should have a descriptive and self explaning name, so don’t use somthing like “ApplicationBean1”
    • Try to organize your faces-config into blocks (separate navigation rules from bean definitions, etc.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try these rules: RewriteCond %{REQUEST_URI} ^/(([^/]+/)*)gallery/ RewriteCond %{DOCUMENT_ROOT}%1gallery/cache/$0 -f RewriteRule… May 12, 2026 at 1:05 am
  • Editorial Team
    Editorial Team added an answer Try get_called_class(). http://php.net/manual/en/function.get-called-class.php May 12, 2026 at 1:05 am
  • Editorial Team
    Editorial Team added an answer Are you sure you're assigning different IDs to the different… May 12, 2026 at 1:05 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.