Package org.apache.myfaces.orchestra.frameworkAdapter.local

Examples of org.apache.myfaces.orchestra.frameworkAdapter.local.LocalFrameworkAdapter


public class TestRequestParameterProviderManager extends TestCase
{
    public void testParameterAdding()
    {
        LocalFrameworkAdapter lfa = new LocalFrameworkAdapter();
        lfa.setConversationMessager(new LogConversationMessager());
        lfa.setRequestAttribute(RequestParameterServletFilter.REQUEST_PARAM_FILTER_CALLED, Boolean.TRUE);
        FrameworkAdapter.setCurrentInstance(lfa);
        RequestParameterProviderManager man = RequestParameterProviderManager.getInstance();
        man.register(new RequestParameterProvider()
        {
View Full Code Here


    protected void onSetUp() throws Exception
    {
        super.onSetUp();

        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);
    }
View Full Code Here

    protected void onSetUp() throws Exception
    {
        super.onSetUp();

        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);
    }
View Full Code Here

        try
        {
            // Always use a fresh FrameworkAdapter to avoid OrchestraException
            // "Cannot remove current context" when a request calls session.invalidate();
            // we want getRequestParameter and related functions to always return null..
            FrameworkAdapter fa = new LocalFrameworkAdapter();
            ConversationMessager conversationMessager = new LogConversationMessager();
            fa.setConversationMessager(conversationMessager);
            FrameworkAdapter.setCurrentInstance(fa);
   
            conversationWiperThread.removeConversationManager(cm);
            cm.removeAndInvalidateAllConversationContexts();
        }
View Full Code Here

    protected void onSetUp() throws Exception
    {
        super.onSetUp();

        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);
    }
View Full Code Here

    }
   
    public void testFoo() throws Exception {

        // Set up the FrameworkAdapter. This is needed by any ConversationManager operation.
        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);

        // Get the object from spring. Orchestra should wrap it in a proxy that implements ScopedObject
        SimpleBean b1 = (SimpleBean) applicationContext.getBean("unscopedBean");
        assertNotNull(b1);
View Full Code Here

    }
   
    public void testCorrectConversation() throws Exception
    {
        // Set up the FrameworkAdapter. This is needed by any ConversationManager operation.
        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);

        final SimpleBean b1 = (SimpleBean) applicationContext.getBean("unscopedBean");
        assertNotNull(b1);
View Full Code Here

    }
   
    public void testPlainBean() throws Exception
    {
        // Set up the FrameworkAdapter. This is needed by any ConversationManager operation.
        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);

        // The object is proxied by a JDK proxy; this is the default behaviour. It therefore
        // has all the interfaces of a SimpleBean, and is backed by a SimpleBean, but cannot
        // be cast to one.
View Full Code Here

    }

    public void testBind() throws Exception
    {
        // Set up the FrameworkAdapter. This is needed by any ConversationManager operation.
        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);

        Dummy dummy = new Dummy();
        assertFalse(dummy instanceof ScopedObject);
        assertFalse(dummy instanceof SpringProxy);
View Full Code Here

    // Ensure that when an arbitrary object is bound to a conversation and the
    // conversation is invalidated, then using the proxy throws an IllegalStateException.
    public void testBindToInvalidatedConversation() throws Exception
    {
        // Set up the FrameworkAdapter. This is needed by any ConversationManager operation.
        LocalFrameworkAdapter frameworkAdapter = new LocalFrameworkAdapter();
        frameworkAdapter.setApplicationContext(applicationContext);
        frameworkAdapter.setConversationMessager(new LogConversationMessager());
        FrameworkAdapter.setCurrentInstance(frameworkAdapter);

        Dummy dummy = new Dummy();

        // force a conversation to be created
View Full Code Here

TOP

Related Classes of org.apache.myfaces.orchestra.frameworkAdapter.local.LocalFrameworkAdapter

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.