Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Deploying an Enterprise JavaBean for UPIC

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 (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 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 files:

  • weblogic-ra.xml with the <connection-factory-interface> tag

  • ejb-jar.xml with the <res-type> 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 is

    eis/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 example net.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 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 names and resource references 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/partner1Dial</jndi-name>
       </resource-description>
    </weblogic-enterprise-bean> 
    
  • Deployment descriptor for the resource adapter (with Oracle WebLogic Server: weblogic-ra.xml):

    Here the connection factory for deployment in the application server (here: Oracle WebLogic Server) is configured and linked to the resource reference via the JNDI name (here: partner1Dial). The configuration of the connection factory in the application server informs the resource adapter of the URL of the service (in the following code fragment: upic://BS2HOST/UTMAPP/INFO) and the EIS partner.

    <outbound-resource-adapter>
      <connection-definition-group>
        <connection-factory-interface>
           net.fsc.jca.communication.EISUpicConnectionFactory
        </connection-factory-interface>
        <connection-instance>
          <jndi-name>eis/partner1Dial</jndi-name>
          <connection-properties>
          <properties>
           <property>
             <name>ConnectionURL</name>
             <value>upic://BS2HOST/UTMAPP/INFO</value>
           </property>
           ...
          </connection-properties>
        </connection-factory-interface>
      </connection-definition-group>
    </outbound-resource-adapter 

    The value specified in <connection-factory-interface> must be identical to the value that is specified with the <res-type> tag in the file ejb-jar.xml.