Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does Security annotations work only with EJB

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was doing enthuware exams and I get across this

" The root resource class is not an EJB, therefore role-based security does not work "

So it means annotations like @RolesAllowed, @DenyAll, @PermitAll only work when its used with EJB.

So simply saying below on a jersey root resource class will not work , it must be annotated with either @Stateless or @Singleton

@Path("somepath")
@RolesAllowed("student")

Need some clarity
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So it means annotations like @RolesAllowed, @DenyAll, @PermitAll only work when its used with EJB.

Correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic