This tag maps a JNDI reference used within a bean to an administered object associated with an external resource. Common examples of such connection factories are (JMS) javax.jms.Queue and (JMS) javax.jms.Topic.
Class tag on all EJBs.
@ejbgen:resource-env-ref
[id="TagID"]
[jndi-name="JNDIName"]
name="ReferenceName"
type="ObjectType"
id
Optional. Specifies the ID of the tag. For more information, see EJBGen Tag Inheritance.
jndi-name
Optional. Specifies the JNDI Name of the administered object.
name
Required. Specifies the name of the reference to the administered object as used in the bean definition.
type
Required. Specifies the type of the resource. Examples are javax.jms.Queue, and javax.jms.Topic.
The ejbgen:resource-env-ref tag is used in conjunction with the ejbgen:resource-ref tag. The latter tag maps the external resource used while the ejbgen:resource-env-ref tag maps any administered object associated with that queue. For example, the ejbgen:resource-ref tag maps a reference to a javax.jms.TopicConnectionFactory, while the ejbgen:resource-env-ref tag maps to javax.jms.Topic.
For a code example, see the @ejbgen:resource-ref tag or Step 12 of Tutorial: Enterprise JavaBeans.