I have been playing with flex for a couple of weeks now,and i am trying to use flex as the UI and keeping the backend in Java with as usal Spring,Hibernate stack.
So in this series i will create a getting started project(CRUD contact management) using Spring,Hibernate/MySQL,Cairngorm as the UI MVC framework,GraniteDS for remoting and Tomcat as the server . For now i will create an eclipse based project and later move that to maven. The base intention of this project is to setup a prototype with all the above technologies defined and explore all the aspects of GraniteDS features to serve as the POC for other developers if they are willing to try it.
Hibernate Annotations is my preferred way to map my entity classes, since they don't require any external file (thus keeping mapping info in your Java files), is fully integrated with all Hibernate mapping capabilities and Hibernate documentation encourages us to use this kind of configuration because it's more efficient.
Annotation driven mapping in Hibernate uses the standard JPA API annotations and introduce some specific extensions to deal with some Hibernate features. You can find a full reference in the official documentation.
With the addition of generics in Java 5, writing a custom DAO for each domain object is no longer required. There are a wide variety of articles on creating generic DAOs, but my current project uses the approach from this IBM DeveloperWorks article. This approach was choses mainly because of the clearly written article and the integration with Spring. You should be able to extend any generic DAO based on Spring to implement the stored procedure configuration.
Thought I've bookmarked this a long time ago... "With the adoption of Java™ 5 generics, the idea of a generic typesafe Data Access Object (DAO) implementation has become feasible. In this article, system architect Per Mellqvist presents a generic DAO implementation class based on Hibernate. He then shows you how to use Spring AOP introductions to add a typesafe interface to the class for query execution."