When a class file change, Can I make the glassfish server not restart but still reflect the change?

萝らか妹 提交于 2019-12-11 07:08:56

问题


When a class file change, Can I make the glassfish server not restart but still reflect the change ?

I mean the glassfish sever doesn't redeployment(or publish) the application, but only redeployment the class that has changed.


回答1:


If this is meant to be done while development, you can give a shot to JRebel.




回答2:


There are a number of ways to redeploy an application onto GlassFish 3.1 that do not require that you restart the server.

The method I would recommend is 'asadmin redeploy --name foo --keepstate=true foo.war' (or use directory deployment for the web app...)

You can look at the man page for the redeploy subcommand of asadmin to learn more about the details.

I hardly ever create a deployable archive file.... I usually do directory deployment, which eliminates the time that would get used up creating and then exploding the archive file.

By using directory deployment I can also apply tweaks to jsp files and other static content to test them without a rebuild/redeploy step.

I like to use the keepstate option while I am doing development.

Another important step that you should take to avoid unnecessary restarts is to move to an open-source OS like Linux or Solaris (away from Windows) which has few file locking problems.



来源:https://stackoverflow.com/questions/5762567/when-a-class-file-change-can-i-make-the-glassfish-server-not-restart-but-still

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!