Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Make sure you update your META-INF\services\org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor with new namespace and any other necessary changes to reflect the current 2.x structure.

Converting you Binding runtime artifacts

Provider Factory

  • The provider factory interface has changed to accommodate the new Endpoint/EndPointReference support
    • Although the interface has changed, all the previous available information are encapsulated and available from the Endpoint and EndpointReference object

...

Code Block
public class AtomReferenceBindingProvider implements ReferenceBindingProvider {

    private RuntimeComponentReference reference;
    private AtomBinding binding;

    public AtomReferenceBindingProvider(EndpointReference endpointReference,
                                        AtomBinding binding) {

    	this.reference = (RuntimeComponentReference) endpointReference.getReference();
        this.binding = (AtomBinding) endpointReference.getBinding();
    }

    ...
}

public class AtomServiceBindingProvider implements ServiceBindingProvider {


    private MessageFactory messageFactory;

    private Endpoint endpoint;
    private RuntimeComponent component;
    private RuntimeComponentService service;
    private InterfaceContract serviceContract;
    private AtomBinding binding;
    private ServletHost servletHost;

    ...

    public AtomServiceBindingProvider(Endpoint endpoint,
                                         MessageFactory messageFactory,
                                         ServletHost servletHost) {
        this.endpoint = endpoint;
        this.component = (RuntimeComponent)endpoint.getComponent();
        this.service = (RuntimeComponentService)endpoint.getService();
        this.binding = (AtomBinding) endpoint.getBinding();
        this.messageFactory = messageFactory;
        this.servletHost = servletHost;

    }

    ....

Converting you Implementation runtime artifacts

Code Block

...

Converting test cases

In 2.x we removed the Host-Embedded module and the SCADomain, and the recommended way is to use the Node SPI to build your test cases. We also are recommending using JUnit 4.5 test styles. See below a quick

...