SCOrWare FraSCAti Runtime 0.3 Standalone Distribution
FraSCAti is an implementation of the Service Component Architecture (SCA) specifications provided by the Open SOA consortium (OSOA). The FraSCAti Runtime platform is supported by the SCOrWare consortium funded by the french national research agency (ANR).
Table of content
- Introduction
- Requirements
- Installation
- Building component libraries
- Running SCA composites
- Client and Server components implementation
- Links
Introduction
FraSCAti is a component framework providing runtime support for SCA components. The FraSCAti runtime supports SCA composite definitions which are conform to the SCA Assembly Model 1.0 specifications, Java component implementation (SCA Java Component Implementation V1.00), remote component bindings using Web Services and Java RMI protocols.
Requirements
Java SE 1.5 (or later) is required to compile SCA components and run FraSCAti.
Installation
Unzip FraSCAti distribution archive and you get the following directory structure:
- /bin - Launch scripts allowing to compile and run SCA components
- /lib - FraSCAti libraries
- /examples - SCA component implementation and composite examples
- /conf - FraSCAti configuration files
To compile and start SCA composites with FraSCAti, you also have to set the FRASCATI_HOME variable in your system environment, where FRASCATI_HOME is the directory where the FraSCAti runtime distribution was extracted.
Building component libraries
This distribution provides a build script in order to ease compilation of SCA Java component libraries. In a command shell, from the FRASCATI_HOME directory, type:
bin/compileSCA.bat <appDirectory> <jarName>
under Windows systems or
bin/compileSCA.sh <appDirectory> <jarName>
under Linux systems
Where <appDirectory> is the directory containing your Java implementation and <jarName> is the desired name for the resulting JAR file.
For instance, to compile the 'helloworld' Java implementation provided in the example directory, type the following command :
bin/compileSCA.bat example/helloworld helloworld
under Windows systems or
bin/compileSCA.sh example/helloworld helloworld
under Linux systems
Will create the library 'helloworld.jar' containing the SCA/Java compiled components of the helloworld example.
Running SCA composites
SCA composite definitions and SCA Java components are run using the FraSCAti runtime platform. This distribution provides a script allowing to start the FraSCAti runtime with a SCA composite. In a command shell, from the FRASCATI_HOME directory, type:
bin/frascati.bat <composite> <jarList>
under Windows systems or
bin/frascati.sh <composite> <jarList>
under Linux systems
Where <composite> is the SCA composite file to be run by FraSCAti, designated by its name. And <jarList> is a list of JAR files, separated by ':' under Linux systems and ';' under Windows systems.
Note that <composite> can be a resource of the libraries loaded by FraSCAti, a composite file in the file system, or an URL.
For instance, to run the helloworld example with FraSCAti, type the following command:
bin/frascati helloworld helloworld.jar
Will start the FraSCAti runtime with the helloworld composite included in the helloworld.jar archive.
The Java RMI protocol can also be tested within the helloworld example, using the 'helloworld-rmi-standalone' composite definition, for running client and server at the same time, or with both 'helloworld-rmi-server' and 'helloworld-rmi-client' composite definitions for running client and server in two distinct shells.
Client and Server components implementation
When an SCA composite instance is created, the FraSCAti runtime checks if the resulting composite provides a SCA service implementing the java.lang.Runnable interface.
When such service is promoted by the composite, the FraSCAti runtime invokes the "run()" method. Implementing an SCA composite client with this interface helps in having some procedures to be called after the composite instance has been created.
When the composite instance does not provide the java.lang.Runnable interface, the FraSCAti runtime creates and starts an instance of the SCA composite then wait until a key is pressed. Such case particularly helps in running SCA composite server waiting for remote invocations.
For example, typing the following command in a shell (using the helloworld sample previously compiled):
bin/frascati.bat helloworld-ws-server helloworld.jar
under Windows systems or
bin/frascati.sh helloworld-ws-server helloworld.jar
under Linux systems
Will start an helloworld message printer waiting for invocations through SOAP messages, while typing in another shell:
bin/frascati.bat helloworld-ws-client helloworld.jar
under Windows systems or
bin/frascati.sh helloworld-ws-client helloworld.jar
under Linux systems
Will start a client composite which performs invocations on the server in its "run()" method. This result in printing the 'Hello World' message on the server side.
Links