tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Permgen issue?
Date Thu, 03 Sep 2015 13:35:27 GMT
Hi

I got the same analysis on the "where is the leak" but if you want us to
prevent this leak we would kill your task. This behavior is outside EE
specification and I'm tempted to not do it since  you can add a @PreDestroy
keeping track of your task using a Future<Void> or Future<Boolean> and
cancel the task through the future in predestroy if necessary. If we kill
it and you are actually doing something important then you will blame the
container :p.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-09-03 15:23 GMT+02:00 tonywestonuk <tonyw@totspics.com>:

> Ok..... the Async Bug, I replicated it in a example app.   If you have
> something like the following, this will cause the Webapplication to not be
> unloaded correctly, and permgen leak will result.
>
> The problem appears to be with ContextBindings which is part of the vector
> of classes in the StandardClassLoader.
>
> This ContextBindings class has a static map of Threads to threadnames....
> one of these threads in the map is the Asynchrounous thread that is used to
> process the async method.  This is not being unloaded, and so hangs around
> preventing the unloading of the webapp.
>
> I think this is a bug in TOMEE, unless you can see a problem with my code
> below....
>
>
>
>
>
> @Singleton
> public class MyAsyncService {
>         @Inject MyAsyncService asyncService;
>
>         public void doIt(){
>                 asyncService.doItAsync();
>                 System.out.println("Done");
>         }
>
>         @Asynchronous
>         public void doItAsync(){
>
>                 System.out.println("Doing it async");
>         }
> }
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Permgen-issue-tp4676065p4676086.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message