Examples of RunnableManager


Examples of org.apache.cocoon.components.thread.RunnableManager

        // create a thread that invalidates the continuations
        final Configuration expireConf = config.getChild("expirations-check");
        final long initialDelay = expireConf.getChild("offset", true).getValueAsLong(180000);
        final long interval = expireConf.getChild("period", true).getValueAsLong(180000);
        try {
            final RunnableManager runnableManager = (RunnableManager)serviceManager.lookup(RunnableManager.ROLE);
            runnableManager.execute( new Runnable() {
                    public void run()
                    {
                        expireContinuations();
                    }
                }, initialDelay, interval);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

            if( getLogger(  ).isDebugEnabled(  ) )
            {
                getLogger(  ).debug( "(Re-)Start CocoonStoreJaitor" );
            }

            final RunnableManager runnableManager =
                (RunnableManager)m_serviceManager.lookup( RunnableManager.ROLE );
            runnableManager.execute( this, delay, 0 );
            m_serviceManager.release( runnableManager );
        }
        catch( final ServiceException se )
        {
            throw new CascadingRuntimeException( "Cannot lookup RunnableManager",
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

       
        final Configuration expireConf = config.getChild("expirations-check");
        final long initialDelay = expireConf.getChild("offset", true).getValueAsLong(180000);
        final long interval = expireConf.getChild("period", true).getValueAsLong(180000);
        try {
            final RunnableManager runnableManager = (RunnableManager)serviceManager.lookup(RunnableManager.ROLE);
            runnableManager.execute( new Runnable() {
                    public void run()
                    {
                        expireContinuations();
                    }
                }, initialDelay, interval);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

        m_serviceManager = serviceManager;
    }

    /** Start the server */
    public void start() {
        RunnableManager runnableManager = null;
        try {
            runnableManager = (RunnableManager) m_serviceManager.lookup(RunnableManager.ROLE);
            runnableManager.execute(m_daemonThreadPoolName, this);
        } catch(final ServiceException e) {
            throw new CascadingRuntimeException("Cannot get RunnableManager", e);
        } finally {
            if (null != runnableManager) {
                m_serviceManager.release(runnableManager);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

            try {
               
                if ( timeout != null ) {
                    final int milli = timeout.intValue() * 1000;
                    LoaderThread loader = new LoaderThread(this, coplet, buffer);
                    final RunnableManager runnableManager = (RunnableManager)this.manager.lookup( RunnableManager.ROLE );
                    runnableManager.execute( loader );
                    this.manager.release( runnableManager );
                    try {
                        read = loader.join( milli );
                    } catch (InterruptedException ignore) {
                        // ignored
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

                        this.getLogger().debug("Booting preemptive loader: " + this.preemptiveLoaderURI);
                    }
                    PreemptiveBooter thread = new PreemptiveBooter( this.preemptiveLoaderURI );
                    try
                    {
                        final RunnableManager runnableManager = (RunnableManager)this.manager.lookup( RunnableManager.ROLE );
                        runnableManager.execute( thread );
                        this.manager.release( runnableManager );
                    }
                    catch( final ServiceException se )
                    {
                        getLogger().error( "Cannot lookup RunnableManager", se );
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

        // create a thread that invalidates the continuations
        final Configuration expireConf = config.getChild("expirations-check");
        final long initialDelay = expireConf.getChild("offset", true).getValueAsLong(180000);
        final long interval = expireConf.getChild("period", true).getValueAsLong(180000);
        try {
            final RunnableManager runnableManager = (RunnableManager)serviceManager.lookup(RunnableManager.ROLE);
            runnableManager.execute( new Runnable() {
                    public void run()
                    {
                        expireContinuations();
                    }
                }, initialDelay, interval);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager


            public IncludeBuffer(IncludeElement element) {
                this.element = element;

                RunnableManager runnable = null;
                try {
                    runnable = (RunnableManager) IncludeTransformer.this.manager.lookup(RunnableManager.ROLE);
                    runnable.execute(IncludeTransformer.this.threadPool, this);
                } catch (final ServiceException e) {
                    // In case we failed to spawn a thread
                    throw new CascadingRuntimeException(e.getMessage(), e);
                } finally {
                    IncludeTransformer.this.manager.release(runnable);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

        m_serviceManager = serviceManager;
    }

    /** Start the server */
    public void start() {
        RunnableManager runnableManager = null;
        try {
            runnableManager = (RunnableManager) m_serviceManager.lookup(RunnableManager.ROLE);
            runnableManager.execute(m_daemonThreadPoolName, this);
        } catch(final ServiceException e) {
            throw new CascadingRuntimeException("Cannot get RunnableManager", e);
        } finally {
            if (null != runnableManager) {
                m_serviceManager.release(runnableManager);
View Full Code Here

Examples of org.apache.cocoon.components.thread.RunnableManager

            try {
               
                if ( timeout != null ) {
                    final int milli = timeout.intValue() * 1000;
                    LoaderThread loader = new LoaderThread(this, coplet, buffer);
                    final RunnableManager runnableManager = (RunnableManager)this.manager.lookup( RunnableManager.ROLE );
                    try {
                        runnableManager.execute( new CocoonRunnable(loader) );
                    } finally {
                        this.manager.release( runnableManager );
                    }
                    try {
                        read = loader.join( milli );
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.