I have considered how this might be implemented. Here is a brief dump of the current state of affairs.
1. As Jonathan says - you can only implement this if your API specifies a redeploy(), not simply deploy()/undeploy() methods. The deployment JSR does list this as an optional requirement and a first step in being able to implement this in the Jetty/JBoss integration will be the JBoss service lifecycle including this method.
2. If this method is implemented then there are two ways in which I see this happening.
a) Marc has said that he would like to see the Http and Servlet-container parts of Jetty decoupled and plugged into the JBoss JMX Bus, so that every Http request is parsed, placed onto the bus, travels through a generic interceptor/aspect stack and then on to it's servlet. There would be problems in mapping the stream-based API currently in place between these two components to the invocation-based API used on the JMX bus - but these are under consideration. If this was done, then a future ValveInterceptor (as mentioned on this thread) would be used to achieve your goal.
b) Even if these two Jetty components remain tightly coupled, there is no reason why we (Jetty) should not implement some form of redeploy() in which a context remains somehow inhabited.....
This is the future. For the moment, I believe that with a little bit of configuration you should be able to map an underlying context to do what you want to do. Whilst your webapp is deployed it would shadow and 'steal' requests from this context. Whilst it is undeployed, they would fall through and be processed accordingly.
If you wish to follow through with this solution, please take this discussion to [EMAIL PROTECTED] where I am sure you will find more help on how this might be achieved. Stay in touch and if you come up with a solution I shall add it to the Jetty/JBoss FAQ.
Jules
Jonathan.O'[EMAIL PROTECTED] wrote:
David,
Two points about this: One: you HOPE the application is only down for a minute. You don't know if it will deploy properly.
Two: Maybe it could implemented with an interceptor, looking for requests to old Web apps. The web app would have to register with the interceptor saying it was going down. On deployment, it would unregister with the interceptor. However, I have no idea how you could implement it. No doubt, its easy enough for some interceptor expert.
Ciao, Jonathan O'Connor
David Corbin <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 28.02.2003 13:02 Please respond to jboss-user
To: JBoss User <[EMAIL PROTECTED]>
cc: Subject: [JBoss-user] Feature idea
The one thing I'd like to see jboss provide. When I an application is redeployed, I'd like to see JBoss accept requests for the context of the application, and return a page that says "Please try again in a few moments". Even better would be some way to configure the response. The key point is, that the application is down for a minute, we know that it's down for just a bit, we should be able to handle the "error" better.
David
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
