Hi,
Thanks for the reply. Yes, i agree that refractoring can help to improve
the design. But my real problem with AspectJ is bit different. There are
situations where we may need to log certain business logic. For eg., After
manipulating some variable we may need to log the state of the variable.
Currently i am not able to find any solution for this problem. is there any
solution for this problem in AspectJ ?
Also, I am trying to use AspectJ in RCP Application which has lot of eclipse
plugins. But, I am facing dependency problems. If any of you have used AspectJ
in RCP applications or know any article on using AspectJ based logging for RCP
Applications, i would greatly appreciate your help
Thanks & Regards
Prasanna L.M
View my site
@
www.prasannalm.com
----- Original Message ----
From: Dean Wampler <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, October 5, 2007 6:33:28 PM
Subject: Re: [aspectj-users] Issues while using AspectJ for logging
Presanna,
The best (and maybe only) solution is to refactor the code to extract each of
those "points" into separate methods, then log the entry to and exit from each
of those methods. Not only will refactoring solve this particular logging
problem, but your overall design will be improved by the decomposition of large
methods into small methods
(http://wiki.java.net/bin/view/People/SmellsToRefactorings).
Of course, depending on the code base, that might be a lot of work, but the
Eclipse and IntelliJ refactorings make it easy to do.
Good luck,
dean
On Oct 5, 2007, at 1:10 AM, Prasanna LM wrote:
Hi,
I am using AspectJ for the logging concern. I am able to add the log
statements (entering & exiting) for all the public methods and also in
exception cases. But, there are lot of other log statements inside the methods,
which i want add using the aspects. I am not able to find a solution for this
using aspectJ. This is one of the main requirement, if i want to separate the
logging concern from main business logic.
can any body help me to solve this problem ?
Regards
Prasanna
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Dean Wampler, Ph.D.
dean at objectmentor.com
http://www.objectmentor.com
See also:
http://www.aspectprogramming.com AOP advocacy site
http://aquarium.rubyforge.org AOP for Ruby
http://www.contract4j.org Design by Contract for Java5
I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.
Application Terminated.
[Okay] [Cancel]
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow _______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users