You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by "Millies, Sebastian" <Se...@ids-scheer.com> on 2011/05/03 12:33:12 UTC

default binding for local service: serialization question

Hello there,

 

I have a very basic question about local interfaces:

does Tuscany require parameters passed over a local service interface to be Serializable?

 

Example:

<sca:component name="mappingcache">

    <sca:implementation.java class="com.softwareag.ps.platform.mappingcomponent.impl.MappingCacheServiceImpl"/>

    <sca:service name="MappingCacheService">

      <sca:interface.java interface="com.softwareag.ps.platform.mappingcomponent.api.MappingCacheService"/>

    </sca:service>

  </sca:component>

<sca:component name="mapping">

    <sca:reference name="mappingCacheService" target="mappingcache/MappingCacheService"/>

  </sca:component>

 

The service “mappingcache/MappingCacheService” implicitly exposes binding.sca and the service interface is not @Remotable.

 

“Tuscany SCA in Action” says in section 2.5:  “The default binding allows vendors to provide optimized communication where

interoperability isn’t required”. I believe this would be just such a case.

 

Therefore I would assume that a service call from the mapping component over the service reference “mappingCacheService” 

would simply involve Java reflection, without any Serialization/Deserialization going on for any of the parameters in the

methods exposed by the MappingCacheService interface .

 

Is my assumption correct? If it is not, what would be the reason?

 

-- Sebastian


Re: default binding for local service: serialization question

Posted by Simon Laws <si...@googlemail.com>.
On Tue, May 3, 2011 at 11:33 AM, Millies, Sebastian
<Se...@ids-scheer.com> wrote:
> Hello there,
>
>
>
> I have a very basic question about local interfaces:
>
> does Tuscany require parameters passed over a local service interface to be
> Serializable?
>
>
>
> Example:
>
> <sca:component name="mappingcache">
>
>     <sca:implementation.java
> class="com.softwareag.ps.platform.mappingcomponent.impl.MappingCacheServiceImpl"/>
>
>     <sca:service name="MappingCacheService">
>
>       <sca:interface.java
> interface="com.softwareag.ps.platform.mappingcomponent.api.MappingCacheService"/>
>
>     </sca:service>
>
>   </sca:component>
>
> <sca:component name="mapping">
>
>     <sca:reference name="mappingCacheService"
> target="mappingcache/MappingCacheService"/>
>
>   </sca:component>
>
>
>
> The service “mappingcache/MappingCacheService” implicitly exposes
> binding.sca and the service interface is not @Remotable.
>
>
>
> “Tuscany SCA in Action” says in section 2.5:  “The default binding allows
> vendors to provide optimized communication where
>
> interoperability isn’t required”. I believe this would be just such a case.
>
>
>
> Therefore I would assume that a service call from the mapping component over
> the service reference “mappingCacheService”
>
> would simply involve Java reflection, without any
> Serialization/Deserialization going on for any of the parameters in the
>
> methods exposed by the MappingCacheService interface .
>
>
>
> Is my assumption correct? If it is not, what would be the reason?
>
>
>
> -- Sebastian


Hi Sebastien

Yes, for local services (services with local interfaces) local
semantics should be in force, i.e. pass by reference. I would not
expect parameter serialization to be taking place in this case. Do you
observe something which makes you think that something else is going
on?

Regards

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com