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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:25:39+00:00 2026-05-15T11:25:39+00:00

could some explain what a none scope is and purpose of it? Suppose if

  • 0

could some explain what a none scope is and purpose of it?

Suppose if i have a bean in

request scope as r1

session scope as s1

application scope a1

and say i inject none scope bean n1 in to each of above scopes then i find that n1 gets
instantiated for each parent bean when ever its parent bean[r1/s1/a1] is instantiated.

none scope bean in a1 is available throughout in a1 since a1 is appl scope.
none scope bean in s1 is available only until s1 is not destroyed and when s1 is created
again n1 is instanciated and made available to it.

Is it correct?

and what the purpose of using it? only to avoid creating such bean our self?

many thanks

  • 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-15T11:25:39+00:00Added an answer on May 15, 2026 at 11:25 am

    A bean with a <managed-bean-scope> of none or a @NoneScoped annotation will be created on every single EL expression referencing the bean. It isn’t been stored by JSF anywhere. The caller has got to store the evaluated reference itself, if necessary.

    E.g. the following in the view

    <p>#{noneScopedBean.someProperty}</p>
    <p>#{noneScopedBean.someProperty}</p>
    <p>#{noneScopedBean.someProperty}</p>
    

    on a none-scoped bean will construct the bean 3 (three) times during a request. Every access to the bean gives a completely separate bean which is been garbaged immediately after the property access.

    However, the following in for example a session scoped bean

    @ManagedProperty("#{noneScopedBean}")
    private NoneScopedBean noneScopedBean;
    

    will make it to live as long as the session scoped bean instance. You should only make sure that you access it in the view by #{sessionScopedBean.noneScopedBean.someProperty} instead.

    So it may be useful when you want scope-less data being available as a managed property in an arbitrary bean.

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

Sidebar

Related Questions

Could some one explain me this while loop? while (list($key, $value) = each($HTTP_GET_VARS)) {
Could someone please explain this weird phenomenon: http://jsfiddle.net/sPA2V/ For some reason, the box footer
I could use some help with expression conversion. I have a method on a
I have some simple HTML: <div id=selectorContainer> <div id=chainedSelector style=display: none;><% Html.RenderPartial(ProjectSuggest/ChainedProjectSelector); %></div> <div
Could some explain how call back methods work, and if possible, give me an
We have a C# .Net client application that sends some commands via REST over
could some body explain me abstraction and interface in asp.net, C# by taking an
Could some explain it. This didn't helped me: http://www.khronos.org/opengles/documentation/opengles1_0/html/glEnable.html
Could some one explain me how to run a C program from a php
Could some body explain me caching in asp.net? I am just confused on the

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.