[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: When more than one interface with the same unqualified name used in the @Serviceannotation
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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]