[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: NEW ISSUE: The ServiceReference interface should extend Serializable
RAISER: Mark Combellack
Document references taken from: Service Component
Architecture Java Common Annotations and APIs Specification Version 1.1 Working Draft 28 February
2008 In several locations in the specification, it talks about passing
ServiceReference instances around. These include: Section 6.3 Passing Conversational Services as Parameters contains the
following: 268 The service reference which represents a single
conversation can be passed as a parameter to 269 another service, even if that other service is
remote. This may be used in order to allow one 270 component to continue a conversation that had
been started by another. Section 6.5 Conversation Lifetime Summary contains the following: 325 Continuing conversations 326 The client can continue an existing conversation, by: 327 Holding the service
reference that was created when the conversation started 328 Getting the service
reference object passed as a parameter from another service, even 329 remotely 330 Loading a service
reference that had been written to some form of persistent storage The standard mechanism used by Java for transporting and persisting
objects is to use Serialization. Currently, ServiceReference is not
Serializable as it does not extend Serializable as ServiceReference and its
parent (CallableReference) do not extend Serializable. Section 7.3 CallableReference 739 public interface CallableReference<B> { Section 7.4 ServiceReference 769 public interface ServiceReference<B> extends
CallableReference<B>{ Making ServiceReference Serializable will allow: ·
ServiceReferences to be passed
over @Remotable interfaces as a parameter ·
ServiceReferences to be returned
by methods over @Remotable interfaces ·
Standard approach for persisting
ServiceReferences to some form of persistent storage by using the JDK java.io.ObjectOutputStream
and java.io.ObjectInputStream classes. ·
Applications that Serialize
ServiceReferences will be portable across different vendors SCA Implementations****
(i.e. the Application code will run on both SCA Implementations without
modification) *** Note: I do not mean interoperable. I would not expect a ServiceReference
Serialized in Vendor 1 SCA Implementation to be able to be deserialized and
used in Vendor 2 SCA Implementation.
Option 1 - Make CallableReference extend Serializable By making CallableReference extend Serializable, this will also make
ServiceReference Serializable. The advantage of this approach is that a Component marked as @Conversational
but @Scope(“STATELESS”) can persist the @Callback and use it in subsequent
calls. Option 2- Make just ServiceReference extend Serializable This would mean that CallableReference is not Serializable and the
@Callback cannot be persisted by a Component marked as @Conversational but @Scope(“STATELESS”)
can persist the @Callback and use it in subsequent calls. Thanks, Mark |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]