Designing with Oracle Java CAPS Communication Adapters

Similar documents
Importing an SNA Custom Handshake Class

Defining Constants and Variables for Oracle Java CAPS Environments

Configuring Oracle Java CAPS Master Index (Repository) Connectivity and Environments

JavaFX. JavaFX System Requirements Release E

Copyright 1998, 2009, Oracle and/or its affiliates. All rights reserved.

1 Understanding the Cross Reference Facility

Oracle Enterprise Manager

Oracle Hospitality Query and Analysis Languages and Translation Configuration Guide. March 2016

Report Management and Editor!

Oracle Utilities Advanced Spatial and Operational Analytics

New Features in Primavera Professional 15.2

Oracle Hospitality OPERA Exchange Interface Cloud Authentication. October 2017

PeopleSoft Fluid Required Fields Standards

What s New for Oracle Cloud Stack Manager. Topics: July Oracle Cloud. What's New for Oracle Cloud Stack Release

Recipe Calculation Survey. Materials Control. Copyright by: MICROS-FIDELIO GmbH Europadamm 2-6 D Neuss Date: August 21 st 2007.

Oracle Enterprise Manager Ops Center. Introduction. Creating Oracle Solaris 11 Zones Guide 12c Release 1 ( )

JD Edwards EnterpriseOne. Overview. Prerequisites. Web Client for ipad Quick Start Guide Release 8.98 Update 4, Service Pack 5

Microsoft Active Directory Plug-in User s Guide Release

Oracle Banking Channels Bank User Base

General Security Principles

Managing Zone Configuration

Oracle Enterprise Manager Ops Center. Introduction. What You Will Need

Oracle Utilities Work and Asset Management Integration to Primavera P6 Enterprise Project Portfolio Management

Oracle WebCenter Portal. Starting Points for Oracle WebCenter Portal Installation

JavaFX. JavaFX System Requirements Release E

Oracle Enterprise Manager Ops Center

Materials Control Recipe Reduction based on Article Defaults

Oracle Communications Configuration Management

What s New for Cloud at Customer What's New for the Cloud Services on Oracle Cloud at Customer New Documentation for Oracle Cloud at Customer

Materials Control. Account Classes. Product Version Account Classes. Document Title: Joerg Trommeschlaeger

JavaFX. JavaFX 2.2 System Requirements Release 2.2 E

Oracle Enterprise Manager Ops Center. Introduction. What You Will Need. Installing and Updating Local Software Packages 12c Release

