HotSwap and JAR/WAR/EAR files

Hi.

How do I use hot swap when the file I am running is a web application (i.e.
an EAR file I run under Jetty)?

Thanks,
Amnon


6 comments
Comment actions Permalink

In order to redefine the classes you'll have to make the new version of class files available, that is to make a new EAR file and
replace the old one with it. Provided that the EAR file is created from the classes in your "output" directory, IDEA will create a
list of classes that were changed, so after you have replaced the EAR, just press the HotSwap button. IMHO this should work.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"

"Amnon I. Govrin" <agovrin@freshwater.com> wrote in message news:bij639$aqb$1@is.intellij.net...

Hi.

>

How do I use hot swap when the file I am running is a web application (i.e.
an EAR file I run under Jetty)?

>

Thanks,
Amnon

>
>


0
Comment actions Permalink

My five cents. Hotswap actually scans your output path and redefines all the classes that were compiled after the debug session was started. Or rather it redefines only those classes that were loaded by VM.

If you are shure that all needed classes were loaded, than all you have to do is to run HotSwap.

If you are not shure, you will have to replace your JAR/EAR files with new version, so when the new version of classes will be loaded by VM. And only that you can run the HotSwap.

0
Comment actions Permalink

I'm not sure to have full understanding the way to use it but, what happens if the classes that you pack into your ear were compiled and packaged in a complex build process by ant (which is the "standard" way to build large ears) ?
For example, we rely heavily on ant, doing our nightly builds with it.
Actually (705), I run the ant build and deploy the resulting ear on my test server, then i make the project with intellij, then i connect the debugger to the server and cross my fingers. Depending on the server (and the way it re-deploys/update an application i guess), sometimes I have to restart it to be in sync, sometimes not. How will hotswap in aurora help me make my life easier in this case ?

0
Comment actions Permalink

1. Connect debugger to the server

2. Run ant build and redeploy EAR

3. Make project with IDEA

4. Run hotswap

5. goto 2.

0
Comment actions Permalink

Hotswap menu option is not enabled when I try this.

0
Comment actions Permalink

Ignore that last comment - just realised that remote app is running on pre 1.4 JDK...

0

Please sign in to leave a comment.