openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ymaraner <tpha...@gmail.com>
Subject EJBContext.isCallerInRole(String rolename) always returns false for EJB2.1 beans
Date Tue, 07 Aug 2012 19:23:53 GMT
I'm using the default authentication in TomEE+ 1.0.0 which uses the
tomcat-users.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
  <role rolename="testrole"/>
  <user username="testuser" password="" roles="testrole"/>
</tomcat-users>

I log into my client application using "testuser".

Within an EJB 2.1 session bean, I make the call: 
   context.isCallerInRole("testrole");
   
This returns false

The client cannot connect to the application without specifying "testuser"
or with "testuser" removed from the tomcat-users.xml file so I am fairly
sure that the authentication is set up correctly.
Is there something that I need to do in my application to make it use the
roles defined in tomcat-users.xml? Are they not used by default?




--
View this message in context: http://openejb.979440.n4.nabble.com/EJBContext-isCallerInRole-String-rolename-always-returns-false-for-EJB2-1-beans-tp4656696.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message