IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to manage transaction from Java RPC Client

webMethods Community Member

webMethods Community MemberMon June 04, 2007 12:04 PM

  • 1.  How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 11:19 AM

    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?


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 2.  RE: How to manage transaction from Java RPC Client



  • 3.  RE: How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 12:04 PM

    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.


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 4.  RE: How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 01:45 PM

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


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 5.  RE: How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 02:05 PM

    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);
    library.setConversation(conv);

    … code managing rpc communication …

    try {
    library.closeConversationCommit();
    }
    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?


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 6.  RE: How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 02:18 PM

    Ah, I see the problem. You should replace

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

    with

    conv = new Conversation(library);

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

    Hope that helps.


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 7.  RE: How to manage transaction from Java RPC Client

    Posted Tue March 20, 2007 02:26 PM

    It’s working. Thanks you very much.


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 8.  RE: How to manage transaction from Java RPC Client

    Posted Thu May 03, 2007 04:04 PM

    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?


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 9.  RE: How to manage transaction from Java RPC Client

    Posted Thu May 03, 2007 04:48 PM

    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


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 10.  RE: How to manage transaction from Java RPC Client

    Posted Thu May 03, 2007 04:49 PM

    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.


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 11.  RE: How to manage transaction from Java RPC Client

    Posted Sat May 05, 2007 10:52 PM

    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.


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 12.  RE: How to manage transaction from Java RPC Client

    Posted Mon June 04, 2007 12:04 PM


  • 13.  RE: How to manage transaction from Java RPC Client

    Posted Thu June 07, 2007 09:22 PM

    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,


    #Mainframe-Integration
    #EntireX
    #webMethods