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

Posted by: Cagatay Civici on 2008-06-17 03:41:00.0

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


About Cagatay Civici

Cagatay Civici

Cagatay Civici is a member of JavaServer Faces Expert Group who defines the JSF specification(JSR-314), the founder and project lead of popular PrimeFaces Component Suite and PMC member of open source JSF implementation Apache MyFaces. He's a recognized speaker in international conferences including Jazoon, W-JAX, JSFSummit, JSFDays and many local events such as JUGs. Cagatay is also an author and technical reviewer of several books regarding web application development with Java and JSF. As an experienced trainer, he has trained over 100 java developers on Java EE technologies mainly JSF, Spring and JPA. Cagatay is currently working as a consultant for Prime Technology in Turkey.

More About Cagatay »

SpringOne 2GX

October 15 - 18, 2012

Washington DC

Current Topics on the NFJS Tour

  • Core Java, JEE
  • Dynamic Languages: Groovy, JRuby, Scala, Clojure
  • RESTful Web Apps
  • Frameworks: Hibernate, Grails, Spring, JSF, GWT, more
  • Agility
  • Test Driven Design
  • Security
  • Ajax, Flex, RIA
View Event Details »

NFJS, the Magazine

2013-08-01 00:00:00.0 Issue Now Available
  • Making Your Build Groovy, Part I: Ant

    by Kenneth Kousen
  • The Spring REST Stack, Part II

    by Josh Long
  • Effective Aggregate Design, Part I: Modeling a Single Aggregate

    by Vaughn Vernon
Learn More »