Annotation Driven JSF-Spring-JPA-Spring Security-Orchestra

Posted by: Cagatay Civici on 06/17/2008

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,

username: tony
password: 55555


  • Currently 5.0/5
  • 1
  • 2
  • 3
  • 4
  • 5
5.0 rating out of 1 votes

About Cagatay Civici

Cagatay Civici

Cagatay Civici is the founder and project lead of popular PrimeFaces Component Suite, PMC member of open source JSF implementation Apache MyFaces and committer of Atmosphere Ajax Push/Comet Framework. He's a recognized speaker in international conferences and many local events. He is also an author and technical reviewer of several books regarding web application development with Java and JSF. Cagatay is currently working as a freelancer consultant and instructor in the UK.

More About Cagatay »

NFJS, the Magazine

August Issue Now Available
  • Google Your Persistent Domain Model
    by John Griffin
  • Get Cooking in the Cloud with Chef, Part 2
    by Michael Nygard
  • Making Java Bearable with Guava
    by Daniel Hinojosa
  • HTML 5 Update
    by Brian Sletten
Learn More »