JBoss Community

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

created by Krister Wicksell in EJB3 - View the full discussion

Hi,

 

I have a stateless bean that I access both from within JBoss via the web container and also from outside JBoss via a remote interface. When I access the bean from within JBoss SessionContext.isCallerInRole(...) works fine but when accessed from the outside of JBoss SessionContext.isCallerInRole(...) always return false.

 

This works fine in JBoss 4 but when I updated and ported my code to JBoss 6 it stopped working. I also tested in JBoss 5 without success.

 

I have attached a a small test case for both JBoss 4.2.3 and JBoss 6.0.0. When accessing the TestBean from index.jsp it always work but when accessing it by executing TestClient from outside of JBoss it do not work for JBoss 6.

 

What am I doing wrong or is this a bug?

Reply to this message by going to Community

Start a new discussion in EJB3 at Community