I hot-deploy my application as an exploded ear, and as a rule, I try to deploy as much as I possibly can into the ear directory and require as few changes to the stock JBoss installation as possible.
My deploy includes things like the Spring framework jars, the JTDS jar (JDBC driver for SQL server), the Apache commons jars, etc.
It works fine much of the time, but occasionally I run into some nasty problems, in particular I often get a NoClassDefFound exception from inside the JTDS driver after a number of hot deploys. Restarting JBoss clears up the problem, which is fine for a dev machine, but I eventually want to do automated hot deploys to production machines without having to manually restart them.
I'm told that this is a common problem and that I should avoid deploying things like JDBC drivers with my application; I'm sure I could work around the issue that way, but I hate to give up the benefits of including everything my application needs inside its own deployment.
Any advice? Thanks.