Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] problems with load time weaving and rmi communication

Hi,

I'm not directly commenting on the rmi communication point, but can
I ask if you are using a dev build of AspectJ or AspectJ 1.5.0 final?

We've fixed numerous memory leaks over the last few weeks which are
in the latest dev builds (although your memory usage problem seems
particular bad...).  And right now I'm working with Ron Bodkin
to integrate some of work he's been doing to greatly improve the memory
usage in an LTW environment - these latter changes aren't in AspectJ
yet but will be shortly (I hope).

if you want to keep tabs on things, watch these bugs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=128650
https://bugs.eclipse.org/bugs/show_bug.cgi?id=129297

Andy.

On 03/03/06, Thilo Focke <thilo.focke@xxxxxxxxx> wrote:
Hello,

i wrote an aspect, that collects performance data for every public
method in my webapplication that has a special annotation. The
corresponding pointcut looks like this:

    pointcut probeMethod(Object object): execution(@MyAnnotation *
*.*(..)) && this(object);

i integrated the aspect in my tomcat container and activated load time
weaving (-javaagent:aspectweaver.jar).
then i wrote a simple servlet that has a public method with this
annotation (the method just waits a short time via Thread.sleep()) and
tested it with a little stress test (jwebunit test), that permanently
called the servlet request. Simultaneously i observed my servlet
container (tomcat) via jconsole (heap memory usage, loaded classes). the
memory usage was constant while the test was running and the aspect
worked fine.

now i extended my annotated method with rmi communication, like the
following:

        Properties prop = new Properties();
        prop.put("java.naming.factory.initial",
"weblogic.jndi.WLInitialContextFactory");
        prop.put("java.naming.provider.url", "t3://MyIP");
        InitialContext ctx = new InitialContext(prop);
        Object objref = ctx.lookup("MyBean");
        MyServiceHome beanHome = (MyServiceHome)
javax.rmi.PortableRemoteObject.narrow(objref, MyServiceHome.class);
        MyService myService = beanHome.create ();
        myService.doSomething();

Now i started my stress test again. The Aspect again worked fine but i
amazed about the memory usage: While running the test the heap memory
usage increased permanently (up to 1 GByte!!). Additionally i noticed
that classes where loaded permanently (noticed this with jconsole).

This phenomenon does only occur when i add bean communication via rmi.
without that, everything works fine.

does anyone has an explanation for this? i assume the load time weaving
mechanism has problems with rmi communication, but i don't know why...

greetings,
thilo
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top