5 Replies Latest reply: Jan 23, 2014 12:14 PM by Todd Little-Oracle RSS

    Intercept Tuxedo tpcall

    young_matthewd

      Using Tuxedo 11+

       

      Is it possible to intercept Tuxedo tpcall similar to aspect/aop in Java (etc. before, after, around)?  Seen talk about this ability in the TSAM plugins.  Any ideas how to do this without TSAM?

       

      Basically want to do an "around" on successfully tpcall capturing in/out parameters then firing these off to another process.

       

       

      Thanks in advance / Matthew

        • 1. Re: Intercept Tuxedo tpcall
          user9130018

          Hello

           

          If you have foo service then unadvertise it (in tmadmin), advertise it as foo_ and advertise foo in your wrapper server.

          your wrapper will be called and then is can forward to foo_

          • 2. Re: Intercept Tuxedo tpcall
            MatthewDavidYoung

            @user913018, appreciate the suggestion.  Little too intrusive on the configuration but a good workaround.

             

            Wondering if anybody has tried pre-loading dynamic linking?  Doing for example a LD_PRELOAD on calls to tpcall, a simple hook?  Gives me access to parameters and results.  Overhead might be a deal breaker but it would be pretty a non-intrusive way to intercept.

            • 3. Re: Intercept Tuxedo tpcall
              Todd Little-Oracle

              Hi,

               

              Not sure I understand the "too intrusive" comment?  In any case, you certainly could develop a shim dynamic library and intercept tpcall(), although I don't know of anyone that has done that.  A supported mechanism for doing what you want to do is to create an auditing plug-in.  Tuxedo has built-in auditing capabilities that allow you to define your own auditing plugin that can be called pre-operation and post-operation.  With that, you should be able to do what you want.  I believe you have to contact Oracle Customer Support to get the details of how to develop your own auditing plugin.

               

              Regards,

              Todd Little

              Oracle Tuxedo Chief Architect

              • 4. Re: Intercept Tuxedo tpcall
                young_matthewd

                Thanks.

                 

                Like the idea of an auditing plugin.  Writing my own interceptor from the caller's perspective is easy but a bear subject to Tuxedo changes if I want to intercept server tpcalls.  Will get in contact with Oracle support.

                • 5. Re: Intercept Tuxedo tpcall
                  Todd Little-Oracle

                  Hi,

                   

                  I'm not sure I understand what you mean when you say "but a bear subject to Tuxedo changes if I want to intercept server tpcalls. "?  The auditing plug-in audits every access to an auditable resource, of which a service is something that can be audited.  So does it matter whether the plug-in is called when the caller makes the tpcall() and gets the reply or when the server gets the request and replies?  Both should yield the same result.

                   

                  Regards,

                  Todd Little

                  Oracle Tuxedo Chief Architect