JBoss deployment without restarting server
I have a problem regarding to the software deployment. We're using JBoss 4.2.3.
Please let me explain a typical manual deployment process I'm doing now:
- Copy EARs, WARs and JARs to server.
- Stop server.
- Copy EARs, WARs and JARs to deploy folder.
- Run database update script.
- Start server.
I was looking for a way to avoid the server restart. Because it caused a lot of problem and a lot of inconvenience. 开发者_如何学运维For example, I had to send emails to a big list in order to schedule a server down time.
The other problem is, we have 2 servers which communicate with each other remotely via SOAP, if one server goes down, it will likely cause some data synchronization problems.
The hot deployment didn't really work for me. Sometimes I got class loaders exceptions, and sometimes cache issues.
I was considering clustering but not quite sure if it would work or not.
Does anyone have any similar experience? Any solutions or suggestions?
Many thanks in advance.
p.s. should I post this on serverfault instead of stackoverflow? (I prefer here because I'm a developer :)
If hot-deployment isn't working for you, and restarts are not an option, then the only other thing I can suggest is clustering with failover - run two servers rather than one, with your SOAP requests load-balanced across them both . When you need to perform an upgrade, you shut down one server, upgrade, start it up, shutdown the 2nd server, upgrade that, and start it back up.
If you do it right (it's tricky, but do-able), then you have no down-time. You have to make sure the servers can co-exist during the rolling upgrades, and make sure your database upgrades are backwards compatible, but that can all be achieved.
精彩评论