Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Program framework for BeanConnect-specific interfaces

In BeanConnect you specify the EIS partner to be addressed when deploying a managed connection factory. You use the lookup() method to search for the connection factory and obtain a connectivity object by calling the getConnection() method.

The connectivity object provided implements the EISConnection interface for communication with the EIS application:

  1. Set up the initial context:

    javax.naming.InitialContext ic = new InitialContext();

  2. Reference a connection factory:

    net.fsc.jca.communication.EISConnectionFactory cf =
      (EISConnectionFactory)ic.lookup
        ("java:comp/env/<resource_reference_name>");
    
  3. Set up the connection:

    net.fsc.jca.communication.EISConnection con = (EISConnection) cf.getConnection();

  4. If you use the EISConnection interface in order to specify the service name (TAC) or the name of the EIS service, proceed as follows:

    con.setServiceName(<name_of_the_service>);

    However, you should note that for performance reasons, it is recommended that you work with the preconfigured service names.

  5. Create the message that you want to send

    String requestMessage = "...";

  6. Call the EIS application and receive the reply message:

    String replyMessage = con.call(requestMessage);

  7. Close the connection:

    con.close();

Further information on how to program the EISConnection and EISOltpConnection interfaces is provided in the JavaDoc of the interface itself.

You will find a sample in Example 13 on Querying information on the conversation with the EIS application .