WURFL is an open source mobile database. I hope it could be the one that includes everything that we need to solve for mobile fragmentation. Luca Passani, the author of WURFL, has not stopped solving the fragmentation problem. The mailing list of WURFL is still buzzing, ranting on inconsiderate service providers such as Vodafone, proposing the improvement of J2ME capabilities, adding WURFLDB, etc…
Another particular tool that I like is the WALL library. Luca might have been busy to maintain it, but others have improved so. WALL library is comparable to the Mobile JSF.
WURFL is based on xml and can be imported to projects very easily.
WURFL do not cover user agent for web browser. But there is a patch that can be downloaded separately from their site.
Unzip wurfl and look into the project. In Init.java, there is a servlet init method that would load wurfl.xml when the servlet first initialize (there are 2 other approaches, but this is better). In addition, you have to make that servlet autostart by specifying in web.xml.