JBoss Community

Re: Can't get SessionContext.isCallerInRole(...) to work from remote call.

created by Wolfgang Knauf in EJB3 - View the full discussion

Hi,

 

this seems to be fine and should work....

 

One idea: which "imports" statement do you use for the annotation "@SecurityDomain"? As far as I know, JBoss contains a class named "SecurityDomain" in two different packages, but only one will work. It should be "org.jboss.ejb3.annotation.SecurityDomain".

 

In my own (really simple) security sample, there is one difference: I did not place the "@Remote (Test.class)" annotation on the EJB itself, but on the interface, and without the class name as value:

 

@Stateless

@SecurityDomain("zert")

@DeclareRoles({"administrator", "producer", "consumer"})

public class TestBean implements Test {

 

@Remote

public interface Test {

 

 

Best regards

 

Wolfgang

Reply to this message by going to Community

Start a new discussion in EJB3 at Community