public final class EJBSecurityManager extends Object implements com.sun.enterprise.security.SecurityManager
| Constructor and Description |
|---|
EJBSecurityManager(EjbDescriptor ejbDescriptor,
org.glassfish.api.invocation.InvocationManager invMgr,
EJBSecurityManagerFactory fact) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authorize(org.glassfish.api.invocation.ComponentInvocation compInv)
This method is called by the EJB container to decide whether or not
a method specified in the Invocation should be allowed.
|
void |
destroy() |
Object |
doAsPrivileged(PrivilegedExceptionAction pea) |
Principal |
getCallerPrincipal()
This method returns the Client Principal who initiated the current
Invocation.
|
static String |
getContextID(EjbDescriptor ejbDesc) |
Subject |
getCurrentSubject()
This will return the subject associated with the current call.
|
boolean |
getUsesCallerIdentity() |
Object |
invoke(Method beanClassMethod,
boolean isLocal,
Object o,
Object[] oa)
This method is similiar to the runMethod, except it keeps the
semantics same as the one in reflection.
|
boolean |
isCallerInRole(String role)
This method returns a boolean value indicating whether or not the
caller is in the specified role.
|
void |
loadPolicyConfiguration(EjbDescriptor eDescriptor) |
void |
postInvoke(org.glassfish.api.invocation.ComponentInvocation inv)
This method is used by Message Driven Bean Container to remove
the run-as identity information that was set up using the
preSetRunAsIdentity method
|
void |
preInvoke(org.glassfish.api.invocation.ComponentInvocation inv)
This method is used by MDB Container - Invocation Manager to setup
the run-as identity information.
|
void |
resetPolicyContext() |
Object |
runMethod(Method beanClassMethod,
Object obj,
Object[] oa)
Runs a business method of an EJB within the bean's policy context.
|
public EJBSecurityManager(EjbDescriptor ejbDescriptor, org.glassfish.api.invocation.InvocationManager invMgr, EJBSecurityManagerFactory fact) throws Exception
Exceptionpublic boolean getUsesCallerIdentity()
public void loadPolicyConfiguration(EjbDescriptor eDescriptor) throws Exception
Exceptionpublic static String getContextID(EjbDescriptor ejbDesc)
public boolean authorize(org.glassfish.api.invocation.ComponentInvocation compInv)
authorize in interface com.sun.enterprise.security.SecurityManagercompInv - invocation object that contains all the details of the
invocation.public void preInvoke(org.glassfish.api.invocation.ComponentInvocation inv)
preInvoke in interface com.sun.enterprise.security.SecurityManagerpublic void postInvoke(org.glassfish.api.invocation.ComponentInvocation inv)
postInvoke in interface com.sun.enterprise.security.SecurityManagerpublic boolean isCallerInRole(String role)
isCallerInRole in interface com.sun.enterprise.security.SecurityManagerrole - role name in the form of java.lang.Stringpublic Principal getCallerPrincipal()
getCallerPrincipal in interface com.sun.enterprise.security.SecurityManagerpublic void destroy()
destroy in interface com.sun.enterprise.security.SecurityManagerpublic Subject getCurrentSubject()
getCurrentSubject in interface com.sun.enterprise.security.SecurityManagerpublic Object doAsPrivileged(PrivilegedExceptionAction pea) throws Throwable
doAsPrivileged in interface com.sun.enterprise.security.SecurityManagerThrowablepublic Object runMethod(Method beanClassMethod, Object obj, Object[] oa) throws Throwable
beanClassMethod - the EJB business methodobj - the EJB bean instanceoa - parameters passed to beanClassMethodInvocationTargetException - if the underlying method throws an exceptionThrowable - other throwables in other casespublic Object invoke(Method beanClassMethod, boolean isLocal, Object o, Object[] oa) throws Throwable
invoke in interface com.sun.enterprise.security.SecurityManagerbeanClassMethod, - the bean class method to be invokedisLocal, - true if this invocation is through the local EJB viewo - the object on which this method is to be
invoked in this case the ejb,oa - the parameters for the method,c, - the container instance
can be a null value, where in the container will be queried to
find its security manager.Throwablepublic void resetPolicyContext()
resetPolicyContext in interface com.sun.enterprise.security.SecurityManagerCopyright © 2015. All rights reserved.