← Prev in month ← Prev in thread
Next in thread → Next in month →

RE: [sca-j] ISSUE 3 - Local services expose implementation classes as their type

From
Michael Rowley <>
Date
2007-10-18T18:48:42+00:00
ID
Thread
RE: [sca-j] ISSUE 3 - Local services expose implementation classes as their type
PROPOSAL:

 

Introduce a new interface annotation
called @Local.  If a component implementation implements an interface that
has been marked as @Local, then the component type will include a service whose
type is that (non-remotable) interface.  In this way, the @Local
annotation is similar to the @Remotable annotation, but without implying remote-call
semantics.

 

The rules for generating services for a
class that does not include the @Service annotation are the following:

 

1) If the class implements interfaces, generate
services for each implemented interface that has been marked as either
@Remotable or @Local, where the type of the service is that interface.  Any
implemented interfaces that have not been marked as either @Remotable or @Local
do not have services generated for them.

 

2) If none of the interfaces implemented
by the class has been marked as @Remotable or @Local, then generate a service
for each implemented interface that is not a “marker interface” (i.e.
an interface with no methods, like Serializable).

 

3) If the class implements no interfaces,
then it offers a single service whose type is that class.

 

 

Michael

 

 

From: Barack,
Ron [mailto:] 

Sent: Thursday, October 04, 2007
5:27 AM

To: 

Subject: [sca-j] ISSUE LOGGED:
JAVA-3: Local services expose implementation classes as their type

 

http://www.osoa.org/jira/browse/JAVA-3

 

Von:
Michael Rowley [mailto:] 

Gesendet: Mittwoch, 26. September
2007 00:22

An: 

Betreff: [sca-j] NEW ISSUE: Local services
expose implementation classes as their type

 

TARGET: Java Common Annotations and APIs specification

       
Java Component Implementation Specification

           
Section titled: “Local and Remotable Services”

 

DESCRIPTION:

 

Currently, this section
states the following:

 

If an implementation class has
implemented interfaces that are not decorated with an @Remotable annotation,
the class is considered to implement a single local service whose type is defined by
the class.

 

This is unfortunate, since
the extremely common pattern of:

 

   class FooImpl
implements Foo {}

 

Will result in a component
that offers a service whose type is FooImpl (assuming that Foo hasn’t
been marked as @Remotable).

 

It should be possible for
this pattern to result in a service whose type is the Foo interface.

 

PROPOSAL:

 

Introduce a new interface
annotation called @Local.  If a component implementation implements an
interface that has been marked as @Local, then the component type will include
a service whose type is that interface.
← Prev in month ← Prev in thread
Next in thread → Next in month →