File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Security in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Security in EJB" Watch "Security in EJB" New topic

Security in EJB

Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385

i was going through one of web site and came across the following code.

Why do we need to use DeclareRoles annotation in the above code?

I thought we would be using this annotatation only when we use programmatic security,but as we can clearly see there is no such a code ?

Also if container can built up a role by inspecting the RolesAllowed annotation why do we need to use DeclareRoles in the code?



Failure is not an option.
I agree. Here's the link:
subject: Security in EJB
It's not a secret anymore!