| Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components | |
| Close Print View | |
| Designing: Using the Oracle Applications Wizard and JCA Adapter Tooling with an EJB Project |
|
Creating a Runtime Environment
Designing Business Processes in the Sun Business Process Manager
Working with TCP/IP HL7 Collaborations
Developing Sun Master Indexes (Repository)
Developing Sun Master Patient Indexes
Developing OTDs for Application Adapters
Developing OTDs for Communication Adapters
Developing OTDs for Database Adapters
Developing OTDs for Web Server Adapters
Designing with Application Adapters
Designing with Communication Adapters
Designing with Web Server Adapters
Designing with Sun JCA Adapters
Technical Overview for Sun JCA Adapters
Inbound JCA Resource Adapter Client Code
Outbound JCA Resource Adapter Client Code
Object Type Definition Wizards
Installation of Netbeans Modules
Installation of Base Components for Sun JCA Adapters
Configuring Runtime Components in an EJB/JCA Application
Configuring Connector Pools for File Adapter
Configuring Connector Pools for Oracle Adapter
Deployment of Sun JCA Adapters
To Deploy JCA Adapters via Command Line
To Deploy JCA Adapters via the Admin Console
Using the Oracle Wizard and JCA Adapter Tooling with an EJB Project
To implement the Oracle JCA Adapter with an EJB Project
Using the Oracle Applications Wizard and JCA Adapter Tooling with an EJB Project
To implement the Oracle Applications JCA Adapter with an EJB Project
Using the Oracle Applications Object Type Definition
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.
htt://localhost:4848.



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();
}