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.
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.
First I want to say that this is a great post. Really cool if you use Seam Eclipse projects and such.
I have something to contribute. This solution will probably not work for those people that use a maven project structure. But there is a solution for that too. I finally wrote my Blog entry explaining how to get incremental hot deployment working with Eclipse, Maven and Seam (JEE) projects. If you are interested then take a look here.
/I am not a native English speaker/writer so I apologize if my sentences look a bit strange some times./
Pete and Maurice,
Cool and valuable post and comment above. Thanks a lot for sharing. I would like to vote strongly for supporting hot deployment of SEAM applications using JSF 1.2 as the Web Tier and EJB3.0-based business tier. SEAM originated out as a JSF-EJB 3 integration enabling technology and I think that we should support hot deployment using EAR files.
With that said, I believe that there is a proposed change to WAR file format in EE6 to include EJB in a WAR file. If so, that might be a change to keep in mind for the future.
Glad you like Hot deployment. I have been using hot deployment in MyEclipse with Seam for like as long as I can remember (must be about a year or more). I did try to get people enthused on the Seam forums but no one really understood I don't think. :)
And thats the FULL ear! not just the War!
You are right. I used MyEclipse a while ago and it is a nice tool. But you need to be willing to pay for it and MyEclipse forces you to use a certain project structure (at least the last time I used it).
Is it possible to hot deploy POJOs in an EAR project? I've been working on an EAR project for 2 years now, and I'd REALLY like to use this feature :-)
How can i hot deploy the normal ear application in the jBoss using eclipse