views:

879

answers:

2

Hi there, i'm developing a spring-based application with facelets and Java Server Faces which works on Jboss Application Server. As a development Framework, i'm using Eclipse Ganymede Platform Version: 3.4.2 , which integrates the Web Standard Tools and therefore offers support for different servers, like Jboss 5.0.

I'm deploying my app on Jboss within Eclipse. First time it runs fine, but when I try to make some changes and republish my application, it just doesn't get it, so I'm forced to restart the server. This is quite annoying since it takes about a minute or so each time I have to restart JBoss.

So, the question is: is there any means to redeploy apps on Jboss without having to restart it?

Thanks in advance!

A: 

If you manage the JBoss (start/stop) using the eclipse you should be able to redeploy directly form the eclipse.

If you are deploying to the deploy directory, then running over the original war/ear will cause it to re-deploy. Notice that depends on your app size you may encounter OutOfMemoryErrors.

What we do (though it doesn't always work) is that we deploy an ear, run the JBoss and debug remotely using the JPDA. When we make a change (as long as you do not change the signature of a method) it hot swaps the class to the one with the change.

David Rabinowitz
A: 

If your deploying a WAR file then the easiest way is to use the 'servers' plugin in eclipse. MyEclipse comes pre-configured.

Here you will be able to select your servlet container and will have full control within eclipse. No need for any ANT files or need to leave your Eclipse IDE.

In order for this setup to work, your project needs to be a 'Web Project'.

Once you have setup your web project, hit the configuration button in the servers window, select your web project and add it.

Then hit the run/debug button on the servers screen.

The only gotcha is, you need to make sure your source classpath points to WEB-INF/classes not target/classes in order for hot deploy to work. The maven plugin eclipse:eclipse resets this so beware.

JamesC
that's what I do but when I run again the app on the Jboss it gets stuck with a message saying smth like 'destroying singletons...' and the web application doesn't work. on the other hand, when I try to redeploy, it starts to consume so many resources that I'm forced to kill the jboss process from the bash. it's crazy!
markitus82
Two Things: (1) Have you tried deploying to Tomcat to see if you get a similar problem? I assume you don't need an EJB container. (2) Have you tried setting up a brand new very simple project to see if that works against tomcat/jboss?
JamesC
the fact of using Jboss is a client requirement so there's no change. In our previous project, we used Tomcat as application server and there was no problem when redeploying the app. it is weird, but around here there are 3 of us with hands on this project and experiencing the same problem with Jboss app server.
markitus82