Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

<binding.rmi>

Tuscany supports Remote Method Invocation (RMI) as a protocol for use with SCA services and references by using the <binding.rmi> SCDL extension.

The RMI binding enables SCA components to use or be used by any other application which uses the standard Java RMI protocol. One use of this is to easily integrate the Tuscany runtime with existing Java applications which use RMI.

This RMI binding SCDL has the following format:

Code Block
   <binding.rmi host="" port="" serviceName=""/>

Some examples:

This example composite shows how to make an SCA component available as an RMI service:

Code Block
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           xmlns:rmi="http://tuscany.apache.org/xmlns/binding/rmi/1.0-SNAPSHOT"
           name="HelloWorldRmiComposite">

   <service name="HelloWorldRmiService" promote="HelloWorldServiceComponent">
      <interface.java interface="helloworld.HelloWorldService"/>
      <binding.rmi host="localhost" port="8099" serviceName="HelloWorldRemoteService"   />
      <reference target="HelloWorldServiceComponent">HelloWorldServiceComponent</reference>
   </service>
      
   <component name="HelloWorldServiceComponent">
      <implementation.java class="helloworld.HelloWorldImpl"/>
   </component>   
  
</composite>