org.glassfish.ejb.security
Class EJBSecurityUtil

java.lang.Object
  extended by org.glassfish.ejb.security.EJBSecurityUtil

public class EJBSecurityUtil
extends java.lang.Object

Author:
Mahesh Kannan Date: Jul 6, 2008

Constructor Summary
EJBSecurityUtil()
           
 
Method Summary
static java.lang.Object invoke(java.lang.reflect.Method beanClassMethod, EjbInvocation inv, java.lang.Object o, java.lang.Object[] oa, EJBSecurityManager ejbSecMgr)
          This method is similiar to the runMethod, except it keeps the semantics same as the one in reflection.
static java.lang.Object runMethod(java.lang.reflect.Method beanClassMethod, EjbInvocation inv, java.lang.Object o, java.lang.Object[] oa, EJBSecurityManager mgr)
          This method is called from the generated code to execute the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBSecurityUtil

public EJBSecurityUtil()
Method Detail

invoke

public static java.lang.Object invoke(java.lang.reflect.Method beanClassMethod,
                                      EjbInvocation inv,
                                      java.lang.Object o,
                                      java.lang.Object[] oa,
                                      EJBSecurityManager ejbSecMgr)
                               throws java.lang.Throwable
This method is similiar to the runMethod, except it keeps the semantics same as the one in reflection. On failure, if the exception is caused due to reflection, it returns the InvocationTargetException. This method is called from the containers for ejbTimeout, WebService and MDBs.

Parameters:
beanClassMethod, - the bean class method to be invoked
inv, - the current invocation
o, - the object on which this method is to be invoked in this case the ejb,
oa, - the parameters for the method,
ejbSecMgr, - security manager for this container, can be a null value, where in the container will be queried to find its security manager.
Returns:
Object, the result of the execution of the method.
Throws:
java.lang.Throwable

runMethod

public static java.lang.Object runMethod(java.lang.reflect.Method beanClassMethod,
                                         EjbInvocation inv,
                                         java.lang.Object o,
                                         java.lang.Object[] oa,
                                         EJBSecurityManager mgr)
                                  throws java.lang.Throwable
This method is called from the generated code to execute the method. This is a translation of method.invoke that the generated code needs to do, to invoke a particular ejb method. The method is invoked under a security Subject. This method is called from the generated code.

Parameters:
Method - beanClassMethod, the bean class method to be invoked
Invocation - inv, the current invocation object
Object - o, the object on which this method needs to be invoked,
Object[] - oa, the parameters to the methods,
Container - c, the container from which the appropriate subject is queried from.
Throws:
java.lang.Throwable


Copyright © 2012 GlassFish Community. All Rights Reserved.