Package org.apache.tuscany.sca.binding.jms.provider

Examples of org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory


     */
    private void doTestJMSBinding(Operation expectedOperation, List<Operation> operations, String scaOperationName)
        throws Exception {
        // Create the test JMS Binding
        final JMSBinding jmsBinding = new JMSBinding();
        JMSResourceFactory jmsResourceFactory = null;

        // Extra information for the method we are invoking
        final String operationParams = "Hello";
        final Object operationReturnValue = "Operation Success";

View Full Code Here


    /**
      */
    public WireFormatProvider createServiceWireFormatProvider(RuntimeComponent component,
                                                              RuntimeComponentService service,
                                                              Binding binding) {
        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory((JMSBinding)binding);
        return new WireFormatJMSTextXMLServiceProvider(registry, component, service, binding, jmsRF);
    }
View Full Code Here

    }

    /**
      */
    public WireFormatProvider createServiceWireFormatProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) {
        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory((JMSBinding) binding);
        return new WireFormatJMSDefaultServiceProvider(registry, component, service, binding, jmsRF);
    }
View Full Code Here

    /**
      */
    public WireFormatProvider createServiceWireFormatProvider(RuntimeComponent component,
                                                              RuntimeComponentService service,
                                                              Binding binding) {
        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory((JMSBinding)binding);
        return new WireFormatJMSBytesXMLServiceProvider(registry, component, service, binding, jmsRF);
    }
View Full Code Here

    }

    /**
      */
    public WireFormatProvider createServiceWireFormatProvider(RuntimeComponent component, RuntimeComponentService service, Binding binding) {
        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory((JMSBinding) binding);
        return new WireFormatJMSDefaultServiceProvider(registry, component, service, binding, jmsRF);
    }
View Full Code Here

    }

    public JMSServiceListener createJMSServiceListener(JMSServiceListenerDetails jmsSLD) {
        try {

            JMSResourceFactory rf = ((JMSBindingServiceBindingProvider)jmsSLD).getResourceFactory();
           
            MessageListener listener = new ServiceInvoker(jmsSLD.getJmsBinding(), jmsSLD.getService(), jmsSLD.getTargetBinding(), jmsSLD.getMessageFactory(), rf);
            RuntimeComponentService service = jmsSLD.getService();

            return new ASFListener(listener, service.getName(), service.isCallback(), jmsSLD.getJmsBinding(), workScheduler, rf);
View Full Code Here

        // aren't replicated around the broker cluster. Maybe it needs an AMQ specific
        // impl of the Tuscany JMSResourceFactory which uses use physical destinations
        // instead of JNDI
        // jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_NEVER);

        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory(jmsBinding);
        return new JMSBindingReferenceBindingProvider(component, reference, jmsBinding, extensionPoints, jmsRF);
    }
View Full Code Here

    public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
                                                               RuntimeComponentService service,
                                                               DistributedSCABinding binding) {
        JMSBinding jmsBinding = createBinding(binding);
        jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_ALWAYS);
        JMSResourceFactory jmsRF = jmsRFEP.createJMSResourceFactory(jmsBinding);
        return new JMSBindingServiceBindingProvider(component, service, binding.getSCABinding(), jmsBinding, serviceListenerFactory, extensionPoints, jmsRF);
    }
View Full Code Here

     */
    private void doTestJMSBinding(Operation expectedOperation, List<Operation> operations, String scaOperationName)
        throws Exception {
        // Create the test JMS Binding
        final JMSBinding jmsBinding = new JMSBinding();
        JMSResourceFactory jmsResourceFactory = null;

        // Extra information for the method we are invoking
        final String operationParams = "Hello";
        final Object operationReturnValue = "Operation Success";

View Full Code Here

            broker.stop();
        }
    }

    protected static void sendTextMessage(String destName, String payload) throws JMSException, NamingException {
        JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
        Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = session.createProducer(rf.lookupDestination(destName));
        rf.getConnection().start();
        session.run();
        p.send(session.createTextMessage(payload));
        rf.closeConnection();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory

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.