How to manage transaction from Java RPC Client

I don’t find in the documentation how to manage transaction from a Java RPC client (End of Transaction / Backout Transaction) with a Natural/Adabas RPC Server.

Who can help me?


Thanks you very much for the references but I knew already it.
I am looking for an example of Java RPC client to identify the java methods corresponding to the theory.

For my part the javadoc isn’t useful without a basic information giving you how to use it.

The first reference gives a brief description how to handle conversational calls. Is this not sufficient ?

No. Currently my code is like that :

private Broker broker;
private BrokerService brokerService;
private Conversation conv;
private Syga2 library; // Java class generated by EntireX Workbench

broker = new Broker (Syga2.DEFAULT_BROKERID,“USER”);
library = new Syga2(broker);
library.setRPCUserId("???"); // Natural Security User
library.setRPCPassword("???"); // Natural Security Password
library.setNaturalLogon(true); // Natural Security used

// create the BrokerService object
brokerService = new BrokerService(broker, Syga2.DEFAULT_SERVER);

conv = new Conversation(brokerService);

… code managing rpc communication …

try {
catch(BrokerException be) { … code managing error … }

Badly, the response of the server is:
EXX 0020 0004 API: No function possible after EOC

Sometime I have also timeout transaction.

Have you an idea?

Ah, I see the problem. You should replace

// create the BrokerService object
brokerService = new BrokerService(broker, Syga2.DEFAULT_SERVER);
conv = new Conversation(brokerService);


conv = new Conversation(library);

Note that the generated wrapper class (Syga2) inherits from RPCService which in turn inherits from BrokerService .

Hope that helps.

It’s working. Thanks you very much.

Now I have a problem with the client if the last entireX communication has been done since ‘a long time ago’. In this configuration, I receive each time the following error:
EXX 1014 3009 NATUARL RPC Server returns: NAT00082 2642 NAT3009 Transaction aborted (additions2: 9).

If a check the EntireX Broker Control Center I see that the conversation is well closed (don’t appear anymore).

Something is wrong in my Java program but I don’t know where.

If I execute several times this program, I see a client entry for each execution. Perhaps the problem is there.

Have you any idea?

Hi Colard
I think you should have a look at the natural environment instead.
The 3009 most likely a timeout of the natural session against adabas.
If this is the case the userexit NATRPC01 can be used to circumvent this problem.
Have a look in the natural documentation for how to implement this…

regards Finn

The message indicates that your Natural program received an Adabas timeout response code 9. You need to look into the Natural program and the Adabas settings. The Natural administrator should look into the user exit NATRPC09 - it is intended to deal with this issue.

A correction to my post… the correct exit is NATRPC39. NATRPC39 wil be called on each Broker timeout (00790079 return from Broker). The Service WAIT parameter governs the timeout period - if this is greater than your Adabas non-activity timeouts, then you may need to reduce the WAIT period (or increase the Adabas user non-activity period) - the Broker (RPC) wait should be a bit less than the Adabas time out.

From the documentation:

Avoiding Error Message NAT3009 from Server Program
If a server application program does not issue a database call during a longer period of time, the next database call might return a NAT3009 error message.

To avoid this problem, proceed as follows:

Add a FIND FIRST or HISTOGRAM statement in program NATRPC39, library SYSRPC.

Copy the updated program to library SYSTEM on FUSER.

The steplib concatenation of the library to which the server currently is logged on is not evaluated.

NATRPC39 has so

This subject is good for me.

However, i would like to referece how to request/receive on that program inside.
Do i need Convesation’s method as send() sendReceive or…?

if anyone show a good example, it would be help.

Best Regards,