[jboss-user] [JBoss AOP] New message: "Usage of pre-defined JBoss AOP security library."

MK Song do-not-reply at jboss.com
Tue Jan 12 20:34:44 EST 2010


User development,

A new message was posted in the thread "Usage of pre-defined JBoss AOP security library.":

http://community.jboss.org/message/519721#519721

Author  : MK Song
Profile : http://community.jboss.org/people/mksong

Message:
--------------------------------------------------------------
Hello, I would like to ask a question about the usage of pre-defined JBoss AOP security library.
To test it, I wrote a source code which includes a pre-defined annotation and a user-defined annotation: Permissions and Roles.
However, I got run-time-error attached. And I also attached the project-zip-file.
 
 
package bank;
import org.jboss.aspects.security.Permissions;
import org.jboss.aspects.security.SecurityDomain;;


*@SecurityDomain ("other")*
public class BankAccount 
{
   int accountNumber;
   int balance;
   
   public int getAccountNumber() {
      return accountNumber; 
   }
   
   public int getBalance() {
      return balance;
   }


   *@Permissions ({"AuthorizedUser"})      // org.jboss.aspects.security.Permissions*
   public void setAccountNumber(int accountNumber) {
    System.out.println("*** [success] : setAccountNumber");
      this.accountNumber = accountNumber; 
   }


   *@Roles(roles= {"admin"})     // bank.Roles*
   public void setBalance(int balance) {
    System.out.println("*** [success] : setBalance");
      this.balance = balance;
   }
}

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/519721#519721




More information about the jboss-user mailing list