Tuxedo JCA
The Tuxedo JCA connector calls Oracle Tuxedo through the Oracle Tuxedo JCA Adapter: a JCA 1.5 resource adapter for bi-directional service invoke. OL IDE builds a provider on that adapter and generates RPC entities for VIEW32, FML32, and string buffers.
Environment setup
Oracle Tuxedo JCA Adapter 11gR1 (11.1.1.2.1) is not in a public Maven repository. Download it from Oracle and install these jars into the local Maven repository so the coordinates match:
| groupId | artifactId | version | Jar |
|---|---|---|---|
| com.bea.core | i18n | 1.4.0.0 | com.bea.core.i18n_1.4.0.0.jar |
| com.bea.core | jatmi | 1.3.1.0 | com.bea.core.jatmi_1.3.1.0.jar |
| com.oracle.tuxedo | adapter | 1.1.0.0 | com.oracle.tuxedo.adapter_1.1.0.0.jar |
A project created after those artifacts are installed should compile with no missing-class errors.
Create the project
The new-project wizard has a JCA-based Tuxedo backend. On the connection page set:
| Wizard field | Meaning |
|---|---|
| Remote access point | Network address of a local Oracle Tuxedo domain access point |
| Local access point | Network address of a remote Oracle Tuxedo domain access point |
| Auto transaction | Auto-transaction flag used by the Tuxedo JCA resource adapter |
Access points use this form:
//${host}:${port}/domainId=${domain_id}
Runtime properties
Prefix: ol.tuxedo.project.{projectName}
| Property | Type | Description |
|---|---|---|
| remote-access-point | String | Remote access point path |
| local-access-point | String | Local access point path |
| timeout | int | Milliseconds before the client drops the request |
| auto-transaction | boolean | Enable auto transaction. Default: false |
| connectorType | String | Set to ASYNC for asynchronous calls (see below) |
| forcefullyKeepResourceAdapter | boolean | Keep the resource adapter up across requests. Default: false. Available since 4.7.68 |
Supported buffers
| Buffer | What it is | Design-time |
|---|---|---|
| STRING | Null-terminated character array | No parser. Write the entity by hand |
| FML32 | Fielded buffer: each item has a field identifier (type + field number) | Parser for .fml32 sources |
| VIEW32 | Application C structure | Parser for .view32 sources |
Not supported: FML, VIEW, X_COMMON, X_C_TYPE, CARRAY, X_OCTET, XML, Tuxedo decimal (weblogic.wtc.jatmi.Decimal), FML32 nested inside FML32, and authentication when the process is not an EE server with the vendor config layout. Flat VIEW32 is supported. Embedded VIEW32 inside FML32 is generated; treat untested hierarchy cases as best-effort. CARRAY serialization was improved and is not fully verified.
VIEW32 parser
The source file must use the .view32 extension. In the parser dialog set:
- Service name: Tuxedo JCA service
- Input view: VIEW structure sent to the service
- Output view: VIEW structure returned by the service
The input and output lists show view names defined in the source (VIEW name … END).
The entity uses language=Languages.VIEW_32. The EXECUTE action path is the service name, with these action properties:
| Property | Value |
|---|---|
tuxedo.buffer.type | VIEW32 |
tuxedo.input.view.name | Input view name |
tuxedo.output.view.name | Output view name |
Input and output parts are @RpcPart classes. Fields keep originalName from the view. A VIEW32 entity cannot mix short, char, and long in one entity or JCA raises an error. The parser emits those numeric fields as int.
FML32 parser
The source file must use the .fml32 extension. Set the service name. Optionally point View file at a VIEW32 source so the parser can fill occurrence counts and embedded view structures.
The entity uses language=Languages.FML_32 and action property tuxedo.buffer.type = FML32. Each field carries TuxedoConst.FML_FIELD_ID. Do not edit that id. Without a companion VIEW32 file, occurrence counts stay 1 and an embedded view part can be empty. With the view file, repeating fields become @RpcList and an embedded view gets BUFFER_TYPE=VIEW32 plus INPUT_VIEW_NAME.
FML32 entities cannot use Java long. Use int. An FML32 source must not declare int fields; field ids built for int are rejected by JCA.
String buffer
There is no string-buffer parser. Mark the action with tuxedo.buffer.type = STRING and add the payload field yourself:
@RpcEntity(name = "Str")
@RpcActions(actions = {
@Action(action = RpcActions.EXECUTE.class, path = "TOUPPER", displayName = "Str", alias = "str",
actionProperties = {
@ActionProperty(name = TuxedoConst.BUFFER_TYPE, value = "STRING")
})
})
public class Str {
@RpcField
private String value;
}
Asynchronous calls
Set connectorType to ASYNC under the project prefix. The calling code stays the same. The provider sends with tpacall, returns the connection to the pool immediately, and completes the reply on a callback thread. A successful call yields a call descriptor; the provider also assigns an internal id that appears in debug logs next to that descriptor.
ol:
tuxedo:
project:
sdkname:
connectorType: ASYNC
Debug logging:
logging:
level:
io.ol.provider.tuxedojca: DEBUG
Keep the resource adapter running
From Core 4.7.x the Tuxedo resource adapter starts and stops on each request when the generated service calls disconnect(). That hurts throughput, especially in async mode. Set forcefullyKeepResourceAdapter: true (since 4.7.68) so the adapter starts once and stops on application shutdown, even when disconnect() runs:
ol:
tuxedo:
project:
sdkname:
forcefullyKeepResourceAdapter: true
Tuxedo JCA adapter setup, VIEW32 and FML32 parsers, string buffers, async calls, and the resource-adapter keep-alive flag.