[jboss-user] [EJB 3.0] - Re: Question on security
jaikiran
do-not-reply at jboss.com
Fri Jul 11 08:50:38 EDT 2008
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;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163852#4163852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163852
More information about the jboss-user
mailing list