e120274 (1) [Avatar] Offline
I am trying to use AspectJ from Eclipse3.3M4, I have integrated part of our project with AspectJ. We are using Log4j to log the some of method enterances and exceptions. I want to change this logging mechanisms with AspectJ logging. So I have created two aspects for logging the public classes and catching exceptions.
The question is while adding these aspects, my server seems to execute slower. I do not really understand what AspectJ do, so asking if any performance problems occurs with AspectJ while logging and catching exceptions. And also if there is a way to close the DBRowset whene an SQLException occurs with AspectJ.
ramnivas (171) [Avatar] Offline
Re: Performance while using AspectJ in Logging
AspectJ by itself will not cause performance problem. However, if you start to trace too many methods, those extra log operations will obviously add overhead.

Yes, you can close the DBRowset when an SQLException occurs. Please refer to chapter 8 for the worker object pattern that might come in handy here.