Package org.apache.cxf.jca.cxf

Examples of org.apache.cxf.jca.cxf.JCABusFactory


    }
   
    public void testGetTargetObjectSetsThreadContextClassloader() throws Exception {
        final ClassLoader cl = EasyMock.createMock(ClassLoader.class);
        final EJBObject ejb = EasyMock.createMock(EJBObject.class);
        JCABusFactory rai = EasyMock.createMock(JCABusFactory.class);
        InitialContext ic = EasyMock.createMock(InitialContext.class);
        ClassLoader current = Thread.currentThread().getContextClassLoader();

        ic.lookup(EasyMock.isA(String.class));
        EasyMock.expectLastCall().
            andReturn(new ThreadContextCheckerHome((Object)ejb, (ClassLoader)current, this)).anyTimes();
        EasyMock.replay(ic);
       
        rai.setBus(null);
        EasyMock.expectLastCall();
        rai.getBus();
        EasyMock.expectLastCall().andReturn(null);
        rai.getInitialContext();
        EasyMock.expectLastCall().andReturn(ic);
        rai.getAppserverClassLoader();
        EasyMock.expectLastCall().andReturn(cl).andReturn(current);
        // retrun current classloader for getTargetObject pass
        EasyMock.replay(rai);
       
       
View Full Code Here


    protected Bus createMockBus() {
        return EasyMock.createMock(Bus.class);
    }

    protected CXFConnectEJBServant createCXFConnectEJBServant(Bus bus) throws Exception {
        JCABusFactory bf = new JCABusFactory(new ManagedConnectionFactoryImpl());
        return createCXFConnectEJBServant(bf, bus);
    }
View Full Code Here

    protected Bus createMockBus() {
        return EasyMock.createMock(Bus.class);
    }

    protected CXFConnectEJBServant createCXFConnectEJBServant(Bus bus) throws Exception {
        JCABusFactory bf = new JCABusFactory(new ManagedConnectionFactoryImpl());
        return createCXFConnectEJBServant(bf, bus);
    }
View Full Code Here

   
    @Test
    public void testGetTargetObjectSetsThreadContextClassloader() throws Exception {
        final ClassLoader cl = EasyMock.createMock(ClassLoader.class);
        final EJBObject ejb = EasyMock.createMock(EJBObject.class);
        JCABusFactory rai = EasyMock.createMock(JCABusFactory.class);
        InitialContext ic = EasyMock.createMock(InitialContext.class);
        ClassLoader current = Thread.currentThread().getContextClassLoader();

        ic.lookup(EasyMock.isA(String.class));
        EasyMock.expectLastCall().
            andReturn(new ThreadContextCheckerHome((Object)ejb, (ClassLoader)current, this)).anyTimes();
        EasyMock.replay(ic);
       
        rai.setBus(null);
        EasyMock.expectLastCall();
        rai.getBus();
        EasyMock.expectLastCall().andReturn(null);
        rai.getInitialContext();
        EasyMock.expectLastCall().andReturn(ic);
        rai.getAppserverClassLoader();
        EasyMock.expectLastCall().andReturn(cl).andReturn(current);
        // retrun current classloader for getTargetObject pass
        EasyMock.replay(rai);
       
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.jca.cxf.JCABusFactory

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.