Package com.sun.enterprise.admin.event

Examples of com.sun.enterprise.admin.event.EventStack


        //String name = getInstanceName();
        AdminEvent event = null;
        EventBuilder builder = new EventBuilder();

        //XXX Can we put the following 4 lines be done in the EventBuilder?
        EventStack stack = EventContext.getEventStackFromThreadLocal();
        ConfigContext ctx = stack.getConfigContext();
        stack.setTarget(targetName);
        stack.setConfigChangeList(ctx.getConfigChangeList());

        try{
            if (eventType == BaseDeployEvent.APPLICATION_DEPLOYED)
            {
                event = builder.createApplicationDeployEvent(
View Full Code Here


                // ignore
            }
            //***********************************

        }
        EventStack stack = EventContext.getEventStackFromThreadLocal();
        List newEventList = stack.getEvents();
        newEventList.addAll(eventList);

        boolean requiresRestart = false;

        Iterator iter = newEventList.iterator();
        while (iter.hasNext()) {
            AdminEvent event = (AdminEvent)iter.next();
            if (_logger.isLoggable(Level.FINEST)) {
                _logger.log(Level.FINEST, "mbean.event_sent",
                        event.getEventInfo());
            } else {
                _logger.log(Level.INFO, "mbean.send_event", event.toString());
            }
            AdminEventResult result=AdminEventMulticaster.multicastEvent(event);
            _logger.log(Level.FINE, "mbean.event_res", result.getResultCode());
            _logger.log(Level.FINEST, "mbean.event_reply",
                    result.getAllMessagesAsString());
            if (!AdminEventResult.SUCCESS.equals(result.getResultCode())) {
                requiresRestart = true;
                cache.setRestartNeeded(true);
                // if there was an error in the listener, admin event
                // multicaster already sets the restart required to true
                //_logger.log(Level.INFO, "mbean.notif_failed");
            }

        }
        ServerContext svcCtx = ApplicationServer.getServerContext();
        PluggableFeatureFactory featureFactory = null;
        if (svcCtx != null) {
            featureFactory = svcCtx.getPluggableFeatureFactory();
           
            // see if there were any non reconfigurabled changes
            NotificationFactory nFactory =
                featureFactory.getNotificationFactory();
            RestartEventHelper helper = nFactory.createRestartEventHelper();
            helper.setRestartRequiredForTarget(context, changeList);
           
        }
        stack.resetEvents();
       
        return;
    }
View Full Code Here

    }
   
        private EventStack
    setupEventStack( final Integer startDepthInteger )
    {
        EventStack eventStack    = null;
        if ( EVENT_STACK_ISNT_POINTLESS )
        {
            if ( startDepthInteger.intValue() == 0 )
            {
                debug( "FlushConfigHook.setupEventStack(): startDepth = 0");
                eventStack = new EventStack();
                eventStack.setConfigContext( getAdminContext().getAdminConfigContext() );
                EventContext.setEventStackToThreadLocal(eventStack);
            }
            else
            {
                debug( "FlushConfigHook.setupEventStack(): startDepth = ", startDepthInteger);
View Full Code Here

                debug( "FlushConfigHook.invoke: ", operationName, "() START" );
                           
                final Integer startDepthInteger   = getDepth();
                final int startDepth = startDepthInteger.intValue();
                setDepth( startDepth == 0 ? INTEGER_1 : new Integer( startDepth + 1 ) );
                final EventStack eventStack    = setupEventStack( startDepthInteger );
               
                boolean success = false;
                try
                {
                    debug( "FlushConfigHook.invoke: ", operationName, "(): NEW EventStack");
View Full Code Here

        else
        {
            final Integer startDepthInteger   = getDepth();
            final int startDepth = startDepthInteger.intValue();
            setDepth( startDepth == 0 ? INTEGER_1 : new Integer( startDepth + 1 ) );
            final EventStack eventStack    = setupEventStack( startDepthInteger );
            boolean success = false;
            try
            {
                mDelegateMBeanServer.setAttribute( objectName, attribute );
                success = true;
View Full Code Here

        else
        {
            final Integer startDepthInteger   = getDepth();
            final int startDepth = startDepthInteger.intValue();
            setDepth( startDepth == 0 ? INTEGER_1 : new Integer( startDepth + 1 ) );
            final EventStack eventStack    = setupEventStack( startDepthInteger );
            boolean success = false;
            try
            {
                result  = mDelegateMBeanServer.setAttributes( objectName, attributeList );
                success = true;
View Full Code Here

    }

    public void preInvoke(CallStack callstack) {

        if (callstack.getStackSize() == 1) {
            EventStack stack = new EventStack();
            stack.setConfigContext(adminContext.getAdminConfigContext());
            EventContext.setEventStackToThreadLocal(stack);
        }

    }
View Full Code Here

        String name = getInstanceName();
        AdminEvent event = null;
        EventBuilder builder = new EventBuilder();

        //XXX Can we put the following 4 lines be done in the EventBuilder?
        EventStack stack = EventContext.getEventStackFromThreadLocal();
        ConfigContext ctx = stack.getConfigContext();
        stack.setTarget(targetName);
        stack.setConfigChangeList(ctx.getConfigChangeList());

        try{
            if (eventType == BaseDeployEvent.APPLICATION_DEPLOYED)
            {
                event = builder.createApplicationDeployEvent(
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.event.EventStack

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.