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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:50:40+00:00 2026-06-03T18:50:40+00:00

I have two beans. First bean languageOfSystem: @Named(value = languageOfSystem) @SessionScoped public class LanguageOfSystem

  • 0

I have two beans. First bean languageOfSystem:

@Named(value = "languageOfSystem")
@SessionScoped
public class LanguageOfSystem implements Serializable {
   @Inject private JsfUtils eeJsfUtils;

and the second bean, userBb:

@Named(value = "userBb")
@SessionScoped
public class UserBb implements Serializable, LangUpdInterface {
   @EJB
   private EjbUtils ejbUtils;
   @EJB
   private PuserFacade puserFacade;
   @Inject
   private Direction direction;
   @Inject
   private PortfelDao portfelDao;
   @Inject
   private LanguageOfSystem languageOfSystem;

I inject languageOfSystem into userBb, and NetBeans IDE gives me warning in line with that injection:

no enabled eligible for injection beans are found

But I’m able to call methods from languageOfSystem in userBb and it works fine. So is this warning important and should I change smth?

And the second question. I use in this case observer design pattern, where userBb is dependent and languageOfSystem is the subject which has a list of dependents. I register userBb in subject list by calling appropriate method from languageOfSystem. Is it right when it comes to the two session beans?

  • 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-03T18:50:42+00:00Added an answer on June 3, 2026 at 6:50 pm

    But I’m able to call methods from languageOfSystem in userBb and it
    works fine.

    Your code does not look wrong – and it works. So this seems to be a Netbeans issues.

    And the second question. I use in this case observer design pattern,
    where userBb is dependent and languageOfSystem is the subject which
    has a list of dependents. I register userBb in subject list by calling
    appropriate method from languageOfSystem. Is it right when it comes to
    the two session beans?

    Are you aware that the CDI spec includes a powerful and typesafe implementation of the observer pattern? You definitely should check this out.

    And two more things to mention here:

    @Named(value = "languageOfSystem")
    @Named(value = "userBb")
    
    1. The value you are providing is already default. So you can leave it
      out and simply write @Named instead.
    2. Regarding the code you are posting: @Named is not required at all –
      all it does is providing an EL name for use in JSF. Your code will
      work just as good if you skip @Named altogether…
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a bean such as public class SimpleBean { private String name;
I have two almost identical Beans. Bean Item contains a unique identifier (primary key),
I have two Spring proxies set up: <bean id=simpleBean class=org.springframework.aop.framework.ProxyFactoryBean> <property name=target> <ref local=simpleBeanTarget/>
Suppose that I have two classes, first a class without any properties, fields or
I have following two methods in my backing bean - public String validateUser() {
I have two beans which comes from the same class(id1 and id2), the difference
Given I have a Spring bean configured as @Service(myService) public class DefaultService extends MyService
I have two drop downs on a page whose backing bean is Request Scoped.
I have a bean of type string[] which has two or more values. I
I have two arrays. Example of the first array: $arrayOne = array ( 'fruit'

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.