Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by JeremyBoynes:
http://wiki.apache.org/ws/Tuscany/SpecProposals/Resources

------------------------------------------------------------------------------
  Proposal for how components access runtime-provided resources
  
- Recent discussions on tuscany-dev raised the question of how an 
implementation could access resources provided by an SCA runtime environment. 
This was raised in conjunction with providing support for JPA 
(javax.persistence) and how the implementation would be able to access an 
EntityManager or EntityManagerFactory. However, this issue pertains to any 
service not modeled as a business service accessible through normal SCA 
Assembly.
+ Recent discussions on tuscany-dev raised the question of how an 
implementation could access resources provided by an SCA runtime environment. 
This was raised in conjunction with providing support for JPA 
(javax.persistence) and how the implementation would be able to access an 
!EntityManager or !EntityManagerFactory. However, this issue pertains to any 
service not modeled as a business service accessible through normal SCA 
Assembly.
  
  This has been raised in the OSOA Specification Java working group in 
conjunction with Issue 68 Using @Resource and other Common Annotations.
  
  = Resource =
  
- A resource is a reference to a service provided by the environment in which a 
component implementation is running. Whereas an SCA Reference is used to 
declare a dependency on a service provided by another SCA component or binding, 
a Resource is used to declare a dependency that an implementation has on a 
service provided by the runtime infrastructure. As such, the type of a Resource 
is specific to the implementation type although the underlying implementation 
may be accessible from multiple implementation types. For example, the Java 
implementation type may support access to a relational database through a 
Resource with a type of javax.sql.DataSource whereas a C++ implementation type 
may support access to the same database through an ODBC Resource.
+ A resource is a reference to a service provided by the environment in which a 
component implementation is running. Whereas an SCA Reference is used to 
declare a dependency on a service provided by another SCA component or binding, 
a Resource is used to declare a dependency that an implementation has on a 
service provided by the runtime infrastructure. As such, the type of a Resource 
is specific to the implementation type although the underlying implementation 
may be accessible from multiple implementation types. For example, the Java 
implementation type may support access to a relational database through a 
Resource with a type of javax.sql.!DataSource whereas a C++ implementation type 
may support access to the same database through an ODBC Resource.
  
  Access to resources is subject to Policy constraints in the same manner as 
access to other local services.
  
@@ -31, +31 @@

  
  The @Resource annotation may be applied to a protected or public field. The 
Resource service contract is determined by the type of the field and the 
default name of the Resource is the name of the field.
  
- The @Resource annotation may be applied to a protected or public method. The 
method must be a valid JavaBean setter method: its name must begin with set, it 
must have a return type of void, and it must have a single parameter. The 
Resource service contract is determined by the type of the method parameter and 
the default name of the Resource is the JavaBean property name corresponding to 
the method.
+ The @Resource annotation may be applied to a protected or public method. The 
method must be a valid !JavaBean setter method: its name must begin with set, 
it must have a return type of void, and it must have a single parameter. The 
Resource service contract is determined by the type of the method parameter and 
the default name of the Resource is the !JavaBean property name corresponding 
to the method.
  
  The @Resource annotation may be applied to a parameter on a protected or 
public constructor. The service contact is determined by the type of the 
parameter and the default name of the Resource is the name of the type of the 
parameter as returned by Class.getName(). It is recommended that implementation 
developers provide a more meaningful name than this default.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to