开发者

Is is possible to have a clean undeploy in Glassfish?

I realized that any application which uses hibernate, fails to开发者_高级运维 undeploy completely in Glassfish 2.1.1. Many classes remain in memory after the undeployment process, you can check it using jmap and jhat.

I've done several tests, and figured out that only applications which had hibernate failed to have a clen undeploy process. My Database provider for Hibernate in all the cases were jTDS 1.2.5.

You don't even need to run the application. If you just deploy, and instantly undeploy, you will realize several classes in memory, many from your application and many from hibernate and its dependencies.

Is it possible to have a clean undeploy in Glassfish v2.1.1? I'm running out of permgen space all the time.


This is not a definitive answer, but it can at least minimize glassfish related undeployement issues, if you are using hibernate:

  • Don't use enums in your entities. Create regular classes instead.
  • Annotate only methods, don't annotate properties.

These two items can help minimizing problems, but don't get them rid of your development environment. Even if you don't use hibernate, your sesion beans stay forever in memory even after undeployement.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