javax.annotation
Annotation Type Resource


@Target(value={TYPE,METHOD,FIELD})
@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.
 java.lang.String description
          A description for this resource.
 java.lang.String mappedName
          JNDI name to use for the resource.
 java.lang.String name
          Name of the resource.
 boolean shareable
          Share this resource between components ?
 java.lang.Class type
          Type of the resource.
 

name

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

Default:
""

type

public abstract java.lang.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:
CONTAINER

shareable

public abstract boolean shareable
Share this resource between components ?

Default:
true

mappedName

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

Default:
""

description

public abstract java.lang.String description
A description for this resource.

Default:
""


Copyright © 2008. All Rights Reserved.