ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Calling RPG from Java instance on the same platform

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling RPG from Java instance on the same platform

    Hi folks

    I'm looking for some advice on calling RPG from Java on the same System I box. The scenario is that we want an IVR to pass XML messages to the System I via IBM's MQ. The MQ instance is running in Java so we will have a listener running in Java as a batch job. Each message received will then need to call existing RPG program that will parse the data, interrogate the data and return a formatted XML message to the IVR.

    What I want to understand is the best way of integrating Java calls to RPG.

    Is it best to use JNI, PCML or is it best to use the Java Toolbox to develop a solution?

    We expect to be taking around 100-200 calls per hour.

    Appreciate your help and guidance!

    If any more info is needed, let me know and I'll post some more?

    Cheers
    Stu

  • #2
    Re: Calling RPG from Java instance on the same platform

    I haven't quite understood why you need to use Java? Why not an RPG program on the end of the queue to handle requests?
    We use a setup where requests from our external web site through MQ, handled by an RPG program to farm out the work based on message content/request type. One of these job streams generates an xml response and passes it back through the MQ to the web site.
    All RPG code, nothing too taxing. It easily handles hundreds of requests per hour, I've not done the stats
    the smoking gnu

    Comment


    • #3
      Re: Calling RPG from Java instance on the same platform

      Hi Chris

      We are governed to use a generic java interface into MQ, which is a suite of jars that we have to call when retrieving messages from the queue or listening on the queue. This generic instance is used on a number of systems and gives us re-usability across the organisation.

      Cheers
      Stu

      Comment


      • #4
        Re: Calling RPG from Java instance on the same platform

        Ok what will be will be.
        I've seen a PCML instance, we used to have it here. It was a bit clunky but then it was written almost 10 years ago. It does work, it was the method used for handling our web site requests before we moved to MQ and RPG solution I described.
        the smoking gnu

        Comment


        • #5
          Re: Calling RPG from Java instance on the same platform

          Several ways to do it. Another way not mentioned so far is to have Java call an SQL User Defined Function, which calls the RPG program and returns the Xml Data.

          I will always cringe, though, when I see Java mentioned in something that needs to have consistently good performance, such as a customer experience to the system (IVR, Website, Etc.) . Is there a reason to pass the data through MQ? I can maybe see that transport being used if multiple systems will handle the same call. But I cant see using MQ if only the i and IVR need to talk to each other. If thats the case, you could simply wrap the RPG program in a webservice call and have the IVR call the webservice for the messages directly.

          For more than a decade, my company wrote call center software, and we interfaced with dataq's and sockets, which both worked great and never failed. It's old school, but its still faster and more reliable than java. The issue I have with java is that there is no easy way to fix performance issues. It is what it is, which is basically the " java the hut " of programming languages. But if you are forced to go that route, take a look at UDF's or possibly web service calls.
          Michael Catalani
          IS Director, eCommerce & Web Development
          Acceptance Insurance Corporation
          www.AcceptanceInsurance.com
          www.ProvatoSys.com

          Comment


          • #6
            Re: Calling RPG from Java instance on the same platform

            If it walks like a duck...

            Comment

            Working...
            X