Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Stop Jetty and free classloader in perm memory

Hi,

First, sorry for the previous mail which was send prematurely :s

So,

I'm using Jetty 6.

I started the server this way :
Server server = new Server(store.getDefaultInt(ConsolePreferenceConstants.CONSOLE_PORT));
WebAppContext warWebappContext = new WebAppContext(MyWebApp, MyContextPath);
warWebappContext.setClassLoader(new WebAppClassLoader(MyClassloader, warWebappContext));
server.addHandler(warWebappContext);

And then close it this way :
consoleServer.stop();
consoleServer.destroy();

But like that the classloader is kept in perm memory (I use a dump of the memory to see that)
As I stop and start an amount of time the server there is a a lot of Clasloader in perm memory which is never released.

I tried several things to free them :
- remove WebAppContext from server handler.
- stop and destroy WebAppContext
- destroy the WebAppClassLoader

and call System.gc() after each of these attempts without success in any case.

So what is proper way to shutdown the server and free up the memory from classloader?

Thanks by advance for any hints.

Regards,

Aurelien Pupier

PS : I didn't see a jetty forum on Eclipse forum, no one exist?

Back to the top