开发者

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

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

I mean the glassfish 开发者_StackOverflow中文版sever doesn't redeployment(or publish) the application, but only redeployment the class that has changed.


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.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