if (runAs != null){ // Run As
/* return the principal associated with the old security
* context
*/
InvocationManager im = theSwitch.getInvocationManager();
ComponentInvocation ci = im.getCurrentInvocation();
if (ci == null) {
throw new InvocationException(); // 4646060
}
sc = ci.getOldSecurityContext();
} else{
// lets optimize a little. no need to look up oldsecctx
// its the same as the new one
sc = SecurityContext.getCurrent();