This content has been marked as final.
Show 1 reply
-
1. Re: Question on security
jaikiran Jul 11, 2008 8:50 AM (in response to kgoedert)Using the @SecurityDomain and @RolesAllowed, you can restrict the method access. Here's an example:
@Stateless @Remote( { UserManagerRemote.class }) @Local (UserManagerLocal.class) @RemoteBinding(jndiBinding = "RemoteUserManagerBean") @SecurityDomain (value="other") public class UserManagerBean implements UserManagerLocal, UserManagerRemote { @RolesAllowed (value="admin") public User getUser(long id) { System.out.println("Bean method successfully called"); // do something return user; } }