5 Replies Latest reply: Sep 12, 2012 10:41 AM by 961400 RSS

    Tuxedo api to Java that allows me to implement/exec the perl script !

    961400
      Hi,

      I searched few links however am not getting close to what I am looking to implement.

      I have a perl script for monitoring tuxedo queues, gives me the status of the queues something like number of message that have exceeded the sla. Within the script commands like qmadmin/qset etc are being used .When running the perl script ./queuestatus i am prompted with another text "command" prompting me to enter input numbers 1-10 to gather more details on each queue that is being monitored.


      What I would like to do is use a tuxedo api if possible that I can integrate in java that would take my perl command like
      <path to the perl script>./queuestatus along with arguments 1-10 since i want to gather the details of all the queues at one go if possible and buffer it out to further display the result on the UI etc?

      jdk 1.6 and Bea Weblogic 11g is what I use.

      Any help is appreciated!

      Thanks
      aqua
        • 1. Re: Tuxedo api to Java that allows me to implement/exec the perl script !
          Todd Little-Oracle
          Hi Aqua,

          The perl repositories provide a module that allows you to make Tuxedo calls from perl. Using that, you could skip the command based mechanism you are currently using and instead use the Tuxedo MIB. By making calls to the .TMIB service, you can pretty much get any information you want about Tuxedo. You could also make these calls from WLS if so desired by setting up the domain gateway and the WebLogic Tuxedo Connector (WTC) and importing the .TMIB service. Then you can use the JATMI interface provided by WTC to make the calls to the .TMIB service.

          Regards,
          Todd Little
          Oracle Tuxedo Chief Architect
          • 2. Re: Tuxedo api to Java that allows me to implement/exec the perl script !
            961400
            Hello Todd,
            Thank you for your prompt reply.

            I will try the 2nd option.
            "You could also make these calls from WLS if so desired by setting up the domain gateway and the WebLogic Tuxedo Connector (WTC) and importing the .TMIB service. Then you can use the JATMI interface provided by WTC to make the calls to the .TMIB service."

            Setting up the domain gateway, i would think is something that I would need to do via the weblogic console,correct?
            Is there a link or good example that does follow this concept? I will research more on it as well.

            Thanks again.
            aqua.
            • 3. Re: Tuxedo api to Java that allows me to implement/exec the perl script !
              961400
              Hello Todd,

              Sorry, I failed to mention the script queuestatus.sh I have is a vendor specific script that is currently run by our administrators and details of each message is then manually reported out via email.


              In order to automate that process , i am trying to do this.
              So if I have the WTC domain setup via the WLS console, and import the .TMIB service(which I am still trying to figure out) by going under the import tab, would i be able to configure/call the script queuestatus running on different prod machines this way the grunt work is already done. Similar to a datasource setup for the different databases.

              Once I have done that JATMI interface provided by WTC can be used to make the calls to each and get the details of the queues l(ike I would have had i run the script manually) .TMIB service (10 boxes having the scripts then ten .TMIB services)


              Thanks
              aqua
              • 4. Re: Tuxedo api to Java that allows me to implement/exec the perl script !
                Todd Little-Oracle
                Hi Aqua,

                What I was proposing wouldn't use a script at all. Tuxedo really has no means of supporting scripts beyond whatever the operating system provides. My proposal was to write some code that would query the Tuxedo MIB (Management Information Base) via a service call to the .TMIB service requesting the same information the script is currently gathering. The code that makes these calls could be written in any Tuxedo support language, or by using the Tuxedo domain gateway and WTC on WLS, you could write the code in Java.

                The Tuxedo MIB provides access to essentially all the information Tuxedo maintains about the system. You call the .TMIB service like you would any other service passing it an FML32 buffer with certain fields set to tell the MIB what information you want and it returns an FML32 buffer with the information.

                If you need to stay with the script, then I'm not sure how to best automate it other than to use something like cron.

                Regards,
                Todd Little
                Oracle Tuxedo Chief Architect
                • 5. Re: Tuxedo api to Java that allows me to implement/exec the perl script !
                  961400
                  Hello Todd,
                  Thank you for your reply.
                  I do have to stick with the script.

                  I have used Java Secure Channel before to execute commands like grep on vendor specific perl scripts to get some key details and automate it that way.

                  I figured maybe there is something that tuxedo has a command line api that would let me get the output of the tuxedo related script.

                  Thank you for your help once again
                  aqua.