Package org.jibx.ws.util

Examples of org.jibx.ws.util.ExpandingPool


     * @param sdef service definition for mapper to be returned
     * @return SOAP mapper instance for service
     * @throws WsException on error creating the service
     */
    public static Service getInstance(final ServiceFactory sfac, final ServiceDefinition sdef) throws WsException {
        ExpandingPool pool;
        synchronized (s_factoryMap) {
            pool = (ExpandingPool) s_factoryMap.get(sdef);
            if (pool == null) {
                pool = new ExpandingPool() {
                    protected Object createInstance() throws WsException {
                        Service service = sfac.createInstance(sdef);
                        service.setOwningPool(this);
                        return service;
                    }
                };
                s_factoryMap.put(sdef, pool);
            }
        }
        synchronized (pool) {
            return (Service) pool.getInstance();
        }
    }
View Full Code Here

TOP

Related Classes of org.jibx.ws.util.ExpandingPool

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.