Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How can i advise program termination ?

Hi,
I would like to advise a program termination to write collected data in a file when the program terminate rather than writting data during the execution.
I tried to use an execution pointcut on main method and write data with a after advice like this :

aspect MyAspect {
  pointcut theEnd() : execution(* *.main(..));

  after() : theEnd() {
     // write data
     ...
  }
}

The problem is that the program is still running after leaving the main method in j3d applications.

Anyone has a suggestion ?
Thanks in advance.

Tich

Back to the top