You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

 
Table of Contents
The root page null could not be found in space Apache Tuscany Docs 2.x.

Converting 1.x dependencies

You should configure the project pom.xml and

1.x Dependencies

 

2.xDependencies

<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-assembly</artifactId>
<version>1.6-SNAPSHOT</version>
</dependency>

===>

<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-assembly</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>

The following core modules are not ported yet :

  • data-api
  • some policies

The following modules are deprecated :

  • host-embedded
    • use the new Node APIs

Generating OSGi Manifest

Configure pom to use Apache Felix maven-bundle-plugin

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>

                <configuration>
                    <instructions>
                        <Bundle-Version>${tuscany.version}</Bundle-Version>
                        <Bundle-SymbolicName>org.apache.tuscany.sca.binding.atom</Bundle-SymbolicName>
                        <Bundle-Description>${pom.name}</Bundle-Description>
                        <Export-Package>org.apache.tuscany.sca.binding.atom*</Export-Package>
                        <Import-Package>org.apache.tuscany.sca.assembly.xml;version="2.0.0", *</Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

Generate the manifest

mvn org.apache.felix:maven-bundle-plugin:manifest

Copy the generated manifest from target folder to

<module-root>/META_INF/manifest.mf

Add manifest to source control

git add META-INF
or
svn add META-INF

Make any manual modifications as necessary

Converting your extension model

Your extension model needs to provide a new getType method

public interface JSONRPCBinding extends Binding {
   QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.jsonrpc");
   ...
}

public class JSONRPCBindingImpl implements JSONRPCBinding {
   private String name;
   private String uri;

   public QName getType() {
	return TYPE;
   }

    ...
}

Converting you 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
public interface BindingProviderFactory<M extends Binding> extends ProviderFactory<M> {

    /**
     * Creates a new reference binding provider for the given endpoint reference
     * 
     * @param endpointReference defines the component/reference/binding against which to create the provider
     * @return The binding provider
     */
    ReferenceBindingProvider createReferenceBindingProvider(EndpointReference endpointReference);

    /**
     * Creates a new service binding provider for the given component and
     * service.
     * 
     * @param endpoint defines the component/service/binding against which to create the provider
     * @return The binding provider
     */
    ServiceBindingProvider createServiceBindingProvider(Endpoint endpoint);

}
  • If you are using ModelFactoryExtensionPoint, it was renamed to FactoryExtensionPoint
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels