Thursday, May 6, 2010

User principal is not propagated to Middle tier. New bug on (Fixed in

It may be strange that a new bug like that is introduced in a bug fixing release but it can happen to the best also.

After Migrating to jdeveloper you will notice that application module method getUserPrincipalName() return always ‘Anonymous’ and history columns for user are populated with null. Andrejus Baranovskis have posted about it, Steve Muench logged on Oracle Metalink - bug# 9672139 and a workaround is posted also in the comments that we also use and seams to solve the problem.
I post it also to follow upe with it.
On our base Application Module class we override the prepare session and:

protected void prepareSession(Session session) {
String contextUser = ADFContext.getCurrent().getSecurityContext().getUserName();
String envUser = (String)session.getEnvironment().get(PropertyMetadata.USER_PRINCIPAL.getName());
if (!envUser.equals(contextUser)) {


No comments:

Post a Comment