Hi Yee-Kang,

Further down in the specification is:

   435 The second variant, which takes an additional serviceName
parameter, *must* be used if the component
   436 implements multiple services.

So, an exception is expected if you employ the first version of the
createSelfReference API.

--Kevin


On Fri, Apr 4, 2008 at 9:42 AM, Yee-Kang Chang <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
>  V1 of the Java Annotations & APIs Spec described these two methods as
>  follows:
>
>  createSelfReference(Class<B> businessInterface) ? Returns a
>  ServiceReference that can be used to invoke this component over the
>  designated service.
>  createSelfReference(Class<B> businessInterface, String serviceName) ?
>  Returns a ServiceReference that can be used to invoke this component over
>  the designated service. Service name explicitly declares the service name
>  to invoke.
>
>  Tuscany's JavaDoc described them as such:
>
>  createSelfReference(java.lang.Class<B> businessInterface)       Returns a
>  ServiceReference that can be used to invoke this component over the
>  default service.
>  createSelfReference(java.lang.Class<B> businessInterface, java.lang.String
>  serviceName)    Returns a ServiceReference that can be used to invoke this
>  component over the designated service.
>
>  The behaviour I observed was that createSelfReference(java.lang.Class<B>
>  businessInterface) would return an Exception when I invoked it from a
>  component with more than one services defined.
>
>  Can someone please confirm that this is the expected behaviour and that
>  createSelfReference(java.lang.Class<B> businessInterface) is meant for
>  component with one service while createSelfReference(java.lang.Class<B>
>  businessInterface, java.lang.String serviceName) is meant for component
>  with multiple services?  And so, the "default service" mentioned in
>  Tuscany's JavaDoc is a typo?
>
>  Thank you!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to