Skip Navigation Links | |
Exit Print View | |
Designing with Oracle Java CAPS JCA Adapters Java CAPS Documentation |
Designing with Oracle Java CAPS JCA Adapters
Technical Overview of JCA Adapters
Inbound JCA Resource Adapter Client Code
Outbound JCA Resource Adapter Client Code
Object Type Definition Wizards
Installing the Oracle Java CAPS JCA Adapters
Installing the NetBeans Modules
Installing the Runtime Components for Oracle Java CAPS JCA Adapters
Installing Third-Party JAR Files
Configuring Runtime Components in an EJB/JCA Application
Configuring Connector Pools for File Adapter
Configuring Connector Pools for Oracle Adapter
Deployment of Oracle Java CAPS JCA Adapters
To Deploy JCA Adapters from a Command Line
To Deploy JCA Adapters from the Admin Console
Using the Oracle Wizard and JCA Adapter Tooling with an EJB Project
The following task outlines the steps need to implement a specific EJB project using the Oracle Applications Adapter Wizard. The results are written to an output file.
An OTD and a JAR file containing the code corresponding to the above selected database objects are generated. The OTD is generated in the project at the location src/java/otds. The JAR file is added to the project libraries.
An MDB is created.
The Resource JNDI Name should be the same as that declared in the GlassFish Application Server (for example, Resources > Connector > Connector Resources)
The Resource JNDI Name should be the same as that declared in the GlassFish Application Server (for example, Resources > Connector > Connector Resources)
private void _execute_sample(byte[] data, String encoding, com.stc.connector.fileadapter.appconn.FileClientApplication fileOTD,otdFinBudget. OtdFinBudgetOTD oraOTD) throws java.lang.Exception { int counter = 0; int budget_count = 0; int budget_error_count = 0; int request_ID = -1; String org_ID = "204"; // Set eWayID String eWayID = "B"; // Set GroupID String GroupID = "B"; // Set ObjectID String ObjectID = "B"; fileOTD.setText("1. =====> Insert record into Budget SB Staging table .."); fileOTD.write(); oraOTD.getSB_GL_BUDGET_INTERFACE().insert(); oraOTD.getSB_GL_BUDGET_INTERFACE().setBUDGET_ENTITY_ID (new java.math.BigDecimal("1000")); oraOTD.getSB_GL_BUDGET_INTERFACE().setBUDGET_ENTITY_NAME("RP_Opnames"); oraOTD.getSB_GL_BUDGET_INTERFACE().setBUDGET_VERSION_ID (new java.math.BigDecimal("1002")); oraOTD.getSB_GL_BUDGET_INTERFACE().setBUDGET_NAME("CORPORATE 1996"); oraOTD.getSB_GL_BUDGET_INTERFACE().setCURRENCY_CODE("USD"); oraOTD.getSB_GL_BUDGET_INTERFACE().setFISCAL_YEAR (new java.math.BigDecimal("1996")); oraOTD.getSB_GL_BUDGET_INTERFACE().setUPDATE_LOGIC_TYPE("A"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSET_OF_BOOKS_ID (new java.math.BigDecimal("1")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD_TYPE("Month"); oraOTD.getSB_GL_BUDGET_INTERFACE().setDR_FLAG("Y"); oraOTD.getSB_GL_BUDGET_INTERFACE().setACCOUNT_TYPE("A"); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD1_AMOUNT (new java.math.BigDecimal("100")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD2_AMOUNT (new java.math.BigDecimal("200")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD3_AMOUNT (new java.math.BigDecimal("300")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD4_AMOUNT (new java.math.BigDecimal("400")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD5_AMOUNT (new java.math.BigDecimal("500")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD6_AMOUNT (new java.math.BigDecimal("600")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD7_AMOUNT (new java.math.BigDecimal("700")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD8_AMOUNT (new java.math.BigDecimal("800")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD9_AMOUNT (new java.math.BigDecimal("900")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD10_AMOUNT (new java.math.BigDecimal("1000")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD11_AMOUNT (new java.math.BigDecimal("1100")); oraOTD.getSB_GL_BUDGET_INTERFACE().setPERIOD12_AMOUNT (new java.math.BigDecimal("1200")); oraOTD.getSB_GL_BUDGET_INTERFACE().setCODE_COMBINATION_ID (new java.math.BigDecimal("17378")); oraOTD.getSB_GL_BUDGET_INTERFACE().setSEGMENT1("01"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSEGMENT2("760"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSEGMENT3("7420"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSEGMENT4("0000"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSEGMENT5("000"); oraOTD.getSB_GL_BUDGET_INTERFACE().setSB_EWAY_ID(eWayID); oraOTD.getSB_GL_BUDGET_INTERFACE().setSB_GROUP_ID(GroupID); oraOTD.getSB_GL_BUDGET_INTERFACE().setSB_OBJECT_ID(ObjectID); oraOTD.getSB_GL_BUDGET_INTERFACE().insertRow(); fileOTD.setText("2. =====> Counting record in Budget staging table ..."); fileOTD.write(); oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT().setP_GROUP_ID(GroupID); oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT().setP_OBJECT_ID(ObjectID); oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT().setP_EWAY_ID(eWayID); oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT().setP_CODE("A"); oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT().execute(); budget_count = oraOTD.getSB_BUDGET_UTILS_PKG_FN_CNT_GL_BUDGET_INT(). getRETURN_VALUE1().intValue(); fileOTD.setText(" returned Budget Count = ".concat( Integer.toString( budget_count ))); fileOTD.write(); fileOTD.setText("\nDone with Step 2"); fileOTD.write(); }