Skip to content

Commit 5ebd872

Browse files
committed
added correct scope annotation
included one line description
1 parent b050b37 commit 5ebd872

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cdi/scopes/src/main/java/org/javaee7/cdi/bean/scopes/MyApplicationScopedBean.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@
3939
*/
4040
package org.javaee7.cdi.bean.scopes;
4141

42-
import javax.enterprise.context.RequestScoped;
42+
import javax.enterprise.context.ApplicationScoped;
4343

4444
/**
4545
* @author Arun Gupta
46+
*
47+
* This class represents an Application Scoped CDI bean. Once injected, the container will hold on to the instance of this bean until
48+
* the application itself terminates (server restart/redeployment of the application).
4649
*/
47-
@RequestScoped
50+
@ApplicationScoped
4851
public class MyApplicationScopedBean {
4952
public String getID() {
5053
return this + "";

0 commit comments

Comments
 (0)