Package com.sun.enterprise

Examples of com.sun.enterprise.ComponentInvocation


     * the user.
     * @return the main class of the application.
     */
    public String preInvoke(InitialContext ic, ClassLoader loader) throws Exception
    {
  ComponentInvocation ci = new ComponentInvocation(null, this);

  sw.getInvocationManager().preInvoke(ci);
  
  String mainClass = descriptor.getMainClassName();
  sw.setDescriptorFor(this, descriptor);
View Full Code Here


     * the run-as identity information that was set up using the
     * preSetRunAsIdentity method
     */
    public void postInvoke (ComponentInvocation inv){
  if (runAs != null && inv.preInvokeDone){
            final ComponentInvocation finv = inv;
            AppservAccessController.doPrivileged(new PrivilegedAction() {
                public Object run() {
                    SecurityContext.setCurrent (finv.getOldSecurityContext());
                    return null;
                }
            });
  }
    }
View Full Code Here

  EJBRoleRefPermission ejbrr = new EJBRoleRefPermission(ejbName, role);

   SecurityContext sc;
  if (runAs != null) {
      InvocationManager im = theSwitch.getInvocationManager();
      ComponentInvocation ci = im.getCurrentInvocation();
      sc = ci.getOldSecurityContext();
  } else {
      sc = SecurityContext.getCurrent();
  }
   Set principalSet = null;
   if (sc != null) principalSet = sc.getPrincipalSet();
View Full Code Here

  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();
View Full Code Here

     * @throws InjectionException if we're unable to obtain the
     *  <code>JndiNameEnvironment</code>
     */
    private JndiNameEnvironment getNamingEnvironment()
         throws InjectionException {
        ComponentInvocation inv = invokeMgr.getCurrentInvocation();

        if (inv != null) {

            JndiNameEnvironment componentEnv = (JndiNameEnvironment)
                 theSwitch.getDescriptorFor(inv.getContainerContext());

            if (componentEnv != null) {
                return componentEnv;
            } else {
                throw new InjectionException("No descriptor registered for " + " current invocation : " + inv);
View Full Code Here

     * @throws InjectionException if we're unable to obtain the
     *  <code>JndiNameEnvironment</code>
     */
    private JndiNameEnvironment getNamingEnvironment()
         throws InjectionException {
        ComponentInvocation inv = invokeMgr.getCurrentInvocation();

        if (inv != null) {

            JndiNameEnvironment componentEnv = (JndiNameEnvironment)
                 theSwitch.getDescriptorFor(inv.getContainerContext());

            if (componentEnv != null) {
                return componentEnv;
            } else {
                throw new InjectionException("No descriptor registered for " + " current invocation : " + inv);
View Full Code Here

     * @throws InjectionException if we're unable to obtain the
     *  <code>JndiNameEnvironment</code>
     */
    private JndiNameEnvironment getNamingEnvironment()
         throws InjectionException {
        ComponentInvocation inv = invokeMgr.getCurrentInvocation();

        if (inv != null) {

            JndiNameEnvironment componentEnv = (JndiNameEnvironment)
                 theSwitch.getDescriptorFor(inv.getContainerContext());

            if (componentEnv != null) {
                return componentEnv;
            } else {
                throw new InjectionException("No descriptor registered for " + " current invocation : " + inv);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ComponentInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.