Package com.sun.enterprise

Examples of com.sun.enterprise.ComponentInvocation


  // push this invocation on the stack
        v.add(inv);

  // Get the previous invocation on the stack
        int size = v.size();
  ComponentInvocation prev;
        if (size < 2)
      prev = null;
  else
      prev = (ComponentInvocation) v.get(size - 2);
View Full Code Here


//         throw new InvocationException();
//     }
      }

      // Get current and previous ComponentInvocation objects
      ComponentInvocation prev, curr;
      if (size < 2)
    prev = null;
      else
    prev = (ComponentInvocation)v.get(size - 2);
      curr = (ComponentInvocation)v.get(size - 1);
View Full Code Here

                            sg.setState(STARTING);
                            if (_logger.isLoggable(Level.FINE)) {
                               _logger.fine("Starting " + sg + " servicegroup with context :" + context);
                            }
                            notifyListener(STARTING, sg);
                            ComponentInvocation dummy = preInvoke();
                            try {
                                AccessController.doPrivileged
                                    (new PrivilegedExceptionAction() {
                                    public Object run() throws Exception {
                                        sg.start(context);
View Full Code Here

     * a container. Thread pools managed by that container should not
     * inherit the properties by the application, since both are unrelated.
     */
    private ComponentInvocation preInvoke() {
        InvocationManager im = Switch.getSwitch().getInvocationManager();
        ComponentInvocation dummy =
        new ComponentInvocation(ComponentInvocation.SERVICE_STARTUP);
        im.preInvoke(dummy);
        return dummy;
    }
View Full Code Here

        List invList = Switch.getSwitch().getInvocationManager().getAllInvocations();

        ResourceHandle h = null;
        for ( int j = invList.size(); j > 0; j-- ) {
            ComponentInvocation inv = (ComponentInvocation) invList.get( j - 1 );
            Object comp = inv.getInstance();

            List l = ((J2EETransactionManagerImpl)tm).getResourceList( comp, inv );
           
            ListIterator it = l.listIterator();
            while( it.hasNext()) {
View Full Code Here

     **/
    static EntityManagerFactory lookupEntityManagerFactory(String emfUnitName)
    {

        InvocationManager invMgr = Switch.getSwitch().getInvocationManager();
        ComponentInvocation inv  = invMgr.getCurrentInvocation();

        EntityManagerFactory emf = null;

        if( inv != null ) {

            Object descriptor =
                Switch.getSwitch().getDescriptorFor(inv.getContainerContext());

            emf = lookupEntityManagerFactory(inv.getInvocationType(),
                    emfUnitName, descriptor);
        }
       
        return emf;
    }
View Full Code Here

    }

    public void injectInstance(Object instance)
        throws InjectionException {

        ComponentInvocation inv = invocationMgr.getCurrentInvocation();
       
        if( inv != null ) {

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

            if( componentEnv != null ) {
                inject(instance.getClass(), instance, componentEnv, true);
            } else {
                throw new InjectionException("No descriptor registered for " +
View Full Code Here

    }

    public void invokeInstancePreDestroy(Object instance)
        throws InjectionException {

        ComponentInvocation inv = invocationMgr.getCurrentInvocation();
       
        if( inv != null ) {

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

            if( componentEnv != null ) {
                invokePreDestroy(instance.getClass(), instance, componentEnv);
            } else {
                throw new InjectionException("No descriptor registered for " +
View Full Code Here

            InvocationManager im = Switch.getSwitch().getInvocationManager();
            if(im == null) {
                // standalone client
                alias = mgr.chooseClientAlias(keyType, issuers, socket);
            } else {
                ComponentInvocation ci = im.getCurrentInvocation();
               
                if (ci == null) {       // 4646060
                    throw new InvocationException();
                }
               
                Object containerContext = ci.getContainerContext();
                if(containerContext != null &&
                (containerContext instanceof AppContainer)) {
                   
                    ClientSecurityContext ctx = ClientSecurityContext.getCurrent();
                    Subject s = ctx.getSubject();
View Full Code Here

        // return the singleton ORB instance
        return ORBManager.getORB();
    }
    else if ( fullName.equals(USER_TX) ) {
        InvocationManager invMgr = Switch.getSwitch().getInvocationManager();
        ComponentInvocation inv = null;
        if (invMgr != null) {
            inv = invMgr.getCurrentInvocation();
        }
        if ((inv != null) && (inv.container != null)) {
            if (inv.container instanceof BaseContainer) {
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.