Resin is one of the easiest application servers to develop with because of a number of developer-oriented features, but not a lot of people know about them! Let me mention a few of my favorites here:
- Automatic, in place compilation and recompilation of Java source. This feature lets you develop Java with the same ease as PHP. Just save your .java file in your webapp’s WEB-INF/classes directory (with the appropriate package path) and Resin will compile it for you. Changes are picked up as well and redeployed without restarting the whole server. Forget the hassle of building a .war for every little change, much less restarting the server.
- Versioned webapps. Say you’ve deployed your application, but found a bug. There are a few users who still have live sessions, so you don’t want to boot them off, but at the same time, you don’t want to allow new users to start new sessions with the buggy webapp. Versioned webapps let you deploy a new version that runs in parallel with the old version. The new version gets all the new sessions, while the old version stays live until the last old session expires. It allows a nice, soft rollout of new code. To use the feature, all you have to do is name your .war files with a version number. For example, foo-1.0.war would be superceded by foo-1.1.war, automatically.
- Live profiling. The /resin-admin application that’s provided with Resin has a number of great features for developers, one of which is the live profiler that shows how much time is spent in any given method and gives a stack trace to show how that method was reached. This should help you find the bottlenecks in your application.
- Heap dumps. This is another feature in the /resin-admin that gives you a sorted heap dump showing which objects take up the most memory.
There are a ton of other features, but hopefully that gives you a reason to try Resin or check out some of the features you’re missing if you’re already using Resin.
Existing users: are there any features that you’re using that you find helpful as a developer?