openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ymaraner <>
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"?>
  <role rolename="testrole"/>
  <user username="testuser" password="" roles="testrole"/>

I log into my client application using "testuser".

Within an EJB 2.1 session bean, I make the call: 
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:
Sent from the OpenEJB User mailing list archive at

View raw message