javax.annotation
Annotation Type Resource


@Target(value={TYPE,FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface Resource

Used to declare a link to a resource (like a Bean's context, a DataSource, etc).

Since:
EJB 3.0 version.
Author:
Florent Benoit
See Also:
EJB 3.0 specification

Optional Element Summary
 Resource.AuthenticationType authenticationType
          The authentication type, with container as default.
 String description
          A description for this resource.
 String mappedName
          JNDI name to use for the resource.
 String name
          Name of the resource.
 boolean shareable
          Share this resource between components ?
 Class type
          Type of the resource.
 

name

public abstract String name
Name of the resource. (in java:comp ENC environment)

Default:
""

type

public abstract Class type
Type of the resource.

Default:
java.lang.Object.class

authenticationType

public abstract Resource.AuthenticationType authenticationType
The authentication type, with container as default.

Default:
javax.annotation.Resource.AuthenticationType.CONTAINER

shareable

public abstract boolean shareable
Share this resource between components ?

Default:
true

mappedName

public abstract String mappedName
JNDI name to use for the resource. (name found in the RMI registry)

Default:
""

description

public abstract String description
A description for this resource.

Default:
""


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.