I learnt a lot about JBoss Tools whilst writing a quick demo for my talk at Javapolis, and I wanted share a favourite feature with you - hot deploy of Seam components. Now, of course, this works with any seam problems if you set it up right, but JBoss Tools makes it /seamless/ :-). It removes the need for calling out to ant to copy the files to the application server - this makes it so quick you don't even see the progress bar pop up!

So, how do you get this going in your project?

Well, first, create a new WAR project (you can't currently hot-deploy EJB3s - vote for the issue here!)

You can learn more about creating a new project here.

Create a new action called helloworld.

You can learn more about creating a new action here

Now, run your project on the server - you'll need to wait a few seconds while the server boots.

Find out more about deploying your project here.

Finally, add a method (note, we are changing the class signature here!) to one of your actions, and add a <h:commandLink /> to your view to call it. Make sure to save both the class and the facelets.

You are restricted to /action/ classes here - you can't hot deploy model classes (entities).

You'll notice that JBoss Tools also provides EL completion in java class files :-)

Seam tells you it has hot deployed the the component.

Refresh the page in your browser, click the button, and the method is called without having to restart your application - now you need another excuse to get a cup of coffee than I had to restart my application! ;-)

Well, that concludes our quick tour of hot deployment with Seam and JBoss Tools. The JBoss Tools docs are a great place to learn more.

Back to top