• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to use @RolesAllowed on plain classes or it is just for EJB?  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can we use the @RolesAllowed on a Java class which we use in an EJB or it is only available to be places on EJB themselves.

thanks.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36393
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB, annotations are only valid on EJB classes. (And servlet classes). They are not used on regular classes because those are not container managed.
 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply. It was helpful to know only managed classes can be annotated using the EJB related annotations.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!