Package org.switchyard.transform.xslt.internal

Examples of org.switchyard.transform.xslt.internal.TransformerPool.give()


    @Test
    public void takeAndGive() throws Exception {
        TransformerPool pool = new TransformerPool(templates, 1);
        Transformer t1 = pool.take();
        Assert.assertNotNull(t1);
        pool.give(t1);
        Transformer t2 = pool.take();
        Assert.assertNotNull(t2);
        Assert.assertEquals(t1, t2);
    }
   
View Full Code Here


        // spin up a thread to offer back
        new Thread() {
            public void run() {
                try {
                    Thread.sleep(2000);
                    pool.give(t);
                } catch (Exception ex) {
                    ex.printStackTrace();
                    Assert.fail();
                }
            }
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.