Oracle Enterprise Manager. 1 Introduction. System Monitoring Plug-in for Oracle Enterprise Manager Ops Center Guide 11g Release 1 (

Oracle Enterprise Manager Ops Center. Introduction. What You Will Need. Creating vservers 12c Release 1 ( )

Oracle Hospitality Suite8 Export to Outlook User Manual Release 8.9. July 2015

Oracle Java CAPS Database Binding Component User's Guide

Oracle Hospitality BellaVita Adding a New Language Release 2.7. September 2015

Oracle Retail MICROS Stores2 Functional Document Sales - Receipt List Screen Release September 2015

Oracle Database Firewall. 1 Downloading the Latest Version of This Document. 2 Known Issues. Release Notes Release 5.

Using SOAP Message Handlers

Oracle Enterprise Manager Ops Center. Introduction. What You Will Need. Hardware and Software Configuration

Oracle Hospitality BellaVita Hardware Requirements. June 2016

Database Change Reference Release 6.3

Oracle Tuxedo Mainframe Adapter for SNA

Oracle Hospitality MICROS Commerce Platform Release Notes Release Part Number: E December 2015

JD Edwards EnterpriseOne Licensing

Oracle Enterprise Data Quality for Product Data

Microsoft Internet Information Services (IIS) Plug-in User s Guide Release

Oracle Payment Interface Installation and Reference Guide Release E April 2018

PeopleSoft Fluid Icon Standards

Oracle Cloud What's New for Oracle WebCenter Portal Cloud Service

Oracle Enterprise Single Sign-on Logon Manager How-To: Configuring ESSO-LM Event Logging with Microsoft SQL Server 2005 Release

Oracle Endeca Commerce Compatibility Matrix

Oracle Exadata Healthchecks Plug-in Contents

Oracle Endeca Guided Search Compatibility Matrix

Oracle Communications Convergent Charging Controller. Sample Message Flows Reference Guide Release 6.0.1

Oracle Cloud E

Oracle Utilities Opower Custom URL Configuration

Oracle Fusion Middleware Oracle Stream Analytics Release Notes. 12c Release ( )

Oracle Fusion Middleware

Oracle Fusion Middleware. 1 Introduction. 1.1 Supported Functionality and Intended Use. 1.2 Limitations

OKM Key Management Appliance

BAA Oracle EBS R12.1 isupplier Portal Created on 11/26/2012 3:18:00 PM

Downloading Oracle Configuration Manager

Spend less on file attachment storage space Reliably back up your data or file attachments Use your OpenAir data in your reporting tools

Oracle Governance, Risk and Compliance Controls. Deployment with WebLogic Release 8.6.0

Introduction to Auto Service Request

Oracle Enterprise Manager Ops Center. Introduction. What You Will Need

Oracle Argus Safety. 1 Configuration. 1.1 Configuring a Reporting Destination for the emdr Profile. emdr Best Practices Document Release 8.0.

New Features in Primavera P6 16.2

Microsoft.NET Framework Plug-in User s Guide Release

Siebel CRM Integration to Oracle FLEXCUBE Universal Banking Implementation Guide. Version 1.0 (Siebel CRM Version 8.2), Rev.

Oracle Enterprise Manager Ops Center. Introduction. Creating Oracle Solaris 11 Zones 12c Release 2 ( )

Oracle Retail MICROS Stores2 Functional Document Stores2 for Portugal Disaster Recovery Release

Oracle Linux. UEFI Secure Boot Signing Key Update Notice

Oracle Hospitality Cruise Shipboard Property Management System Topaz Signature Device Installation Guide Release 8.00 E

Oracle Communications Order and Service Management. OSM New Features

Oracle Database Mobile Server

Oracle Hospitality Suite8 XML Export of Invoice Data for Hungarian Tax Authority Release and Higher E November 2016

Oracle Fusion Middleware. 1 Contents. 2 Where to Find Oracle WebLogic Tuxedo Connector Samples. 3 Configuring the Oracle WebLogic Tuxedo Connector

Materials Control. Purchase Orders Internal Attachments. Product Version: Attachments Joerg Trommeschlaeger.

Oracle Health Sciences Information Gateway. 1 Introduction. Security Guide Release 2.0.1

Materials Control. Installation MC POSWebService. Product Version Joerg Trommeschlaeger. Date: Version No. of Document: 1.

About the CORBA Cartridge

Oracle Communications Policy Management Configuring NetBackup for Upgrade Method of Procedure

Oracle Utilities Work and Asset Management

Oracle Utilities Meter Data Management Integration to SAP for Meter Data Unification and Synchronization

Oracle Cloud Using the Google Calendar Adapter with Oracle Integration

Oracle Utilities Customer Self Service

Oracle Insurance. Implementing a. Release 5.6

Security Guide Release 4.0

Oracle Cloud. Using the Google Calendar Adapter Release 16.3 E

Overview of the Plug-In. Versions Supported

Oracle Utilities Work and Asset Management

Managing Personally Identifiable Information in P6 Professional

Oracle Cloud Using the Google Calendar Adapter. Release 17.3

Oracle Fusion Middleware

Release Notes for Oracle GoldenGate for Big Data 12c ( )

Oracle mymicros.net, icare, myinventory and mylabor Self Host Release Notes Release v April 2015

Oracle Hospitality Simphony Venue Management Release Notes Release 3.9 E March 2017

Transcription:

Designing with Oracle Java CAPS Communication Adapters Part No: 821 2579 March 2011

Copyright 2008, 2011, Oracle and/or its affiliates. All rights reserved. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065. Hazardous Applications Notice This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group in the United States and other countries. Third Party Content, Products, and Services Disclaimer This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services. 120126@25097

Contents Designing with Communication Adapters... 5 Installing the DLL and JAR Files for the COM/DCOM Adapter...5 To Install the COM/DCOM Adapter Files...5 Installing the MSMQ DLL and JNI Files...6 To Install the MSMQ DLLs and Runtime JNI...6 Enabling Rollback When an MSMQ Message Fails...6 Streaming Data Between Components with the Batch Adapter...8 Introduction to Data Streaming...8 Overcoming Large-file Limitations...8 Using Data Streaming...9 Stream-adapter Interfaces... 13 3

4

Designing with Communication Adapters The following sections provide conceptual and reference information for Java CAPS Communication Adapters. Installing the DLL and JAR Files for the COM/DCOM Adapter on page 5 Installing the MSMQ DLL and JNI Files on page 6 Streaming Data Between Components with the Batch Adapter on page 8 Installing the DLL and JAR Files for the COM/DCOM Adapter The runtime JNI bridge DLL file, comewayruntime.dll, must be copied to the correct location for the Application Server process before you can deploy and run a Project containing a COM/DCOM Adapter. Complete the following steps before running your Project. BeforeYou Begin 1 2 3 To Install the COM/DCOM Adapter Files Before you can perform this task, the COM/DCOM Adapter must be installed. For more information, see Installing Additional Repository-Based Java CAPS Components in Installing Additional Components for Oracle Java CAPS 6.3. Start the Java CAPS Uploader and go to the Downloads tab. Download the COM Adapter Runtime JNI bridge DLL file, comewayruntime.dll, to C:\winnt\system32 or C:Windows\system32. An alternative to this procedure is to download the file elsewhere and add the JNI bridge DLL file to the application server library path using the GlassFish Admin. Download the COM Adapter Runtime Java API file (stccomruntime.api.jar) to JavaCAPS_Home\appserver\lib. 5

Installing the MSMQ DLL and JNI Files 4 Download the COM Adapter Runtime Java Implementation file (stccomruntime.impl.jar) to JavaCAPS_Home\appserver\lib. Note If you plan to run command line codegen against COM/DCOM projects, copy the above JAR files to the \compile\lib\ext folder first. Installing the MSMQ DLL and JNI Files The MSMQ adapter installation includes two additional components (as well as the Enterprise Manager Plug-In) that must be downloaded and installed for the MSMQ Adapter: MSMQ Adapter - Runtime win32 bridge DLLS Zip MSMQ Adapter - Runtime JNI You can download both files from the Java CAPS Suite Uploader. BeforeYou Begin 1 2 3 4 To Install the MSMQ DLLs and Runtime JNI Before you can perform this task, the MSMQ Adapter must be installed. For more information, see Installing Additional Repository-Based Java CAPS Components in Installing Additional Components for Oracle Java CAPS 6.3. Start the Java CAPS Uploader and go to the Downloads tab. Download the MSMQ Adapter Runtime win32 bridge DLLs Zip file to a local directory. Extract the downloaded file, msmqruntimejni.zip,toc:\winnt\system32 or C:Windows\system32. An alternative to this procedure is to extract the ZIP file elsewhere and add each DLL file to the library path using the GlassFish Admin console. Download the MSMQ Adapter Runtime JNI file (msmqjni.jar) to JavaCAPS_Home\appserver\lib. Note If you plan to run command line codegen against MSMQ projects, copy the above JAR file to the \compile\lib\ext folder first. Enabling Rollback When an MSMQ Message Fails You can configure the MSMQ Adapter to roll back an outbound MSMQ message when a failure occurs in the Java Collaboration Definition (for example, failure to insert a duplicate row into a database table that is defined to have unique keys), do the following: 6 Designing with Oracle Java CAPS Communication Adapters March 2011

Installing the MSMQ DLL and JNI Files 1 2 3 4 5 6 7 To Roll back an Outbound MSMQ Message Select Manual as the MSMQ Connection Mode in the outbound MSMQ Adapter Connectivity Map properties. Use the following code in your Java Collaboration Definition: try { MSMQClient_1.getEwayConfiguration().setOutMSMQName( "public" ); MSMQClient_1.getEwayConfiguration().setOutMSMQShareMode( "DENY_RECEIVE_SHARE" ); MSMQClient_1.getEwayConfiguration().setOutMSMQReceiveActionCode ( "ACTION_PEEK_CURRENT" ); MSMQClient_1.connect(); MSMQClient_1.getMSMQMessage(); TestDB_1.getTEST1().insert(); TestDB_1.getTEST1().setTESTSTRING( "From JCD" ); TestDB_1.getTEST1().insertRow(); MSMQClient_1.getEwayConfiguration().setOutMSMQReceiveActionCode ( "ACTION_RECEIVE" ); MSMQClient_1.getMSMQMessage(); MSMQClient_1.disconnect(); } catch ( Exception Catch ) { MSMQClient_1.disconnect(); } The key code items are highlighted in bold. You must also use a try/catch block to catch the exception (for this example, the error is a failed insert to database). Open the queue with the following settings: MSMQ Share Mode DENY_RECEIVE_SHARE: This locks the queue so that other applications cannot open the queue in Receive mode. Until your application closes the queue, no other application can open the queue to receive the message. MSMQ Receive Action Code ACTION_PEEK_CURRENT: This opens the queue so you can peek (view) the message. Next, try a database update on the message you received from the queue. If this fails, move on to step 7 (close the queue instance). If that succeeds, change the adapter configuration properties to receive messages programmatically in this manner. Next, receive the message. This removes the message from queue. Disconnect from the queue. Finally, close the queue using MSMQClient_1.disconnect(). This closes the current queue instance and unlocks the queue. Designing with Communication Adapters 7

Streaming Data Between Components with the Batch Adapter Streaming Data Between Components with the Batch Adapter Components in the Batch Adapter implement a feature for data streaming. This topic explains data streaming, how it works, and how to use it with the adapter and Java CAPS. Introduction to Data Streaming on page 8 Overcoming Large-file Limitations on page 8 Using Data Streaming on page 9 Stream-adapter Interfaces on page 13 Introduction to Data Streaming Data streaming provides a means for interconnecting any two components of the adapter by means of a data stream channel. This channel provides an alternate way of transferring the data between the Batch Adapter components. Streaming is available between BatchLocalFile and BatchFTP, or BatchLocalFile and BatchRecord. Each OTD component in the adapter has a Payload node. This node represents the in-memory data and is used when the data is known to be relatively small in size or has already been loaded into memory. The node can represent, for example, the buffer in the record-processing OTD, as it is being built or parsed, or the contents of a file read into memory. Instead of moving the data all at once between components in Java CAPS s memory, you can use a data-stream channel to provide for streaming the data between them a little at a time, outside of Java CAPS. Data streaming was designed primarily to handle large files, but you can use it for smaller data sizes as well. Use the NetBeans IDE s Collaboration Rules Editor to set up data-streaming operations. The rest of this section explains the data streaming feature and how to set it up. Note Payload-based and streaming-based transfers are mutually exclusive. You can use one or the other but not both for the same data. Overcoming Large-file Limitations The primary advantage of using data streaming is that it helps to overcome the limitations of dealing with large files. For example, if you have a 1-gigabyte file that contains a large number of records, you need a large amount of resources to load the payload into memory just to parse it. Streaming allows you to read from the file, little by little, using a data-streaming mechanism. This way, you do not need to load the file into the Java CAPS system s memory. Using streaming is not as fast as using in-memory operations, but it is far less resource-intensive. 8 Designing with Oracle Java CAPS Communication Adapters March 2011

Streaming Data Between Components with the Batch Adapter Using Data Streaming Each data-streaming transfer involves two OTDs in a Collaboration as follows: One provides the stream adapter. The other consumes the stream adapter to perform the data transfer. Caution Implementing InputStream must support skip() with negative numbers as an argument. This section explains how the two data-streaming OTDs operate to effect the transfer of data. Data-streaming Operation Each of the OTDs in the Batch Adapter exposes stream adapter nodes that enable any OTD to participate in data-streaming transfers. The nodes are named InputStreamAdapter and OutputStreamAdapter. You can associate the stream adapters by using the drag-and-drop features of the Java CAPS IDE. The InputStreamAdapter and OutputStreamAdapter nodes in the OTD are used for data streaming. This feature operates as follows: Stream-adapter consumers: The FTP and the record-processing OTDs can only consume stream adapters. Therefore, their stream-adapter nodes are write-only. Their node values can be set (modified). Stream-adapter provider: The local file OTD can only provide stream adapters, so its stream-adapter nodes are read-only. Its node value can only be retrieved. The local file OTD is always the stream provider, and the FTP and record-processing OTDs are the consumers. Data Streaming Versus Payload Data Transfer Use of the InputStreamAdapter and OutputStreamAdapter nodes is an alternative to using the Payload node as follows: Use these stream adapter nodes to transfer data if you want data streaming. Use the Payload node for a data transfer without data streaming (payload data transfer). All operations that, in payload data transfer, read from the Payload node require the InputStreamAdapter node when you are setting up data streaming. Using the same logic, all operations that, in payload data transfer, write to the Payload node require OutputStreamAdapter node for data streaming. Designing with Communication Adapters 9

Streaming Data Between Components with the Batch Adapter Do not confuse the stream adapter nodes with the get() and put() methods on the OTDs. For example, the BatchFTP OTD s client interface get() method writes to the Payload node during a payload transfer, so it requires an OutputStreamAdapter node to write to for data streaming. In contrast, the record-processing OTD s get() method reads from the Payload node during a payload transfer, so for data streaming, get() requires an inputstreamadapter node to read from. Data Streaming Scenarios The four typical data-streaming scenarios are: Transfer data from a local file system (BatchLocalFile) to a record-processing (BatchRecord) setup. This scenario uses the InputStreamAdapter OTD node (see Data Streaming Scenarios on page 10). Transfer data from a record-processing (BatchRecord) setup to a local file system (BatchLocalFile) using the OutputStreamAdapter OTD node (see Data Streaming Scenarios on page 10). 10 Designing with Oracle Java CAPS Communication Adapters March 2011

Streaming Data Between Components with the Batch Adapter Transfer data from a local file system (BatchLocalFile) to a remote FTP (BatchFTP) setup. This scenario uses the InputStreamAdapter OTD node (see Data Streaming Scenarios on page 10). Designing with Communication Adapters 11

Streaming Data Between Components with the Batch Adapter Transfer data from a remote FTP server (BatchFTP) to a local file system (BatchLocalFile) using the OutputStreamAdapterOTD node (see Data Streaming Scenarios on page 10). Consuming-stream Adapters This section explains how to use consuming-stream adapters. To Obtain a Stream Use the requestxxstream() method to obtain the corresponding XX stream. To Use a Stream Perform the transfer using the methods provided by the stream. 1 2 To Dispose of a Stream Release any references to the stream. Release the stream (XX) using the releasexxstream() method. Some of the OTDs support post-transfer commands. The Success parameter indicates whether these commands are executed. Do not close the stream. 12 Designing with Oracle Java CAPS Communication Adapters March 2011

Streaming Data Between Components with the Batch Adapter Stream-adapter Interfaces This section provides the Batch Adapter s OTD stream-adapter Java interfaces. This information is only for advanced users familiar with Java programming, who want to provide custom OTD implementations for stream-adapter consumers or providers. Inbound Transfers The following Java programming-language interface provides support for inbound transfers from an external system: public interface com.stc.adapters.common.adapter.streaming.inputstreamadapter { public java.io.inputstream requestinputstream() throws StreamingException; public void releaseinputstream(boolean success) throwsstreamingexception; } Outbound Transfers The following Java interface provides support for outbound transfers to an external system: public interface com.stc.adapters.common.adapter.streaming.outputstreamadapter { public java.io.outputstream requestoutputstream() throws StreamingException; public void releaseoutputstream(boolean success) throws StreamingException; } Designing with Communication Adapters 13

14