Examples of ThreadLocalProxy


Examples of org.apache.cxf.jaxrs.impl.tl.ThreadLocalProxy

        sf.setServiceClass(Customer.class);
        sf.setApplication(app);
        sf.setStart(false);
        Server server = sf.create()
       
        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
        assertNotNull(proxy);
       
        ClassResourceInfo cri = sf.getServiceFactory().getClassResourceInfo().get(0);
       
        Customer customer = (Customer)cri.getResourceProvider().getInstance(
             new MessageImpl());
       
        assertNull(customer.getApplication1());
        assertNull(customer.getApplication2());
       
        invokeCustomerMethod(cri, customer, server);
        assertSame(app, customer.getApplication1());
        assertSame(app, customer.getApplication2());
       
        assertTrue(proxy.get() instanceof UriInfo);
    }
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.