Package org.switchyard.component.bean

Examples of org.switchyard.component.bean.ServiceProxyHandler


        BeanComponentActivator activator = new BeanComponentActivator();

        for (ServiceDescriptor serviceDescriptor : beanDeploymentMetaData.getServiceDescriptors()) {
            String serviceName = serviceDescriptor.getServiceName();
            ServiceProxyHandler handler = serviceDescriptor.getHandler();
            ServiceInterface serviceInterface;
            ServiceReference service;

            activator.lookupBeanMetaData();
            serviceInterface = activator.buildServiceInterface(serviceName);
            QName serviceQName = XMLHelper.createQName(domain.getName().getNamespaceURI(), serviceName);
            domain.registerService(serviceQName, serviceInterface, handler);
            service = domain.registerServiceReference(serviceQName, serviceInterface);
            handler.addReference(service);
            handler.start();

        }
    }
View Full Code Here


            BeanManager beanManager = _cdiBean.getBeanManager();
            CreationalContext creationalContext = beanManager.createCreationalContext(_cdiBean.getBean());
            Object beanRef = beanManager.getReference(_cdiBean.getBean(), Object.class, creationalContext);

            return new ServiceProxyHandler(beanRef, _serviceMetadata, _beanDeploymentMetaData);
        } finally {
            Thread.currentThread().setContextClassLoader(tccl);
        }
    }
View Full Code Here

        }
       
        PropertyResolver resolver = config.getModelConfiguration().getPropertyResolver();
        for (ServiceDescriptor descriptor : _beanDeploymentMetaData.getServiceDescriptors()) {
            if (descriptor.getServiceName().equals(serviceName.getLocalPart())) {
                ServiceProxyHandler handler = descriptor.getHandler();
                for (ComponentReferenceModel reference : config.getReferences()) {
                    QName refName = ComponentNames.qualify(config.getQName(), reference.getQName());
                    handler.addReference(getServiceDomain().getServiceReference(refName));
                }
                handler.injectImplementationProperties(resolver);
                return handler;
            }
        }
        // bean discovery did not find a bean providing this service
        throw BeanMessages.MESSAGES.unknownServiceName(serviceName.toString());
View Full Code Here

TOP

Related Classes of org.switchyard.component.bean.ServiceProxyHandler

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.