user manual

252 BES Developers Guide
Connecting to JMS Connection Factories from Application Components
<resource-ref>
<res-ref-name>jms/MyJMSQueueConnectionFactory</res-ref-name>
<jndi-name>serial://resources/qfc</jndi-name>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>jms/MyJMSQueue</resource-env-ref-name>
<jndi-name>serial://resources/q</jndi-name>
</resource-env-ref>
...
</session>
Keep in mind that Resource References and Resource Environment
References can be used for all types of objects that require connections to
resources. Application clients can also use these references. You also need to
provide a Borland-specific XML file, application-client-borland.xml, however.
For example:
<application-client>
...
<resource-ref>
<res-ref-name>jms/MyJMSQueueConnectionFactory</res-ref-name>
<jndi-name>serial://resources/qfc</jndi-name>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>jms/MyJMSQueue</resource-env-ref-name>
<jndi-name>serial://resources/q</jndi-name>
</resource-env-ref>
...
</application-client>
Now, code from within the application-client archive can access these
datasources as well. Bear in mind, however, that only EJB containers can host
the DAR file itself. the Borland Client Container does not have this
functionality.