Package org.apache.qpid.server.logging

Examples of org.apache.qpid.server.logging.NullRootMessageLogger


    }

    public void testThreadNameIsSetForDurationOfTask() throws Exception
    {
        //create and set a test actor
        LogActor testActor = new TestLogActor(new NullRootMessageLogger());
        CurrentActor.set(testActor);

        String originalThreadName = Thread.currentThread().getName();

        String vhostName = "HouseKeepingTaskTestVhost";
View Full Code Here


        // test, but the extra actors the test broker adds will so by stopping
        // we remove the session actor and so all is good.
        stopBroker();
       
        AMQPConnectionActor connectionActor = new AMQPConnectionActor(getSession(),
                                                                      new NullRootMessageLogger());

        /*
         * Push the actor on to the stack:
         *
         *  CurrentActor -> Connection
         *       Stack   -> null
         */
        CurrentActor.set(connectionActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());

        // Verify it was the same actor as we set earlier
        assertEquals("Retrieved actor is not as expected ",
                     connectionActor, CurrentActor.get());

        /**
         * Set the actor to now be the Channel actor so testing the ability
         * to push the actor on to the stack:
         *
         *  CurrentActor -> Channel
         *       Stack   -> Connection, null
         *
         */

        AMQChannel channel = new AMQChannel(getSession(), 1, getSession().getVirtualHost().getMessageStore());

        AMQPChannelActor channelActor = new AMQPChannelActor(channel,
                                                             new NullRootMessageLogger());

        CurrentActor.set(channelActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());
View Full Code Here

            //fixme reminder that we need a better approach for broker testing.
            try
            {

                AMQPConnectionActor actor = new AMQPConnectionActor(getSession(),
                                                                    new NullRootMessageLogger());

                CurrentActor.set(actor);

                //Use the Actor to send a simple message
                sendTestLogMessage(CurrentActor.get());
View Full Code Here

        // test, but the extra actors the test broker adds will so by stopping
        // we remove the session actor and so all is good.
        stopBroker();
       
        AMQPConnectionActor connectionActor = new AMQPConnectionActor(getSession(),
                                                                      new NullRootMessageLogger());

        /*
         * Push the actor on to the stack:
         *
         *  CurrentActor -> Connection
         *       Stack   -> null
         */
        CurrentActor.set(connectionActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());

        // Verify it was the same actor as we set earlier
        assertEquals("Retrieved actor is not as expected ",
                     connectionActor, CurrentActor.get());

        /**
         * Set the actor to now be the Channel actor so testing the ability
         * to push the actor on to the stack:
         *
         *  CurrentActor -> Channel
         *       Stack   -> Connection, null
         *
         */

        AMQChannel channel = new AMQChannel(getSession(), 1, getSession().getVirtualHost().getMessageStore());

        AMQPChannelActor channelActor = new AMQPChannelActor(channel,
                                                             new NullRootMessageLogger());

        CurrentActor.set(channelActor);

        //Use the Actor to send a simple message
        sendTestLogMessage(CurrentActor.get());
View Full Code Here

            try
            {
                LogActor defaultActor = CurrentActor.get();

                AMQPConnectionActor actor = new AMQPConnectionActor(getSession(),
                                                                    new NullRootMessageLogger());

                CurrentActor.set(actor);

                //Use the Actor to send a simple message
                sendTestLogMessage(CurrentActor.get());
View Full Code Here

    }

    @Override
    public void initialise() throws Exception
    {
        CurrentActor.setDefault(new BrokerActor(new NullRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(new NullRootMessageLogger());
        LoggingManagementFacade.configure("test-profiles/log4j-test.xml");

        super.initialise();
    }
View Full Code Here

            {
                performDBBackup(fromDir, backupDir, force);
            }
        }

        CurrentActor.set(new BrokerActor(new NullRootMessageLogger()));

        //Create a new messageStore
        _newMessageStore = new BDBMessageStore();
        _newMessageStore.configure(toDir, false);
        _newMessageStore.start();
View Full Code Here

     * before task execution is the CurrentActor after execution.
     */
    public void testCurrentActorStackBalance() throws Exception
    {
        //create and set a test actor
        LogActor testActor = new TestLogActor(new NullRootMessageLogger());
        CurrentActor.set(testActor);

        //verify it is returned correctly before executing a HouseKeepingTask
        assertEquals("Expected LogActor was not returned", testActor, CurrentActor.get());

View Full Code Here

    }

    @Override
    public void initialise() throws Exception
    {
        CurrentActor.setDefault(new BrokerActor(new NullRootMessageLogger()));
        GenericActor.setDefaultMessageLogger(new NullRootMessageLogger());
        super.initialise();
    }
View Full Code Here

     * before task execution is the CurrentActor after execution.
     */
    public void testCurrentActorStackBalance() throws Exception
    {
        //create and set a test actor
        LogActor testActor = new TestLogActor(new NullRootMessageLogger());
        CurrentActor.set(testActor);

        //verify it is returned correctly before executing a HouseKeepingTask
        assertEquals("Expected LogActor was not returned", testActor, CurrentActor.get());

View Full Code Here

TOP

Related Classes of org.apache.qpid.server.logging.NullRootMessageLogger

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.