For performance sure, a java based solution is going to kick rail's ass. For speed of development though developing with EJBs is not even up to the standard of rails 1. The funny thing is, java is generally used to build enterprise apps which don't need anything like web scale performance. For this profile of app rails really shines, it's plenty fast enough and will hugely reduce development costs.