官术网_书友最值得收藏!

Exposing the Legacy VSAM File Data Access

Oracle Connect is a component that resides on the mainframe platform. It consists of native adapters for communicating with the mainframe application and data stores. The design-time configuration of Oracle AS Adapter for Legacy and mainframes consists of two steps. The first step involves using Oracle Studio for configuring the Oracle Connect engine and the metadata is stored on a file system at the Oracle Connect end. The second step consists of exposing the metadata obtained in the first step through a WSIL servlet. Oracle JDeveloper Web service has a WSIL browser which in turn connects to the WSIL servlet. The WSIL servlet communicates with Oracle Connect and exposes the metadata as WSDL with JCA extensions. The WSIL servlet is deployed in the Oracle Application Server Java EE container, and so it needs to be up and running at design time.

Connecting to Oracle Connect on Mainframe and Setting Connection Properties

Before anything is done, you must connect to your mainframe and set the properties for your connection as follows:

  1. The Oracle Studio connects to Oracle Connect running on the mainframe. Oracle Connect for VSAM needs to be installed and configured on the OS/390 machine. The steps are detailed in the Adapter User Guide.

    Go to theConfiguration Explorer view, and selectMachine folder. Right-click and selectNew. This will bring up the connection panel on the right-hand side. Specify the connection parameters as shown here:

    Connecting to Oracle Connect on Mainframe and Setting Connection Properties

    Note

    Your connection parameter will be different based on your mainframe machine name, port number, user name, and password.

  2. Expanding the connection object shows a Bindings folder for defining workspaces (domains) and a default workspace called NAV. Expanding the Bindings folder shows an Adapters and Events folder. The Adapters folder is used to define JCA outbound interactions (request-response services), while the Events folder is used to define JCA Inbound Interactions (event services).
    Connecting to Oracle Connect on Mainframe and Setting Connection Properties

Two important property settings are:

  • The property disable2PC needs to be false in order for the two-phase commit to work.
  • To work with global transactions, set the convertAllToDistributed transaction environment property to true.

More information on the Oracle VSAM Adapter setup in the Legacy Studio can be found here:http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31002/vsam_install.htm#i1008132.

Note

Keeping It Real: Once the Oracle Connect mainframe component is installed, connecting to your mainframe system through the Oracle Studio for Legacy Adapters is simple. The difficult task is to install Oracle Connect on the mainframe system because of the processes and procedures, people's resistance — 'not wanting new things on the mainframe', or even a lack of additional mainframe cycles.

Oracle Connect Data Source

Since we have so much to cover in this chapter and we want to focus on aspects such as the adapter, two-phase commit, and calling the adapter from Java, we will not create a new data source. Instead, we will take a look at an existing data source to keep screenshots to the minimum.

  1. The Data sources folder contains the VSAM data source. We will be using a data source called DS_VSAM.
    Oracle Connect Data Source

    Note that this is a ADD-VSAM type of data source.

  2. Click on the Advanced tab as shown in the screenshot. Click on the drop-down box for the Transaction type field. Change the transaction type to 2PC. This enables two-phase commit for this data source. Your screen should appear as follows:
    Oracle Connect Data Source
  3. Right-click on the DS_VSAM data source and select the Edit Metadata. Expand the DS_VSAM entry (click the + sign) under the Data sources folder in the Metadata tab. Next, expand the Tables folder. Lastly, double-click on the INVOICE_DATA table entry. Your screen should appear as follows:
    Oracle Connect Data Source

A couple of things to note on this screen:

  • Data file field — This is the physical location of the VSAM data file on the mainframe.
  • Maximum record length — The maximum length of each record is 80.
  • Columns tab — This tab displays the columns (or in VSAM terms, fields) that make up the ODEM.OCON10G.DEMO10G.VSAM.DEMODATA VSAM file.
    Oracle Connect Data Source

Note

Keeping It Real: Creating the data source is the first step. Most of your legacy services at some point will need to interact with a data source at some point whether they are presentation, transaction, or program-based services. Therefore, exposing the data source as a Web service is a common approach.

Oracle Connect Adapter

The adapter is what you will be talking to from your Java application to insert the VSAM record into the mainframe system using CICS. We will be using an existing adapter called AD_VSAM. This adapter uses the DS_VSAM data source created in the previous section. The adapter has select, insert, delete, and update interactions associated with it. 'Interactions' are the fundamental methods that Java EE, Oracle BPEL, or other applications interface to the legacy artifacts on the mainframe. Oracle Studio has a test run capability that can be used to test the interactions.

  1. The Adapters folder is used to define and modify a VSAM adapter. Right-click on the AD_VASM adapter in the Adapters folder and select Edit Metadata. The Metadata tab appears as follows:
    Oracle Connect Adapterlegacy VSAM file data accessOracle connect data source

    The important thing to note here is that an adapter can have more then one type of interaction. As you can see in the above screenshot, five different interactions are associated with this one adapter.

  2. Double-click on the invoice_data_insert entry under the Schema entry, and you will see the following:
    Oracle Connect Adapterlegacy VSAM file data accessOracle connect data source
  3. The Schema Record tab shows the fields that will be passed to the AD_VSAM adapter to be inserted into the INVOICE_DATA VSAM file using the adapter. The XML payload expects all fields to be character strings so that is why all the fields for INVOICE_DATA_INSERT are string. Double-click on the invoice_data_insert entry under the Interactions entry, and you will see the following:
    Oracle Connect Adapterlegacy VSAM file data accessOracle connect data source
  4. The Input record is the invoice_data_insert schema we just looked at. The output record is the invoice_data_insertResponse schema. The response schema is basically the status of the insert and appears as follows:
    Oracle Connect Adapterlegacy VSAM file data accessOracle connect data source

Note

Keeping It Real: The Interactions created in this step are the services that we will interact with from our Java EE application. These services are different from the standard SOAP/WSDL based Web services. These services will be accessed using the Java EE Connector API.

主站蜘蛛池模板: 金山区| 江门市| 武定县| 桐柏县| 樟树市| 宜春市| 迁安市| 德钦县| 隆德县| 库车县| 荣昌县| 亳州市| 略阳县| 仙桃市| 八宿县| 容城县| 大竹县| 肇东市| 德格县| 航空| 宁明县| 阿瓦提县| 淮南市| 陆川县| 孝义市| 明溪县| 神木县| 晋宁县| 固安县| 雅江县| 嫩江县| 闽清县| 响水县| 宜春市| 泰和县| 康平县| 颍上县| 正阳县| 彭州市| 松潘县| 巴青县|