OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-assembly] Operation Overloading and multiple @Remotable interfaceson one Component - presuming this is allowed.



Mark,

I believe that you're right -

- a Java implementation used by SCA can have method overloading
- SCA only prevents interfaces from being used that have method/operation overloading

- I believe that the restriction on interfaces is based on the operation overloading restriction
that was introduced into later version of WSDL.

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



"Mark Combellack" <mcombellack@avaya.com>

31/03/2008 15:48

To
"OASIS Assembly" <sca-assembly@lists.oasis-open.org>
cc
Subject
[sca-assembly] Operation Overloading and multiple @Remotable interfaces on one Component - presuming this is allowed.





Hi,
 
I have a question about operation overloading when a Component implements multiple @Remotable interfaces.
 
I know that on a single @Remotable interface, I cannot use operation overloading. The Assembly specification disallows this:
 
http://www.oasis-open.org/apps/org/workgroup/sca-assembly/download.php/27619/sca-assembly-1.1-spec-WD-03.pdf
 
2264        The style of remotable interfaces is typically coarse grained and intended for loosely coupled
2265        interactions. Remotable service Interfaces MUST NOT make use of method or operation
2266        overloading.
 
As a result, I cannot do the following:
 
@Remotable
public interface TimeService {
    Date getCurrentTime();
    Date getCurrentTime(String timeZone);
}
 
 
However, is it valid for a Component to implement multiple @Remotable interfaces that have operations with the same name but different parameters? Each @Remotable interface does not have operation overloading but the resulting Component does.
 
I’ll give you a Java example.
 
I have two @Remotable services as defined by the following Java interfaces:
 
@Remotable
public interface LocalTimeService {
    Date getCurrentTime();
}
 
@Remotable
public interface WorldTimeService {
    Date getCurrentTime(String timeZone);
}
 
 
I have a single Java Component that implements both of these @Remotable Interfaces:
 
@Service(interfaces = {LocalTimeService.class, WorldTimeService.class})
public void class TimeServiceImpl implements LocalTimeService, WorldTimeService {
 
    public Date getCurrentTime() {
        // Code not shown
    }
 
    public Date getCurrentTime(String timeZone) {
        // Code not shown
    }
}
 
 
It can be seen that the Java Implementation of the Component does have operation overloading but I am presuming that this is allowed since each @Remotable interface exposed by the Component does not use operation overloading.
 
Thanks,
 
Mark
 






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]