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

Can we use method-level Intent/PolicySet annotations in the java componentimplementation class to express implementation QoS requirements?

From
Raymond Feng <>
Date
2009-10-20T22:02:04+00:00
ID
Thread
Can we use method-level Intent/PolicySet annotations in the java componentimplementation class to express implementation QoS requirements?
Hi,

For example, I would like to set up
the implementation class with transaction requirements using method-level
annotations to declare implementation intents/policySets for a java component.

@Service(AccountService.class)

public class AccountServiceImpl {

        @ManagedSharedTransaction

        public
void transfer(String account1, String account2, float amount) {

           
    }

        @NoManagedTransaction

        public
float getBalance(String account) {

        }

}

We can do similar things in EJB3.

But the Java CAA spec has the following
statement:

854 Intent annotations MUST NOT be applied
to the following:

855 • A method of a service implementation
class, except for a setter method that is either

856 annotated with @Reference or introspected
as an SCA reference according to the rules in

857 the appropriate Component Implementation
specification

This will make the sample above invalid.

I don't think we should be forced to
require the same intent for the whole class as it is quite common that
different operations have different QoS requirements. 

We could argue that this can be done
at interface methods. But in this case, the transaction requirements are
decided by the implementation instead of the interface.  

What do you think?

Thanks,

Raymond

Raymond Feng

Senior Software Engineer, Apache Tuscany PMC Member & Committer 

IBM Bay Area Lab, 1001 E Hillsdale Blvd, Suite 400,
Foster City, CA 94404, USA

E-mail: ,
Notes: Raymond Feng/Burlingame/IBM, Tel: 650-645-8117,
T/L: 367-8117

Apache Tuscany: http://tuscany.apache.org

Co-author of Tuscany In Action: http://www.manning.com/laws

S/MIME Cryptographic Signature
← Prev in month ← Prev in thread
Next in thread → Next in month →