Package org.apache.openejb.util

Examples of org.apache.openejb.util.Pool$NoSupplier


            public Object create() {
                return "";
            }
        });
        Pool pool = builder.build();
        pool.start();
        pool.add("");
        pool.add("");
        pool.add("");
        pool.add("");
        pool.add("");
        pool.add("");

        Map<String, String> map = new HashMap<String, String>();
        map.put("EJBModule", "FooModule");
        map.put("J2EEApplication", "FooApp");
        map.put("J2EEServer", "FooServer");
        map.put("j2eeType", "StatelessSessionBean");
        map.put("name", "Pool");

        ObjectName objectName = new ObjectName("something", new Hashtable(map));
        server.registerMBean(new ManagedMBean(pool), objectName);

//        while ("".equals("")) {
//            object.tick(System.currentTimeMillis() % 1000);
//            Thread.sleep(287);
//        }

//        server.createMBean()
        while (true) {
            List<Pool.Entry> entries = new ArrayList<Pool.Entry>();

            try {
                while (true) {
                    entries.add(pool.pop(1, TimeUnit.SECONDS));
                    snooze();
                }
            } catch (TimeoutException e) {
            }

            for (Pool.Entry entry : entries) {
                pool.push(entry);
                snooze();
            }
        }
//        new CountDownLatch(1).await();
View Full Code Here

TOP

Related Classes of org.apache.openejb.util.Pool$NoSupplier

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.