-
1. Re: Hot redeployment
gavin.king Mar 7, 2007 1:35 AM (in response to gavin.king)ie. this gives you the same development cycle for JavaBean components that we have today for facelets pages.
-
2. Re: Hot redeployment
michael.yuan Mar 7, 2007 2:16 AM (in response to gavin.king)Okay, I must admit that I am a bit lost here:
What is the difference between WEB-INF/dev and WEB-INF/classes? What if the content of those two dirs go out of sync? I am guessing that in the "debug" mode, Seam only loads classes from WEB-INF/dev and ignores WEB-INF/classes? Am I way off here? :)
In any case, this sounds really cool. Does this make developing in Seam POJO more appealing than developing in EJB3 beans? ;) -
3. Re: Hot redeployment
adambrod Mar 7, 2007 8:39 AM (in response to gavin.king)Does this work in any web container? If so, this could be a huge boost to productivity. Right now if I change a class file I have to redeploy the webapp. Since Seam scans all the classes, Spring does a bunch of context loading, and Hibernate scans for Jpa annotations, it takes about 4 mins.
I am very excited if this feature will give us a shortcut! -
4. Re: Hot redeployment
christian.bauer Mar 7, 2007 8:52 AM (in response to gavin.king)I wouldn't jump on it just now, it's really experimental. I'm testing it and the first issue with the generated build script is that you have to split your compilation into two steps, which isn't really possible for anything but the most trivial action + model application.
I'm working on a script that deploys things based on configurable package patterns, so you can say "these are the packages I want to enable for hot redeployment with Seam".
Progress is being logged on http://jira.jboss.com/jira/browse/JBSEAM-997 -
5. Re: Hot redeployment
gavin.king Mar 7, 2007 10:32 AM (in response to gavin.king)What is the difference between WEB-INF/dev and WEB-INF/classes?
Stuff in WEB-INF/classes gets loaded onto the WAR classloader, so it cant be reloaded w/o restarting the deployment. Stuff in WEB-INF/dev gets loaded by a special Seam classloader, so it can be reloaded any time it changes.What if the content of those two dirs go out of sync?
"reloadable" classes don't go into WEB-INF/classes during development. "non-reloadable" classes, eg. Hibernate entities live in WEB-INF/classes.Does this make developing in Seam POJO more appealing than developing in EJB3 beans? ;)
I'm afraid to say it does, at least until the EJB3 container supports a similar mechanism. -
6. Re: Hot redeployment
gavin.king Mar 7, 2007 10:33 AM (in response to gavin.king)Does this work in any web container?
Should do, at least any that supports exploded deployment. -
7. Re: Hot redeployment
christian.bauer Mar 7, 2007 12:41 PM (in response to gavin.king)I've posted a build.xml I'm using with IntelliJ here: http://jira.jboss.com/jira/browse/JBSEAM-997
-
8. Re: Hot redeployment
gavin.king Mar 7, 2007 1:07 PM (in response to gavin.king)So I *think* we can get the same thing for ejb3 components by deploying them into WEB-INF/dev and loading them using E-EJB3. However, I'm not sure that E-EJB3 currently runs inside JBoss, so I would probably need some changes there.
-
9. Re: Hot redeployment
christian.bauer Mar 7, 2007 1:10 PM (in response to gavin.king)We should probably try to make the EJB3 deployer more flexible instead. On the other hand, your approach would work on other appservers.
-
10. Re: Hot redeployment
stephen.friedrich Mar 7, 2007 1:41 PM (in response to gavin.king)For what it's worth: I strongly agree that rather than rolling your own, the app server itself should be made more flexible.
In fact reloading works even right now, if you don't change anything Seam specific, right? At least I seem to have no problem with hot deployment when I just changed the implementation of a method. -
11. Re: Hot redeployment
gavin.king Mar 7, 2007 1:48 PM (in response to gavin.king)The problem with JBoss hot deployment today is that redeployment occurs when something changes. Which means that if you are editing stuff in eclipse, and the seam-gen build is copying that stuff across to the deploy dir, you have two choices:
(1) touch the descriptor every time, and get thousands of redeploys (JBoss blows up when it runs out of permgen space)
(2) don't touch the descriptor until user explicitly asks for a restart (which is irritating to user)
The way Seam's hotdeploy works is that it redeploys the components when a request comes in, and it notices that there has been some change in WEB-INF/dev.
Which means that you avoid the permgen errors. -
12. Re: Hot redeployment
cja987 Mar 7, 2007 2:04 PM (in response to gavin.king)"gavin.king@jboss.com" wrote:
I've just committed a new feature to CVS that lets code changes made to Seam JavaBean components be visible immediately without a container restart.
Mmmm yeah, take that tapestry 5. I think I'm going to have to migrate away from EJB's sooner rather than later to take advantage of stuff like this (it's not like I use them, but I did like having web services available if I needed them). I'm thinking that in a couple years, all java frameworks are going to move to a "hot replace" model (and here's where the smalltalk crowd gets to be smug).
There's also a push these days toward OSGi as a way to dynamically construct systems. Does Seam have a strategy for that? -
13. Re: Hot redeployment
stephen.friedrich Mar 7, 2007 3:07 PM (in response to gavin.king)"gavin.king@jboss.com" wrote:
The problem with JBoss hot deployment today is that redeployment occurs when something changes. Which means that if you are editing stuff in eclipse, and the seam-gen build is copying that stuff across to the deploy dir, you have two choices:
So part of this is an Eclipse problem?
I am using Idea. After re-compiling a class I can choose to either hotswap (if I am debugging, using JVM TI) or package (let Idea copy the class file to the exploded dir and let JBoss pick up the single file there). -
14. Re: Hot redeployment
tony.herstell1 Mar 7, 2007 3:47 PM (in response to gavin.king)I only ever use exploded deployment in MyEclipse anyhow.
No Ant at all so no build or deploy stage.
Only occasionally do you get messages from Jboss/MyEclipse saying it recommends doing a re-start of the server (one-click) and if you have improved on this thats cool... save even more time.