Hi, I was just looking back on this thread and wondering where we ended up. Did the Java C&I spec and/or any IRC discussions add some clarity here?
It seems a shame to lose the simple syntax in the more common case to support the strange case where the service name really needs pkg qualification. It's probably too late to point this out but the spec could deal with this by saying that in this edge case the default service name includes pkg qualification while in the more typical case the service name is calculated as the unqualified intf name. I wonder if everyone is using single-service components and bypassing this issue... Thanks, Scott On 1/10/07, Raymond Feng <[EMAIL PROTECTED]> wrote:
Hi, Jim. Sorry I don't understand what you mean. Does Java 5 make a difference here? Assuming the java interface for the service is "mypkg.MyInterface" and the component name is "MyComponent", which one should we use? 1) <reference name="myRef">MyComponent/mypkg.MyInterface</reference> 2) <reference name="myRef">MyComponent/MyInterface</reference> Thanks, Raymond ----- Original Message ----- From: "Jim Marino" <[EMAIL PROTECTED]> To: <tuscany-dev@ws.apache.org> Sent: Wednesday, January 10, 2007 3:36 AM Subject: Re: Bug in deriving the service name from a java interface? > Not if we use Java 5. > > Jim > > On Jan 9, 2007, at 2:11 PM, Raymond Feng wrote: > >> Hi, >> >> Does it imply that if we want to reference such a service, we need to >> use the following syntax now? >> >> <reference name="myRef">MyComponent/mypkg.MyInterface</reference> >> >> Thanks, >> Raymond >> >> ----- Original Message ----- From: "Jim Marino" >> <[EMAIL PROTECTED]> >> To: <tuscany-dev@ws.apache.org> >> Sent: Monday, January 08, 2007 11:35 PM >> Subject: Re: Bug in deriving the service name from a java interface? >> >> >>> >>> On Jan 8, 2007, at 3:52 PM, Raymond Feng wrote: >>> >>>> Hi, >>>> >>>> The SCA Java C&I Spec says: "The service names of the defined >>>> services default to the names of the interfaces or class, without the >>>> package name." >>>> >>>> So I assume for the following annotation: >>>> >>>> @Service(interfaces = {MyListService.class, >>>> MyListServiceByYear.class}) >>>> >>>> We're going to have two services named as "MyListService" and >>>> "MyListServiceByYear". >>>> >>>> The current code seems to use the fully-qualified class name as the >>>> service name. As a result, if we use <componentName>/ <serviceName> as >>>> a wire target, it will throw a "TargetServiceNotFoundException". Is >>>> this a bug? >>>> >>> I switched this over a while back as I think we should a raise an >>> issue in the spec. If we don't qualify the name, it is not possible >>> for a component to implement two services with the same simple name. I >>> relieve it is an edge case but we should be able to accommodate that >>> since it is valid Java. >>> >>> Jim >>> >>>> Thanks, >>>> Raymond >>>> >>>> -------------------------------------------------------------------- >>>> - >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]