Search code examples
jsfmanaged-bean

JSF @ManagedBean and @SessionScoped calling priority


Is there any difference in writing scope and bean annotation in any particular sequence in JSF ? For eg. see the below two declaration

@SessionScoped

@ManagedBean(name = "editEmployeeController")

or

@ManagedBean(name = "editEmployeeController")

@SessionScoped


Solution

  • No, it's the same. There isn't any priority. But this is best practice from oracle for the order. http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#orderoftags