sca-j message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [sca-j] When more than one interface with the same unqualified nameused in the @Service annotation
- From: Mike Edwards <mike_edwards@uk.ibm.com>
- To: sca-j@lists.oasis-open.org
- Date: Wed, 13 Aug 2008 14:22:33 +0100
Vamsi,
You have found a hole in the specifications,
I think.
I am not in favour of having the whole
qualified interface class name used as the service name.
I suggest the following set of changes
- I'm interested in see folks' reactions to these suggestions
before I raise a formal Issue:
- Permit the @Service annotation to
provide a name for the service, independent of the name of the
interface class (I'm surprised that
we don't have this already)
- Where the default name is being used,
derived from the name of the interface class, if two services
end up with the same name, I suggest
appending "_n" to the end of the name for the 2nd and subsequent
services with the same name, where "n"
is a number that starts with 1 and increments by 1.
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
Email: mike_edwards@uk.ibm.com
From:
| C Vamsi <vamsic007@in.ibm.com>
|
To:
| sca-j@lists.oasis-open.org
|
Date:
| 13/08/2008 13:01
|
Subject:
| [sca-j] When more than one interface
with the same unqualified name used in the @Service annotation |
sca-javaci-draft-20070926.doc
Java Component Implementation Specification Version 1.1 draft - Section
-
2.1:
The service name computed from @Service annotation is the unqualified name
of the class/interface specified in the annotation. What happens
when
there is more than one interface with the same unqualified name (as given
in the example below) used in the @Service annotation?
package mypkg1;
public interface HelloService {
String hello1(String msg);
}
package mypkg2;
public interface HelloService {
String hello2(String msg);
}
@Service(interfaces = {mypkg1.HelloService.class,
mypkg2.HelloService.class})
public HelloServiceImpl implements mypkg1.HelloService, mypkg2.HelloService
{
public String hello1(String msg) {
return "hello1 " + msg;
}
public String hello2(String msg) {
return "hello2 " + msg;
}
}
Is it an error? Should the service name include package name of
the
interface/class as well?
++Vamsi
---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail. Follow this link to all your TCs in OASIS at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]