Versions Compared

Key

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

...

  • In the data interceptor on the wire, if we find out that the data needs to be transformed from databinding A to databinding E. Then we can apply Dijkstra's Shortest Path Algorithm to the graph and figure the most performed path. It can be A->E, or A>C->E depending on the weights. If no path can be found, then the data cannot be mediated.

What' a data type?

Logical Type vs. Physical Type

DataType is the decription of the data. It contains three pieces: the data binding, the physical type and the logical type. The runtime's main job is to connect user components together so typically the actual type used would be determined by the user code that implements the source or target. The databinding framework's role here is to convert from the type used by the source to the type used by the target. The internal types used by the runtime should not influence this - which is an essential separation to maintain given the components and the wire connecting them need to work on different runtimes (implemented in different languages).

Where runtime types do matter is in the conversion between some serialized form and an in-memory representation and the two places where that occurs are in the configuration properties and in the binding implementations. To handle configuration properties (with the XPath requirement) we use DOM in the Java runtime; I believe the C++ runtime uses SDO. Each transport binding also tends to deserialize using a specific technology - for example, AXIOM for Axis2, JAXB for JAX-WS, Serializable for RMI and so the databinding framework is used to convert between the form generated by the binding and the form used by the component.

...

Java annotations for a remotable interface

...

Data mediation on the wire

DataBindingRuntimeWireProcessor is responsible to insert a DataTransformationInteceptor into the invovcation chains if the data transformation is required between the source and target operations. Depending on the invocation patterns, it uses the effective interface contracts to determine if transformation should be applied.

...

Interaction

Effective Source Interface contract

Effective Target Interface Contract

A SCA component talks to another SCA component over a remotable interface using binding.sca

The interface contract of the reference defined by the source component type

The interface contract of the service defined by the target component type

A SCA component talks to an external service using binding.x

The interface contract of the reference defined by the source component type

The interface contract imposed by the binding protocol

The request from binding.y is routed to a component service

The interface contract imposed by binding.y

The interface contract of the service defined by the target component type

...

Introspection of java interfaces for data types

The DataBindingJavaInterfaceProcessor is responsible to introspect the java interfaces to figure out the databindings of the parameters and return types. It delegates to all of the databinding implementations which will set the databinding and logical type if such data type is recognized by the databinding. This introspection process can handle most of the cases as the java types usually have some patterns, for example, implementing a know interface.

Special databindings and transformers to deal with operation-level transformations

  • Input2InputTransformer
  • Output2OutputTransformer
  • Exception2ExceptionTransformer

Deal with different IDLs
Dealing with WSDL/XSD based IDLs

  • : Transform the input data from the source operation to the input data expected by the target operation
  • Output2OutputTransformer: Transform the output data from the target operation to the output data expected by the source operation
  • Exception2ExceptionTransformer: Transform the fault data from the target operation to the fault data expected by the source operaion

Deal with interfaces defined using different IDLs

  • SCA allows the interfaces to be defined using various IDLs, for example, java interface or WSDL portType
  • IDLs may have different ways to represent the input/output/fault data
  • The databinding framework is designed to support the transformation across IDLs
  • Some special databindings are internally used for this purpose:
    • idl:input The input data format for an operation
    • idl:ouput
      Dealing with WSDL/XSD based IDLs
  • WrapperHandler
    • Provide WrapperStyle WSDL wrapping/unwrapping support

...

    • :output: The output data format for an operation
    • idl:fault: The fault data format for an operation
  • SimpleTypeMapper: convert data between XSD simple types (by the databinding, for example, OMElement with an OMText child) and java objects

...