// If ejb, use isCallerInRole
if (isContainerContextAEJBContainerObject() && roleName == null) {
ComponentInvocation componentInvocation =
ConnectorRuntime.getRuntime().getInvocationManager().getCurrentInvocation();
EJBInvocation ejbInvocation = (EJBInvocation) componentInvocation;
EJBContext ejbcontext = ejbInvocation.getEJBContext();
Set<Map.Entry> s = (Set<Map.Entry>) groupNameSecurityMap.entrySet();
Iterator i = s.iterator();
while(i.hasNext()) {
Map.Entry mapEntry = (Map.Entry) i.next();
String key = (String) mapEntry.getKey();
Principal entry = (Principal) mapEntry.getValue();
boolean isInRole = false;
try {
isInRole = ejbcontext.isCallerInRole(key);
} catch (Exception ex) {
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "BasicPasswordAuthentication::caller not in role " + key);
}
}