return invocation.invokeNext();
SecurityContext prevSC = SecurityActions.getSecurityContext();
SecurityContext invSC = (SecurityContext) invocation.getMetaData("security","context");
SecurityDomain domain = container.getAnnotation(SecurityDomain.class);
boolean domainExists = domain != null && domain.value() != null
&& domain.value().length() > 0;
/**
* TODO: Decide if you want to allow zero security based on non-availability
* of a security domain, as per the configuration on the container
*/
if(domainExists)
{
String domainValue = canonicalizeSecurityDomain(domain.value());
/* Need to establish the security context. For local calls, we pick the outgoing runas
* of the existing sc. For remote calls, we create a new security context with the information
* from the invocation sc
*/