Annotation Driven JSF-Spring-JPA-Spring Security-Orchestra
June 17, 2008 14 Comments
On my way to combine my favorite frameworks together, I posted an example application called moviestore demonstrating the annotation driven integration of JSF(Facelets)-Spring-JPA. .
Lately I’ve added Spring-Security and Apache MyFaces Orchestra to this formula to fix the missing parts for security and conversation-workflow management.
Here’s the final contents of moviestore;
– JSF with Facelets, Apache MyFaces 1.2 impl
– Spring 2.5.x
– JPA with Toplink
– Spring Security
– Apache MyFaces Orchestra
with jetty and hsqldb
The example contains two modes of new movie entity creation, one is done on single page and the other is the wizard mode and consists of 3 pages.Thanks to MyFaces Orchestra, creating wizards, flowScopes, viewScopes are no-brainer. Best part is that you dont get Lazy Exception since Orchestra manages the entity manager per conversation rescuing us from the openblablainviewfilter pattern. If you’re still not using Orchestra, give it a try, it’ll make your life much easier, simply request or session scope both are not enough for web applications and Orchestra is a life-saver. Again Persistence support
is a fantastic bonus.
Other addition to the moviestore example is the spring-security formerly known as acegi. I really liked the new namespace support, considering the number of xml lines with Acegi, Spring-Security is fun to use.
You can download the moviestore here. It uses in memory db and jetty so just running
mvn jetty:run is enough to test the moviestore in action. By the way,