2 Replies Latest reply: Jan 4, 2010 7:05 PM by 843798 RSS

    intercept method while running on portal server

    843798
      Hi,
      I would like to be able to run a portal application and when a specific method is called to get access to the params being passed, and to change the params if needed or change what the method returns.
      This should be done without affecting code of the application.
      Anyone have any ideas?
        • 1. Re: intercept method while running on portal server
          791266
          moskvitch wrote:
          Hi,
          I would like to be able to run a portal application and when a specific method is called to get access to the params being passed, and to change the params if needed or change what the method returns.
          This should be done without affecting code of the application.
          Anyone have any ideas?
          What do you mean by not affecting the code of the application. Do you mean the source code or the class files? It could e.g be done with aspect oriented programming, or byte code manipulation libraries (asm, cglib)
          • 2. Re: intercept method while running on portal server
            843798
            What I mean is, that I don't want to change the application (Portal app) java code in order to be able to intercept a method at runtime.
            I want to create another application to intercept a specific method when that method is called.