Hi Pavani Sharma Nookala,
Welcome to Javaranch!
Pavani Sharma Nookala wrote:
I would like for the admin also to access the home method.
I do not want to declare admin role on the method.
First of all: why don't you want that?
An annotation on a method overrides the annotation on the class.
From the
EJB specs:
Specifying the RolesAllowed or PermitAll or DenyAll annotation on the bean class means that it applies to all applicable business methods of the class.
Method permissions may be specified on a method of the bean class to override the method permissions value specified on the bean class.
Regards,
Frits