Skip Headers

Oracle Application Server InterConnect Adapter for J.D. Edwards OneWorld XE Installation and User's Guide
10g (9.0.4)

Part Number B10418-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

5
Using the Adapter

This chapter provides an overview of the functionality of the J.D. Edwards OneWorld XE adapter. The following topics are discussed:

Control Flow Overview

The following topics discuss control flow.

Design Time

When the J.D. Edwards OneWorld XE adapter loads, using the login credentials and system information from the Configuration Editor, one or more instances of the J.D. Edwards OneWorld XE OneWorld XE Application business function are created and pooled. When you browse the namespace, there is a list of business functions. Clicking a business function displays its logical methods along with the method's signatures.

Runtime

Instances of the J.D. Edwards OneWorld XE OneWorld XE Application business function are created and pooled for each thread. When a method call is submitted to a business service the metadata for this is read using the J.D. Edwards OneWorld XE OneWorld XE application business function (if it has not already been cached) and this makes a call to the appropriate method. It dynamically (at runtime) constructs the J.D. Edwards OneWorld XE OneWorld XE Interface layer as needed through which J.D. Edwards OneWorld XE adapter supports invocation and necessary data conversions.

The J.D. Edwards OneWorld XE adapter maps interface descriptions of the method signatures of the J.D. Edwards OneWorld XE OneWorld XE application, so that other applications can interact with these interface descriptions in a format that it can understand. It also adapts to system models of other applications and the J.D. Edwards OneWorld XE OneWorld XE application to provide end-to-end interaction.

The J.D. Edwards OneWorld XE adapter enables applications in the enterprise to interact with the J.D. Edwards OneWorld XE application, by extending functionality from the J.D. Edwards OneWorld XE application in the form of one or more of the following as applicable:

You can use the J.D. Edwards OneWorld XE adapter browser's Point of View functionality to view the elements of the J.D. Edwards OneWorld XE application in its native format. The J.D. Edwards OneWorld XE adapter builds a description of application interfaces for other applications interacting with the J.D. Edwards OneWorld XE application at runtime. It can create, delete, and invoke business objects as needed to perform computations in the J.D. Edwards OneWorld XE application and it directly invokes methods. All calls into the J.D. Edwards OneWorld XE Application are synchronous calls. The J.D. Edwards OneWorld XE adapter transforms the data for the call into Java types.

Apartment Threading

The J.D. Edwards OneWorld XE Application business function and any business function instance that is obtained through it can only be used on the thread where they are created or obtained (essentially apartment threading). The J.D. Edwards OneWorld XE adapter's connection pooling framework manages a pool of these that can be utilized.

Connection Pooling

Connection pooling improves performance of calls from the client system to the other system. It keeps connections to the server systems open and reuses them instead of closing them down after each call. The J.D. Edwards OneWorld XE adapter enables you to pool connections within particular logins, but still maintains critical control of the total number of connections across all pools.

Any new business function instance uses the thread on which it is created and the instance is destroyed after each operation. All J.D. Edwards OneWorld XE calls to business functions are stateless. However, during the operation, the J.D. Edwards OneWorld XE adapter ensures that the business function is used on the correct thread.

Business Functions

The J.D. Edwards OneWorld XE adapter only provides access to J.D. Edwards OneWorld XE business functions. Metadata about business functions is read using a business function interface to find a list of business functions and associated data structures. Metadata is strongly typed in all cases for all business function methods.

When executing business functions, the J.D. Edwards OneWorld XE adapter dynamically builds and compiles C++ function wrapper classes, using a subset of the genjava output required to execute the business function.

All business function methods have the same calling convention, three parameters that are system derived, and a pointer to a data structure.

Business function data types are represented as internal to J.D. Edwards OneWorld XE in the following manner:

Table 5-1 Business Function Data Types
Data Type Description

char

Character string

int

Signed or unsigned short integer.

long

Signed or unsigned long integer.

MATH_NUMERIC

JD Edwards special implementation of floating point numbers, including currency values.

JDEDATE

JD Edwards special implementation of dates.

BYTE

A single unsigned character.

BOOL

An integer.

ID

An unsigned long integer.

HWND

Not supported.

Handling String Values

The following describes how to configure certain string arguments as right justified (and left padded). J.D. Edwards OneWorld XE Adapter exposes two kinds of string values through its interoperability layer:

When you view arguments of these types in the J.D. Edwards OneWorld XE adapter browser from a Point of View such as Automation Visual Basic, you see descriptions such as:

