Question on hot swap

Hi, this probably will end up not really being an IntelliJ issue but I'm going to try asking it here first anyway.

We use IntelliJ (both version 5 and 6) at my company for a large enterprise java project with java 1.5 and WebLogic 9. To save time we try to do hot deploys when developing to prevent having to bring the server down and up unecessarily. However, the only time hot swap works is when the code changes are very "minor" - such as changing local variables/code within a method. If you change a method signature at all, or add/delete a method or class, you will get a "hot swap not supported in jvm" error.

Is this just how hot swap works? Is this a limitation of WebLogic?? (seems a little hard to believe...) Thanks for any help or advice!!

4 comments

It sounds like what you really should be doing is side-by-side deployment. The hotswap is intended for development, not production updates.

http://dev2dev.bea.com/pub/a/2005/09/production_reployment.html

http://www.developer.com/design/article.php/3638656

http://weblogic.sys-con.com/read/185310.htm

0

And yes, this is a general limitation of hot swap, at least for the Sun VM (but AFAIK others aren't better).
IIRC there's an entry in Sun's bug database with quite a lot of votes to change that.

eagle63 wrote:

Hi, this probably will end up not really being an IntelliJ issue but I'm going to try asking it here first anyway.

We use IntelliJ (both version 5 and 6) at my company for a large enterprise java project with java 1.5 and WebLogic 9. To save time we try to do hot deploys when developing to prevent having to bring the server down and up unecessarily. However, the only time hot swap works is when the code changes are very "minor" - such as changing local variables/code within a method. If you change a method signature at all, or add/delete a method or class, you will get a "hot swap not supported in jvm" error.

Is this just how hot swap works? Is this a limitation of WebLogic?? (seems a little hard to believe...) Thanks for any help or advice!!

0

Thanks for the replies! No, I'm not talking about production deploys... this is during development.

Stephen - that's unfortunately the answer I was expecting. (a limitation of the VM) The reason I brought it up here is because after doing some googling on the subject I ended up in some Eclipse forums where I came away with the feeling that they were able to hot deploys pretty much whenever they wanted. So I started wondering if possibly I didn't have something configured correctly or maybe there was an IntelliJ limitation of some kind. Well, hopefully SUN will enhance this in future versions of the JVM. Thanks,

0

Note that hot deploy and hot swap are two different beasts.
If you deploy you app in exploded form, you can let Idea "package" a file (from the context menu) which copies
it to the exploded directory where it is picked up and reloaded by the app server.
At least that works with JBoss - i am not so sure about WebLogic.
Because here a custom class loader of the app server is used the VM hot swap limitations do not apply.
But effectively you'll get a second class rather than a redefine of the same class in-place.

eagle63 wrote:

Thanks for the replies! No, I'm not talking about production deploys... this is during development.

Stephen - that's unfortunately the answer I was expecting. (a limitation of the VM) The reason I brought it up here is because after doing some googling on the subject I ended up in some Eclipse forums where I came away with the feeling that they were able to hot deploys pretty much whenever they wanted. So I started wondering if possibly I didn't have something configured correctly or maybe there was an IntelliJ limitation of some kind. Well, hopefully SUN will enhance this in future versions of the JVM. Thanks,

0

Please sign in to leave a comment.