@Singleton
is not part of the CDI specification. It is part of EJB and javax.inject
(JSR-330). It is not mentioned in the spec what is its behaviour, so you can only rely on what’s written in the Weld documentation.
More Related Contents:
- Why can't we declare variables in if statement?
- Why use @PostConstruct?
- Java EE 6 @javax.annotation.ManagedBean vs. @javax.inject.Named vs. @javax.faces.ManagedBean
- Error: ‘else’ without ‘if’
- In Java, are enum types inside a class static?
- Spring Java Config: how do you create a prototype-scoped @Bean with runtime arguments?
- Declaring and initializing variables within Java switches
- What is the difference between a local variable, an instance field, an input parameter, and a class field?
- Java, “Variable name” cannot be resolved to a variable
- Should I use @EJB or @Inject
- How do I create a static local variable in Java?
- What do curly braces in Java mean by themselves?
- Problems with local variable scope. How to solve it?
- How to programmatically inject a Java CDI managed bean into a local variable in a (static) method
- Using variables outside of an if-statement
- Why is it not possible to shadow a local variable in a loop?
- Accessing a static variable via an object reference in Java
- CDI: beans.xml, where do I put you?
- Changing array in method changes array outside [duplicate]
- Field.get(obj) returns all nulls on injected CDI managed beans, while manually invoking getters return correct values
- I can pass a variable from a JSP scriptlet to JSTL but not from JSTL to a JSP scriptlet without an error
- Why use constructor over setter injection in CDI?
- How to create a modular JSF 2.0 application?
- What is the default scope of a method in Java?
- JEE7: Do EJB and CDI beans support container-managed transactions?
- Why can’t variables be declared in an if statement?
- Java local variable visibility in anonymous inner classes – why is ‘final’ keyword required?
- Injecting a Spring bean using CDI @Inject
- How to enable CDI inject in web service (jaxrs/jersey) on java se running grizzly?
- Servlet redirect to same page with error message