You will also notice that J.D. Edwards OneWorld XE uses Hungarian notation to name the arguments of these types in the business functions. For example, arguments of these types will begin with:

For nearly all arguments of the sz type, maximum length string or char array, J.D. Edwards OneWorld XE expects a left justified value. For a street address line, which is of max length 40, J.D. Edwards OneWorld XE expects:

"701 North Shoreline Blvd"

padded to length 40 with blanks. It is not necessary for you to enter the padding as the J.D. Edwards OneWorld XE adapter provides this for you. You only need to enter "701 North Shoreline Blvd" in your client code.

For some subset of values for this type, dialog expects values that are right justified with padding on the left. For example, for business functions in the B4200310 source module, the argument szBusinessUnit is of length 12. This argument represents a Plant, such as a production facility. For a plant number of 30, J.D. Edwards OneWorld XE expects a value of:

"          30"

The following values are not valid:

"30"
"30 "

To make it easier for you to submit these values, you can take advantage of a J.D. Edwards OneWorld XE adapter feature. It is possible for you to enter a list of these parameters so that they are automatically right justified and padded on the left with blanks. In this way, the following value would be valid for the szBusinessUnit value:

"30"

This value automatically formats correctly if you take advantage of this feature. You must create a text file with entries describing these parameters. This file, if you create it, is called:

%ACBDIR%\config\JDE\jdearglist.txt

where %ACBDIR% is the directory in which you installed the J.D. Edwards OneWorld XE adapter. If this file does not exist, or is empty, you will see an informational message in the J.D. Edwards OneWorld XE adapter log when you first load the J.D. Edwards OneWorld XE adapter.

The following is an example of the format for entries in the jdearglist.txt file:

<SourceModule>.<BusinessFunction>.<Argument>

For example:

B4200310.F4211FSBeginDoc.szBusinessUnit
B4200310.F4211FSBeginDoc.szBusinessUnit

For a set of business functions belonging to the same business module, like-named arguments of the same type are shared across some or all of the business functions. You can use the asterisk '*' wildcard character instead of the business function name. For example:

B4200310.*.szBusinessUnit

Using the MATH_NUMERIC Type

The following describes the MATH_NUMERIC type and details:

The MATH_NUMERIC type is a numeric string type. To use it, enter parameter values of the following format:

<OptionalSign><IntegerAndFractionalPart><OptionalExponentPart>

Where

Examples of valid MATH_NUMERIC values include:

Examples of invalid MATH_NUMERIC values include:

Exponents

Exponents are provided by the J.D. Edwards OneWorld XE MATH_NUMERIC as a convenience for entering values. However, most values return without exponents (with all 32 significant digits visible).

Invalid Values

Invalid values depend on the kind of value. A decimal fraction that is too small is interpreted as zero (all significant digits are lost).

An integer that has too many significant digits causes unexpected results. J.D. Edwards OneWorld XE does not always raise an error condition in this case.

An exponent that is too large or too small returns as an invalid value.

Precision for Operations

If an operation results in loss of precision, rounding occurs. For example:

1.9e-31 / 10.0 = 0.00000000000000000000000000000002
1.9e-31 / 100.0 = 0.00000000000000000000000000000000

In other cases, unpredictable results occur, as when a very large positive value is multiplied by another.

1.01e32 * 2.053e32 does not yield reliable results and does not raise an error.

For most foreseeable business scenarios, these ranges are not exceeded.

Currency

When a J.D. Edwards OneWorld XE business function expects a currency value, the business function always has a separate parameter for a four character currency code. It is not necessary to pass in this code unless you are using a currency other than the default configured for the OneWorld system.

Typedef of MATH_NUMERIC

struct tagMATH_NUMERIC {
char String[MAXLEN_MATH_NUMERIC+1]; 

/* Just the digits -- no separators */
char Sign; /* '-' if negative, 0x00 otherwise */
char EditCode;/* The Data Dictionary edit code to Format */
/* for display */
short nDecimalPosition; /* # of digits from right end of string to */
/* decimal point*/
short nLength; /* The number of digits in s */ WORD wFlags; /* Processing Flags */ char szCurrency[4]; /* The Currency Code */ short nCurrencyDecimals; /* The Number of Currency Decimals */ short nPrecision; /* The Data Dictionary Size */ };

Typedef of JDEDATE

struct tagJDEDATE {

 short nYear;
 short nMonth;
 short nDay;
};

Go to previous page Go to next page
Oracle
Copyright © 2002, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index