[jboss-cvs] JBossAS SVN: r72682 - trunk/server/src/main/org/jboss/ejb/plugins.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 24 12:28:05 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-24 12:28:05 -0400 (Thu, 24 Apr 2008)
New Revision: 72682
Modified:
trunk/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
Log:
log the exception
Modified: trunk/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java 2008-04-24 16:27:22 UTC (rev 72681)
+++ trunk/server/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java 2008-04-24 16:28:05 UTC (rev 72682)
@@ -162,7 +162,6 @@
catch (NoSuchMethodException ignore)
{
}
- //Authorization Framework changes
if(securityManager != null)
{
appSecurityDomain = securityManager.getSecurityDomain();
@@ -180,6 +179,17 @@
super.start();
authenticationObserver =
(AuthenticationObserver) Registry.lookup(AuthenticationObserver.KEY);
+
+ //Take care of hot deployed security domains
+ if(container != null)
+ {
+ securityManager = container.getSecurityManager();
+ if(securityManager != null)
+ {
+ appSecurityDomain = securityManager.getSecurityDomain();
+ appSecurityDomain = SecurityUtil.unprefixSecurityDomain(appSecurityDomain);
+ }
+ }
}
public Object invokeHome(Invocation mi) throws Exception
@@ -194,8 +204,16 @@
RunAs callerRunAsIdentity = sc.getIncomingRunAs();
// Authenticate the subject and apply any declarative security checks
- checkSecurityContext(mi, callerRunAsIdentity);
-
+ try
+ {
+ checkSecurityContext(mi, callerRunAsIdentity);
+ }
+ catch(Exception e)
+ {
+ log.error("Error in Security Interceptor",e);
+ throw e;
+ }
+
/**
* Special case: if <use-caller-identity> configured and
* the caller is arriving with a run-as, we need to push that run-as
@@ -235,7 +253,15 @@
RunAs callerRunAsIdentity = sc.getIncomingRunAs();
// Authenticate the subject and apply any declarative security checks
- checkSecurityContext(mi, callerRunAsIdentity);
+ try
+ {
+ checkSecurityContext(mi, callerRunAsIdentity);
+ }
+ catch(Exception e)
+ {
+ log.error("Error in Security Interceptor",e);
+ throw e;
+ }
/**
* Special case: if <use-caller-identity> configured and
More information about the jboss-cvs-commits
mailing list