3

I'm new to JBoss Seam and Java web app development in general. One thing that I cannot figure out while going through a few tutorials is how to redeploy beans that I've made changes to in an EJB project without having to restart the JBoss Application Server (6.0) that is hosting the JBoss Seam web project which uses the beans. The JBoss AS takes about 2 mins to start up, and it is painful making changes to the project and redeploying at present.

Some suggestions that I've read on the web include:

  • Using the jmx-console eg. go to http://localhost:8080/jmx-console/ ... ok, but how? What do I do exactly?
  • creating a build.xml file for ant, and get some sort of autodeploy thing going... are there any good examples around?

How do the rest of you more experienced JBoss Seam web app developers deploy your projects more rapidly?

Any help much appreciated, thanks.

Fuzzy Analysis
  • 3,168
  • 2
  • 42
  • 66

3 Answers3

0

Another option that I have been told is to use the "Touch Descriptors" button (which is like a "quick redeploy" option) in JBoss.

Touch Descriptors icon in JBoss Dev Studio 4.0

Dev Studio 4.0 has it, not sure about earlier versions though. Apparently it creates a new timestamp on the server and forces the web.xml file to be re-read, thus redeploying.

Fuzzy Analysis
  • 3,168
  • 2
  • 42
  • 66
0

This can be due to a number of reasons:

  1. An application attempting to maintain state.
  2. The new deployed application having a different classloader than the old one.
  3. Other random causes. In our case, the jboss-classloading.xml configuration was not correct and this caused the hot deployment not to work.

Did you make any changes to your JBoss configuration? This can also lead to hot deployment issues.

Good luck.

  • As above, my JBoss AS was deploying too many unwanted projects all at once... after undeploying a few, it wasn't as slow. Thanks for the heads up on configuration issues, I will look out for them. – Fuzzy Analysis Jan 08 '12 at 11:33
0
  1. Use JBoss hot redeploy feature: just remove your EAR (WAR) from deploy directory and copy there your new version.
  2. Start JBoss in debug mode from your IDE (Eclipse). Then some code changes can be hot swapped directly into the JVM. If the hot swap fails, then do 1. hot redeploy.
  3. Try great JRebel plugin. Much more powerful than 2. JVM hot swapping. You can combine Jrebel with 1. hot redeploys - when JRebel plugin fails, then do hot redeploy.

Just beware, hot redeploying may reveal memory leaks in some libraries (e.g. Jasperreports). If so, do restart your server. But you need to restart JBoss very rarely.

xmedeko
  • 7,336
  • 6
  • 55
  • 85
  • Thanks. I figured out that the slowness of JBoss AS was due to it deploying too many projects at once (i had not undeployed old projects, what a mistake!). Thanks for your help, I will try the hot deployment options you mention if I ever run into the same problem in future. – Fuzzy Analysis Jan 08 '12 at 11:32