Examples of CommandManager


Examples of org.apache.excalibur.event.command.CommandManager

            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                threads = new TPCThreadManager();
                CommandManager commands = new CommandManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
                params.setParameter("force-shutdown", "false");
                params.makeReadOnly();
               
                ContainerUtil.enableLogging(threads, getLogger().getChildLogger("thread.manager"));
                ContainerUtil.parameterize(threads, params);
                ContainerUtil.initialize(threads);
               
                threads.register(commands);
               
                setup.put(Queue.ROLE, commands.getCommandSink());
               
                setup.makeReadOnly();
            } catch (Exception e) {
                getLogger().error("Could not set up the Command Manager", e);
            }
View Full Code Here

Examples of org.apache.excalibur.event.command.CommandManager

               
                ContainerUtil.enableLogging(this.threads, getLogger().getChildLogger("thread.manager"));
                ContainerUtil.parameterize(this.threads, params);
                ContainerUtil.initialize(this.threads);
               
                this.commands = new CommandManager();
                ContainerUtil.enableLogging(this.commands, getLogger().getChildLogger("thread.manager"));
                this.threads.register(this.commands);
               
                setup.put(Queue.ROLE, this.commands.getCommandSink());
               
View Full Code Here

Examples of org.d_haven.event.command.CommandManager

    }

    public void setUp() throws Exception
    {
        ThreadManager manager = new DefaultThreadManager();
        CommandManager commands = new DefaultCommandManager(manager);
        commands.start();

        m_config = new FortressConfig( FortressConfig.createDefaultConfig() );
        m_config.setCommandSink( new CommandSink(commands) );
        m_config.setContextClassLoader( FortressConfigTestCase.class.getClassLoader() );
        m_config.setInstrumentManager( new TestInstrumentManager() );
View Full Code Here

Examples of org.eclipse.core.commands.CommandManager

   * table/tree model, and the when combo.
   */
  private final void fill() {
    // Make an internal binding manager to track changes.
    localChangeManager = new BindingManager(new ContextManager(),
        new CommandManager());
    final Scheme[] definedSchemes = bindingService.getDefinedSchemes();
    try {
      for (int i = 0; i < definedSchemes.length; i++) {
        final Scheme scheme = definedSchemes[i];
        final Scheme copy = localChangeManager
View Full Code Here

Examples of org.eclipse.core.commands.CommandManager

     */
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        Command.DEBUG_COMMAND_EXECUTION = Policy.DEBUG_COMMANDS;
        commandManager = new CommandManager();
      }});
   
    final CommandService [] commandService = new CommandService[1];
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

View Full Code Here

Examples of org.eclipse.core.commands.CommandManager

  }

  private BindingManager getLocalChangeManager()
  {
    BindingManager manager =
      new BindingManager(new ContextManager(), new CommandManager());

    Scheme scheme = bindingService.getActiveScheme();
    try{
      try{
        manager.setActiveScheme(scheme);
View Full Code Here

Examples of org.eclipse.persistence.sessions.coordination.CommandManager

        CacheKey key = getCacheKeyForObjectForLock(primaryKey, theClass, descriptor);
        if (key != null) {
            key.setInvalidationState(CacheKey.CACHE_KEY_INVALID);
        }
        if (invalidateCluster) {
            CommandManager rcm = getSession().getCommandManager();
            if (rcm != null) {
                UnitOfWorkChangeSet changeSet = new UnitOfWorkChangeSet(getSession());
                ObjectChangeSet objectChangeSet = new ObjectChangeSet(primaryKey, descriptor, null, changeSet, false);
                objectChangeSet.setSynchronizationType(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
                changeSet.getAllChangeSets().put(objectChangeSet, objectChangeSet);
                MergeChangeSetCommand command = new MergeChangeSetCommand();
                command.setChangeSet(changeSet);
                try {
                    command.convertChangeSetToByteArray(getSession());
                } catch (java.io.IOException exception) {
                    throw CommunicationException.unableToPropagateChanges(command.getServiceId().getId(), exception);
                }
                rcm.propagateCommand(command);
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.sessions.coordination.CommandManager

        // This code has been added to allow validation to occur without actually calling createEntityManager
        // RCM refresh command requires the DEPLOY_ON_STARTUP property is set to true so the listener can be added to the session.
        try{
            if (newSetupImpl.shouldGetSessionOnCreateFactory(deployProperties)) {
                ServerSession session = getServerSession();
                CommandManager rcm = session.getCommandManager();
                if (rcm != null && newSetupImpl.shouldSendMetadataRefreshCommand(deployProperties)) {
                    MetadataRefreshCommand command = new MetadataRefreshCommand(properties);
                    rcm.propagateCommand(command);
                }
                session.setRefreshMetadataListener(newSetupImpl);
            }
        } catch (RuntimeException ex) {
            if(delegate != null) {
View Full Code Here

Examples of org.eclipse.persistence.sessions.coordination.CommandManager

        CacheKey key = getCacheKeyForObjectForLock(primaryKey, theClass, descriptor);
        if (key != null) {
            key.setInvalidationState(CacheKey.CACHE_KEY_INVALID);
        }
        if (invalidateCluster) {
            CommandManager rcm = getSession().getCommandManager();
            if (rcm != null) {
                UnitOfWorkChangeSet changeSet = new UnitOfWorkChangeSet(getSession());
                ObjectChangeSet objectChangeSet = new ObjectChangeSet(primaryKey, descriptor, null, changeSet, false);
                objectChangeSet.setSynchronizationType(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
                changeSet.getAllChangeSets().put(objectChangeSet, objectChangeSet);
                MergeChangeSetCommand command = new MergeChangeSetCommand();
                command.setChangeSet(changeSet);
                try {
                    command.convertChangeSetToByteArray(getSession());
                } catch (java.io.IOException exception) {
                    throw CommunicationException.unableToPropagateChanges(command.getServiceId().getId(), exception);
                }
                rcm.propagateCommand(command);
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.sessions.coordination.CommandManager

        CacheKey key = this.getCacheKeyForObjectForLock(primaryKey, theClass, descriptor);
        if (key != null) {
            key.setInvalidationState(CacheKey.CACHE_KEY_INVALID);
        }
        if (invalidateCluster) {
            CommandManager rcm = getSession().getCommandManager();
            if (rcm != null) {
                UnitOfWorkChangeSet changeSet = new UnitOfWorkChangeSet(getSession());
                ObjectChangeSet objectChangeSet = new ObjectChangeSet(primaryKey, descriptor, null, changeSet, false);
                objectChangeSet.setSynchronizationType(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS);
                changeSet.getAllChangeSets().put(objectChangeSet, objectChangeSet);
                MergeChangeSetCommand command = new MergeChangeSetCommand();
                command.setChangeSet(changeSet);
                try {
                    command.convertChangeSetToByteArray(getSession());
                } catch (java.io.IOException exception) {
                    throw CommunicationException.unableToPropagateChanges(command.getServiceId().getId(), exception);
                }
                rcm.propagateCommand(command);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.