Resource annotation

Resource causes an annotated variable to reference an object that holds values from a specified entry in the EGL deployment descriptor.

EGL package name

eglx.lang

Example use
The following declaration indicates that access details are in the EGL deployment descriptor entry named “myBinding”:
myService IMyService?{@Resource{uri = "binding:myBinding"}};
Annotation detail
Record Resource type Annotation
{
   targets = [elementKind.fieldMbr]
}
   uri string;
end
Annotation fields
uri
A string that refers to the resource being referenced. At this writing, you have two options:
binding:DDEntry
binding:filePath#DD_entry
DDEntry
Name of an entry in an EGL deployment descriptor.
fileName
Name of the EGL deployment descriptor, without a file extension. The name of the file that is accessed at run time includes the following suffix: -bind.xml.

If you specify only DDEntry, the referenced file is the one that is currently in use. At development time, the one currently in use is identified in the following project property: Development Deployment Descriptor. At deployment time, the referenced deployment descriptor is the one that you deploy.

The uri annotation field is optional and refers by default to a resource binding that has the same name as the variable. For example, in the following annotation, the missing value for the uri field is "binding:myService02":
myService02 IMyService?{@Resource};
Comments

The format of the uri parameter is consistent with the Internet Engineering Task Force standard that is described here: RTC 3986 (http://www.ietf.org/rfc/rfc3986.txt).

For further details on the EGL technology, see Resource bindings.

Compatibility

Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.