setProperty( Environment.JACC_CONTEXTID, contextId );
int roleStart = HibernatePersistence.JACC_PREFIX.length() + 1;
for ( String key : keys ) {
JACCConfiguration jaccCfg = new JACCConfiguration( contextId );
try {
String role = key.substring( roleStart, key.indexOf( '.', roleStart ) );
int classStart = roleStart + role.length() + 1;
String clazz = key.substring( classStart, key.length() );
String actions = (String) properties.get( key );
jaccCfg.addPermission( role, clazz, actions );
}
catch (IndexOutOfBoundsException e) {
throw new PersistenceException( getExceptionHeader(workingVars) +
"Illegal usage of " + HibernatePersistence.JACC_PREFIX + ": " + key );
}