When deploying an EJB which is designed to use BeanConnect for outbound communication, you must link the EJB to the BeanConnect deployment. The following files are relevant for deploying an EJB:
Code file of the EJB (
.java
or.class
file)Standardized deployment descriptor of the EJB (
ejb-jar.xml
)Application server-specific deployment descriptor of the EJB if necessary
Application server-specific configuration file or deployment descriptor for the resource adapter if necessary
When an EJB is deployed, the resource reference used by the Bean developer is made known to the application server in the deployment descriptor of the EJB. In addition, a resource type is assigned to the resource reference.
BeanConnect supports the following resource types, which represent the different types of connections that can be used:
For UPIC communication using the BeanConnect interface:
net.fsc.jca.communication.EISUpicConnectionFactory
For UPIC communication using the CCI interface:
net.fsc.jca.communication.cci.BCUpicConnectionFactory
You must specify the resource type in the following file:
ejb-jar.xml
with the<res-type>
tag
The sections of the code file of the EJB as well as of the file ejb-jar.xml
that are relevant for the deployment of the EJB are described in detail below.
Code file of the EJB (
.java
or.class
file)The JNDI lookup for the
ConnectionFactory
object via a resource reference (coded name) takes place here. In the following example, the resource reference used iseis/Part1Dial. ... cf=(EISConnectionFactory) ic.lookup("java:comp/env/eis/Part1Dial") ...
Deployment descriptor of the EJB (
ejb-jar.xml
)Here the resource reference (
ConnectionFactory
object) which the EJB accesses is specified. In addition, a resource type is assigned to the resource reference. In the following examplenet.fsc.jca.communication.EISUpicConnectionFactory
is used as the resource type.<session> <ejb-name>SimpleBeanConnect</ejb-name> ... <resource-ref> <res-ref-name>eis/Part1Dial</res-ref-name> <res-type> net.fsc.jca.communication.EISUpicConnectionFactory </res-type> <res-sharing-scope>Unshareable</res-sharing-scope> ... </resource-ref> </session>
Please note that for
<res-sharing-scope>
you must always specifyUnshareable
.Application server-specific deployment descriptor of the EJB if necessary:
Here, application server JNDI names are assigned to the EJB names and resource references defined in the file ejb-jar.xml.Application server-specific configuration file or deployment descriptor for the resource adapter in which the connection factory is defined, if necessary