javax.annotation
Annotation Type Resource


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

The resource annotation.


Optional Element Summary
 Resource.AuthenticationType authenticationType
           
 java.lang.String description
           
 java.lang.String lookup
           
 java.lang.String mappedName
          Product-specific name.
 java.lang.String name
          JNDI name.
 boolean shareable
           
 java.lang.Class type
          Java type of the resource.
 

authenticationType

public abstract Resource.AuthenticationType authenticationType
Default:
javax.annotation.Resource.AuthenticationType.CONTAINER

description

public abstract java.lang.String description
Default:
""

name

public abstract java.lang.String name
JNDI name.

Default:
""

lookup

public abstract java.lang.String lookup
Default:
""

shareable

public abstract boolean shareable
Default:
true

type

public abstract java.lang.Class type
Java type of the resource.

Default:
java.lang.Object.class

mappedName

public abstract java.lang.String mappedName
Product-specific name.

Default:
""