0

I've a list of users used, with a managed bean noted with @ApplicationScoped; The problème is when i check my list i've founded something weird. there is a difference between when i access with the both adresses :: localhost:8080/myAPP and 127.0.0.1:8080/myAPP

bilelovitch
  • 1,975
  • 1
  • 16
  • 24

1 Answers1

0

The problem is caused by importing from the wrong package. If you try a refresh on either localhost:8080/myAPP or 127.0.0.1:8080/myAPP you should see that the bean instance changes everytime, even on the same hostname.

You have to import javax.enterprise.context.ApplicationScoped to make it work.

See also:

Community
  • 1
  • 1
unwichtich
  • 13,712
  • 4
  • 53
  • 66