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
) or Java annotationsApplication server-specific deployment descriptor of the EJB (with Oracle WebLogic Server:
weblogic-ejb-jar.xml
)Application server-specific deployment descriptor for the resource adapter (with Oracle WebLogic Server:
weblogic-ra.xml
)
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 OSI-TP or LU6.2 communication using the BeanConnect interface:
net.fsc.jca.communication.EISOltpConnectionFactory
For OSI-TP or LU6.2 communication using the CCI interface:
net.fsc.jca.communication.cci.BCOltpConnectionFactory
You must specify the resource type in the following files:
ejb-ra.xml
with the<res-type>
tagweblogic-jar.xml
with the<connectionfactory-interface>
tag
The sections of the code file of the EJB as well as of the files ejb-jar.xml
, weblogic-ejb-jar.xml
and weblogic-ra.xml
that are relevant for the deployment of the EJB are described in detail below. The bold (partial) path names indicate the relationships between the individual files.
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.EISOltpConnectionFactory
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.EISOltpConnectionFactory </res-type> <res-sharing-scope>Unshareable</res-sharing-scope> ... </resource-ref> </session>
Please note that for <res-sharing-scope>
you must always specify Unshareable
.
Application server-specific deployment descriptor of the EJB (with Oracle WebLogic Server:
weblogic-ejb-jar.xml):
Here, application server JNDI names are assigned to the EJB name and the resource references that are defined in the file
ejb-jar.xml
.<weblogic-enterprise-bean> <ejb-name>SimpleBeanConnect</ejb-name> <jndi-name>ejb/SimpleBeanConnect</jndi-name> <resource-description> <res-ref-name>comp/env/eis/Part1Dial</res-ref-name> <jndi-name>java:comp/env/eis/Part1Dial</jndi-name> </resource-description> </weblogic-enterprise-bean>
Deployment descriptor for the resource adapter (with Oracle WebLogic Server:
weblogic-ejb-jar.xml):
Here the connection factory is configured for deployment in the application server instance is configured and linked to the resource reference via the JNDI name (here:
partner1Dial
). Via the configuration of the connection factory in the application server instance, the resource adapter receives the URL of the service (in the following code fragment:utm://echo
and of the EIS partner.<outbound-resource-adapter> <connection-definition-group> <connection-factory-interface> net.fsc.jca.communication.EISOltpConnectionFactory </connection-factory-interface> <connection-instance> <jndi-name>eis/partner1Dial</jndi-name> <connection-properties> <properties> <property> <name>ConnectionURL</name> <value>utm://echo</value> (1) </property> ... </connection-properties> </connection-factory-interface> </connection-definition-group> </outbound-resource-adapter>
(1) For CICS partners: <value>cics://echo</value>
The value specified in
<connectionfactory-interface>
must be identical to the value that is specified with the<res-type>
tag in the fileejb-jar.xml
.An additional configuration step is required on the proxy. For each outbound communication endpoint name that is specified in a
connectionURL
configuration property in the fileweblogic-ra.xml
, you must configure a corresponding outbound communication endpoint of the same name in the proxy. The outbound communication endpoint definition maps the symbolic service name onto a real service name in the EIS partner application. You can carry out configuration of an outbound communication endpoint using the Management Console (see Configuring outbound communication endpoints ).