SlideShare une entreprise Scribd logo
1  sur  30
1
INTRODUCTION


       PRÉSENTATION DU FRAMEWORK


          MODÈLE COMPOSANT SEAM



          CONCEPTS TECHNIQUES DU FRAMEWORK



       CONCLUSION



2
3
 Le framework JBoss Seam est un framework Open Source
               à l'initiative de Gavin King
          (fondateur du framework Hibernate).

            Premiere version:seam 1.0 sortie en juin 2006




4
Un framework destiné à la simplification du développement
            des applications web complexes.

                Un framework basé sur des concepts de la
                        spécification JAVA EE 5.

                   Un framework fournissant un modèle
                 de composant, une API et des annotations.

5
Deux composants d’architecture clefs pour la création
      des applications web

                      Couche présentation

                              Modèle de composant(processus
                                   métier et persistance)


6
7
8
8
Intégration jsf,ejb3.0

    JBoss EL
            Expressions paramétrées
             <h:commandButton
               action="#{universite.trouverClasse(filiere, niveau)}"
               value=“classe"/>



9
Outillage


            Seam-gen



                       Jboss tools


10
11
11
Demo




            12
12
Contextes aplicatifs
          Contexte stateless @scope(STATELESS)
         Contexte event @scope(EVENT)
         Contexte page @scope(PAGE)
         Contexte session @scope(SESSION)
          Contexte Business Process @scope(Business_Process)
         Contexte conversation @scope(CONVERSATION)
         Contexte application @scope(APPLICATION)
13
Gestion des événements assynchrones avec seam
     EVENT:
        Déclencher l’événement dans le corps de la méthode




       Déclencher l’événement sur l’appel d’une méthode
                        @RaiseEvent("postAdded ")

14                 @RaiseAsynchronousEvent(« postAdded »)
Gestion des événements assynchrones avec seam

     Observer:


                    @Observer("postAdded ")




15
Gestion des événements assynchrones avec seam

               <components>
               <event type="PostAdded">
               <action
               execute="#{PostAddedListener.info
               rm}"/>
               </event>
                </components>

16
Gestion de la conversation

           Manière implicite:composant type ejb statefull


              Manière explicite:des javabeans declarés dans
                         le contexte conversation



17
Gestion de la conversation




18
Gestion de la conversation


                       Demo




19
Gestion de la conversation
      Nested conversation
                  Conversation mère



                                 Sous_conversation1



                                                Sous_conversation1.2



                                 Sous_conversation2

20
Principe de l’injection et de la bijection
 @Name("connection")
 @Scope(ScopeType.SESSION)                                            @Out
 public class ConnectionBean
    implements Connection {                    @In

 String id;                    <component name="entityManager"
 String password;              scope="session"
 @In("entityManager")                auto-create="true"
 EntityManager em;             class="org.jboss.seam.core.ManagedPersistenceC
                               ontext">
 …
                                    <property
 }                             name="persistenceUnitJndiName">java:/odaceEn
                               tityManagerFactory</property>
                                                                         21
21                                 </component>
Principe de l’injection et de la bijection
     @Stateless
     @Name("useraction")                                 @Out

     public class UserAction implements UserIt {

     @In @Out private User user;                   @In
     @Out private List userList;

     @PersistenceContext private EntityManager
        em;

     public String addAndDisplay() {
      user = new User ();
      userList = em.createQuery("From User u
     order by u.name").getResultList();
      return null;
     }

22
Page flow
                                                                         Process shopping
     <pageflow-definition […] name="shopping">
     <start-state name="start">
     <transition to="browse"/>                                                            browse
     </start-state>
     <page name="browse" view-id="/browse.xhtml" redirect="true">
     <transition name="browse" to="browse"/>
     <transition name="checkout" to="checkout"/>                               Browse.xhtml
     </page>
     <page name="checkout" view-id="/checkout.xhtml" redirect="true">
     <transition name="checkout" to="checkout"/>
                                                                        checkout         checkout
     <transition name="complete" to="complete"/>
     </page>
     <page name="complete" view-id="/complete.xhtml" redirect="true">
     <end-conversation />                                                     Checkout.xhtml
     </page>
     </pageflow-definition>
                                                                        complete
     Pageflow.jpdl.xml
     @Begin(join=true, processDefinition="shopping")
     public String doSearch() {                                               Complete.xhtml
     …
23   }
Authentification
     Deux composants Seam pour l’authentification:

                      Identity contient les méthodes pour
                   l'authentification et la connaissance l'état de
                         l'utilisateur (loggé ou non etc ...)


                        Credentials contient les données
                                de l'utilisateur.
24
Démo Authentification




25
Integration ajax 1/2

       Librairies JSF
             Ajax4JSF : extension Ajax des composants
             JSF de base
                  RichFaces et IceFaces
             (composants graphiques riches)




26
Integration ajax 2/2

     Seam remoting
               Appel de méthode distante comme si elle
                            était locale.
                             @WebRemote

       mycomponent=seam.compenent.getinstance(‘’mycomponent’’)



27
Integration avec seam framework
JBOSS server =>Weblogic, WebSphere,OC4J,Tomcat,Glassfish
JSF =>Wicket, Tapestry, GWT, ou Flex

                   EJB =>POJO, Composant Spring
                   JExcelApi
                   YARFRAW
                   iText

28
                   Jboss-Seam-Mail
CONCLUSION


     Seam a apporté une vraie valeur ajoutée à
     notre projet JSF/EJB3/JPA et nous a
     permis de gagner en productivité.




29
*
     Merci pour votre attention

                 *




30

Contenu connexe

Tendances

Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Eric Bourdet
 
REST JUG Toulouse 20100615
REST JUG Toulouse 20100615REST JUG Toulouse 20100615
REST JUG Toulouse 20100615JUG Toulouse
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring bootAntoine Rey
 
Presentation JEE et son écossystéme
Presentation JEE et son écossystémePresentation JEE et son écossystéme
Presentation JEE et son écossystémeAlgeria JUG
 
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - Cours
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - CoursENIB cours CAI Web - Séance 4 - Frameworks/Spring - Cours
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - CoursHoracio Gonzalez
 
Service WEB de type REST avec Java
Service WEB de type REST avec JavaService WEB de type REST avec Java
Service WEB de type REST avec JavaFrancois ANDRE
 
Marzouk une introduction à jdbc
Marzouk une introduction à jdbcMarzouk une introduction à jdbc
Marzouk une introduction à jdbcabderrahim marzouk
 
Introduction à AngularJS
Introduction à AngularJSIntroduction à AngularJS
Introduction à AngularJSAbdoulaye Dieng
 
Les dessous du framework spring
Les dessous du framework springLes dessous du framework spring
Les dessous du framework springAntoine Rey
 
Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Antoine Rey
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVCNathaniel Richand
 
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...ENSET, Université Hassan II Casablanca
 

Tendances (20)

Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01Jsf 110530152515-phpapp01
Jsf 110530152515-phpapp01
 
Les Servlets et JSP
Les Servlets et JSPLes Servlets et JSP
Les Servlets et JSP
 
REST JUG Toulouse 20100615
REST JUG Toulouse 20100615REST JUG Toulouse 20100615
REST JUG Toulouse 20100615
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring boot
 
Presentation JEE et son écossystéme
Presentation JEE et son écossystémePresentation JEE et son écossystéme
Presentation JEE et son écossystéme
 
Presentation jsf2
Presentation jsf2Presentation jsf2
Presentation jsf2
 
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - Cours
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - CoursENIB cours CAI Web - Séance 4 - Frameworks/Spring - Cours
ENIB cours CAI Web - Séance 4 - Frameworks/Spring - Cours
 
Service WEB de type REST avec Java
Service WEB de type REST avec JavaService WEB de type REST avec Java
Service WEB de type REST avec Java
 
Services rest & jersey
Services rest & jerseyServices rest & jersey
Services rest & jersey
 
Servlets et JSP
Servlets et JSPServlets et JSP
Servlets et JSP
 
Marzouk une introduction à jdbc
Marzouk une introduction à jdbcMarzouk une introduction à jdbc
Marzouk une introduction à jdbc
 
Spring
SpringSpring
Spring
 
Marzouk-HTTP-SESSION-JEE
Marzouk-HTTP-SESSION-JEEMarzouk-HTTP-SESSION-JEE
Marzouk-HTTP-SESSION-JEE
 
Tp java ee.pptx
Tp java ee.pptxTp java ee.pptx
Tp java ee.pptx
 
Introduction à AngularJS
Introduction à AngularJSIntroduction à AngularJS
Introduction à AngularJS
 
Support JEE Servlet Jsp MVC M.Youssfi
Support JEE Servlet Jsp MVC M.YoussfiSupport JEE Servlet Jsp MVC M.Youssfi
Support JEE Servlet Jsp MVC M.Youssfi
 
Les dessous du framework spring
Les dessous du framework springLes dessous du framework spring
Les dessous du framework spring
 
Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVC
 
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...Support de cours EJB 3 version complète Par Mr  Youssfi, ENSET, Université Ha...
Support de cours EJB 3 version complète Par Mr Youssfi, ENSET, Université Ha...
 

En vedette

Introducción Seam
Introducción SeamIntroducción Seam
Introducción Seamsebasjm
 
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...BPMSinfo
 
J bpm workflow
J bpm workflowJ bpm workflow
J bpm workflowBENFTIMA
 
Process-driven applications: let BPM do (some of) your work
Process-driven applications: let BPM do (some of) your workProcess-driven applications: let BPM do (some of) your work
Process-driven applications: let BPM do (some of) your workKris Verlaenen
 
As media studies evaluation (with word links)
As media studies evaluation (with word links)As media studies evaluation (with word links)
As media studies evaluation (with word links)Charlie_pal
 
Mis10050 ict in business-facebook project
Mis10050 ict in business-facebook projectMis10050 ict in business-facebook project
Mis10050 ict in business-facebook projectGareth Leahy
 
the rise of feminism
the rise of feminismthe rise of feminism
the rise of feminismGlen Giger
 
Presentation Agency Tambor
Presentation Agency TamborPresentation Agency Tambor
Presentation Agency TamborTambor_Digital
 
How NOT 2 Suck at Presenting Your Work
How NOT 2 Suck at Presenting Your WorkHow NOT 2 Suck at Presenting Your Work
How NOT 2 Suck at Presenting Your WorkMegan Mead
 
Public contests of neologisms in Estonia
Public contests of neologisms in EstoniaPublic contests of neologisms in Estonia
Public contests of neologisms in EstoniaTERMCAT
 
Erasmus za mladi pretpriemaci mk
Erasmus za mladi pretpriemaci mkErasmus za mladi pretpriemaci mk
Erasmus za mladi pretpriemaci mkBranko Dokuzovski
 
Toronto Pearson Airport - Terminal Expansion Project Presentation
Toronto Pearson Airport - Terminal Expansion Project PresentationToronto Pearson Airport - Terminal Expansion Project Presentation
Toronto Pearson Airport - Terminal Expansion Project PresentationAhmed Mahmoud
 

En vedette (20)

Introducción Seam
Introducción SeamIntroducción Seam
Introducción Seam
 
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...
Conférence solutions bpms 2011 - Agilité du SI et agilité de l'entreprise 201...
 
Drools
DroolsDrools
Drools
 
J bpm workflow
J bpm workflowJ bpm workflow
J bpm workflow
 
jBPM, open source BPM
jBPM, open source BPMjBPM, open source BPM
jBPM, open source BPM
 
BPMN,jBPM,BPEL
BPMN,jBPM,BPELBPMN,jBPM,BPEL
BPMN,jBPM,BPEL
 
jBPM v7 Roadmap
jBPM v7 RoadmapjBPM v7 Roadmap
jBPM v7 Roadmap
 
Process-driven applications: let BPM do (some of) your work
Process-driven applications: let BPM do (some of) your workProcess-driven applications: let BPM do (some of) your work
Process-driven applications: let BPM do (some of) your work
 
As media studies evaluation (with word links)
As media studies evaluation (with word links)As media studies evaluation (with word links)
As media studies evaluation (with word links)
 
Mis10050 ict in business-facebook project
Mis10050 ict in business-facebook projectMis10050 ict in business-facebook project
Mis10050 ict in business-facebook project
 
the rise of feminism
the rise of feminismthe rise of feminism
the rise of feminism
 
Presentation Agency Tambor
Presentation Agency TamborPresentation Agency Tambor
Presentation Agency Tambor
 
How NOT 2 Suck at Presenting Your Work
How NOT 2 Suck at Presenting Your WorkHow NOT 2 Suck at Presenting Your Work
How NOT 2 Suck at Presenting Your Work
 
Public contests of neologisms in Estonia
Public contests of neologisms in EstoniaPublic contests of neologisms in Estonia
Public contests of neologisms in Estonia
 
Erasmus za mladi pretpriemaci mk
Erasmus za mladi pretpriemaci mkErasmus za mladi pretpriemaci mk
Erasmus za mladi pretpriemaci mk
 
Chi square2012
Chi square2012Chi square2012
Chi square2012
 
Toronto Pearson Airport - Terminal Expansion Project Presentation
Toronto Pearson Airport - Terminal Expansion Project PresentationToronto Pearson Airport - Terminal Expansion Project Presentation
Toronto Pearson Airport - Terminal Expansion Project Presentation
 
Pizza hut
Pizza hutPizza hut
Pizza hut
 
burak t a
burak t aburak t a
burak t a
 
6 cach-lay-long-sep
6 cach-lay-long-sep6 cach-lay-long-sep
6 cach-lay-long-sep
 

Similaire à Jboss Seam

Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Tugdual Grall
 
1-Introduction JQuery.pptx
1-Introduction JQuery.pptx1-Introduction JQuery.pptx
1-Introduction JQuery.pptxlaabid1
 
react-slides.ppx (2) (1).pptx react presentation basic
react-slides.ppx (2) (1).pptx react presentation basicreact-slides.ppx (2) (1).pptx react presentation basic
react-slides.ppx (2) (1).pptx react presentation basiczineblahib2
 
Solution Linux 2009 - JavaScript
Solution Linux 2009 - JavaScriptSolution Linux 2009 - JavaScript
Solution Linux 2009 - JavaScriptRaphaël Semeteys
 
Et pourquoi pas JEE ?
Et pourquoi pas JEE ?Et pourquoi pas JEE ?
Et pourquoi pas JEE ?PALO IT
 
Quelle place pour le framework Rails dans le développement d'application web
Quelle place pour le framework Rails dans le développement d'application webQuelle place pour le framework Rails dans le développement d'application web
Quelle place pour le framework Rails dans le développement d'application web5pidou
 
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01Eric Bourdet
 
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)Eric Bourdet
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataLhouceine OUHAMZA
 
Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?GreenIvory
 
Cours yeoman backbone box2d
Cours yeoman backbone box2dCours yeoman backbone box2d
Cours yeoman backbone box2dhugomallet
 
MVVM de A à Z
MVVM de A à ZMVVM de A à Z
MVVM de A à ZMicrosoft
 

Similaire à Jboss Seam (20)

Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Support de Cours JSF2 Première partie Intégration avec Spring
Support de Cours JSF2 Première partie Intégration avec SpringSupport de Cours JSF2 Première partie Intégration avec Spring
Support de Cours JSF2 Première partie Intégration avec Spring
 
Hibernate et jsf
Hibernate et jsfHibernate et jsf
Hibernate et jsf
 
Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)
 
1-Introduction JQuery.pptx
1-Introduction JQuery.pptx1-Introduction JQuery.pptx
1-Introduction JQuery.pptx
 
2
22
2
 
react-slides.ppx (2) (1).pptx react presentation basic
react-slides.ppx (2) (1).pptx react presentation basicreact-slides.ppx (2) (1).pptx react presentation basic
react-slides.ppx (2) (1).pptx react presentation basic
 
Solution Linux 2009 - JavaScript
Solution Linux 2009 - JavaScriptSolution Linux 2009 - JavaScript
Solution Linux 2009 - JavaScript
 
Java Server Faces 2
Java Server Faces 2Java Server Faces 2
Java Server Faces 2
 
Et pourquoi pas JEE ?
Et pourquoi pas JEE ?Et pourquoi pas JEE ?
Et pourquoi pas JEE ?
 
Tapestry
TapestryTapestry
Tapestry
 
Quelle place pour le framework Rails dans le développement d'application web
Quelle place pour le framework Rails dans le développement d'application webQuelle place pour le framework Rails dans le développement d'application web
Quelle place pour le framework Rails dans le développement d'application web
 
react-fr.pdf
react-fr.pdfreact-fr.pdf
react-fr.pdf
 
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01
 
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)
Supportdecoursejb3versioncompletemryoussfi 140317162653-phpapp01 (1)
 
Formation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-dataFormation jpa-hibernate-spring-data
Formation jpa-hibernate-spring-data
 
Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?
 
Cours yeoman backbone box2d
Cours yeoman backbone box2dCours yeoman backbone box2d
Cours yeoman backbone box2d
 
MVVM de A à Z
MVVM de A à ZMVVM de A à Z
MVVM de A à Z
 
Rapport tp3 j2ee
Rapport tp3 j2eeRapport tp3 j2ee
Rapport tp3 j2ee
 

Plus de Slimen Belhaj Ali (17)

Solution générique pour la résolution des problèmes statiques de tournées de ...
Solution générique pour la résolution des problèmes statiques de tournées de ...Solution générique pour la résolution des problèmes statiques de tournées de ...
Solution générique pour la résolution des problèmes statiques de tournées de ...
 
Websphere
WebsphereWebsphere
Websphere
 
Sécurisation des services WCF avec WS-Security
Sécurisation des services WCF avec WS-SecuritySécurisation des services WCF avec WS-Security
Sécurisation des services WCF avec WS-Security
 
JasperReport
JasperReportJasperReport
JasperReport
 
ERP Universitaire
ERP UniversitaireERP Universitaire
ERP Universitaire
 
Tutorial
TutorialTutorial
Tutorial
 
Spring security
Spring securitySpring security
Spring security
 
Spring mvc 3.0 web flow
Spring mvc 3.0 web flowSpring mvc 3.0 web flow
Spring mvc 3.0 web flow
 
Share point 2010
Share point 2010Share point 2010
Share point 2010
 
TFS
TFSTFS
TFS
 
objective C
objective Cobjective C
objective C
 
Android
AndroidAndroid
Android
 
Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
WPF MVVM
WPF MVVMWPF MVVM
WPF MVVM
 
Google appengine&guice
Google appengine&guiceGoogle appengine&guice
Google appengine&guice
 
Sonar-Hodson-Maven
Sonar-Hodson-MavenSonar-Hodson-Maven
Sonar-Hodson-Maven
 
Administration glassfish 3
Administration glassfish 3Administration glassfish 3
Administration glassfish 3
 

Jboss Seam

  • 1. 1
  • 2. INTRODUCTION PRÉSENTATION DU FRAMEWORK MODÈLE COMPOSANT SEAM CONCEPTS TECHNIQUES DU FRAMEWORK CONCLUSION 2
  • 3. 3
  • 4.  Le framework JBoss Seam est un framework Open Source à l'initiative de Gavin King (fondateur du framework Hibernate). Premiere version:seam 1.0 sortie en juin 2006 4
  • 5. Un framework destiné à la simplification du développement des applications web complexes. Un framework basé sur des concepts de la spécification JAVA EE 5.  Un framework fournissant un modèle de composant, une API et des annotations. 5
  • 6. Deux composants d’architecture clefs pour la création des applications web Couche présentation Modèle de composant(processus métier et persistance) 6
  • 7. 7
  • 8. 8 8
  • 9. Intégration jsf,ejb3.0 JBoss EL Expressions paramétrées <h:commandButton action="#{universite.trouverClasse(filiere, niveau)}" value=“classe"/> 9
  • 10. Outillage Seam-gen Jboss tools 10
  • 11. 11 11
  • 12. Demo 12 12
  • 13. Contextes aplicatifs Contexte stateless @scope(STATELESS) Contexte event @scope(EVENT) Contexte page @scope(PAGE) Contexte session @scope(SESSION)  Contexte Business Process @scope(Business_Process) Contexte conversation @scope(CONVERSATION) Contexte application @scope(APPLICATION) 13
  • 14. Gestion des événements assynchrones avec seam EVENT: Déclencher l’événement dans le corps de la méthode Déclencher l’événement sur l’appel d’une méthode @RaiseEvent("postAdded ") 14 @RaiseAsynchronousEvent(« postAdded »)
  • 15. Gestion des événements assynchrones avec seam Observer: @Observer("postAdded ") 15
  • 16. Gestion des événements assynchrones avec seam <components> <event type="PostAdded"> <action execute="#{PostAddedListener.info rm}"/> </event> </components> 16
  • 17. Gestion de la conversation Manière implicite:composant type ejb statefull Manière explicite:des javabeans declarés dans le contexte conversation 17
  • 18. Gestion de la conversation 18
  • 19. Gestion de la conversation Demo 19
  • 20. Gestion de la conversation Nested conversation Conversation mère Sous_conversation1 Sous_conversation1.2 Sous_conversation2 20
  • 21. Principe de l’injection et de la bijection @Name("connection") @Scope(ScopeType.SESSION) @Out public class ConnectionBean implements Connection { @In String id; <component name="entityManager" String password; scope="session" @In("entityManager") auto-create="true" EntityManager em; class="org.jboss.seam.core.ManagedPersistenceC ontext"> … <property } name="persistenceUnitJndiName">java:/odaceEn tityManagerFactory</property> 21 21 </component>
  • 22. Principe de l’injection et de la bijection @Stateless @Name("useraction") @Out public class UserAction implements UserIt { @In @Out private User user; @In @Out private List userList; @PersistenceContext private EntityManager em; public String addAndDisplay() { user = new User (); userList = em.createQuery("From User u order by u.name").getResultList(); return null; } 22
  • 23. Page flow Process shopping <pageflow-definition […] name="shopping"> <start-state name="start"> <transition to="browse"/> browse </start-state> <page name="browse" view-id="/browse.xhtml" redirect="true"> <transition name="browse" to="browse"/> <transition name="checkout" to="checkout"/> Browse.xhtml </page> <page name="checkout" view-id="/checkout.xhtml" redirect="true"> <transition name="checkout" to="checkout"/> checkout checkout <transition name="complete" to="complete"/> </page> <page name="complete" view-id="/complete.xhtml" redirect="true"> <end-conversation /> Checkout.xhtml </page> </pageflow-definition> complete Pageflow.jpdl.xml @Begin(join=true, processDefinition="shopping") public String doSearch() { Complete.xhtml … 23 }
  • 24. Authentification Deux composants Seam pour l’authentification: Identity contient les méthodes pour l'authentification et la connaissance l'état de l'utilisateur (loggé ou non etc ...) Credentials contient les données de l'utilisateur. 24
  • 26. Integration ajax 1/2 Librairies JSF Ajax4JSF : extension Ajax des composants JSF de base RichFaces et IceFaces (composants graphiques riches) 26
  • 27. Integration ajax 2/2 Seam remoting Appel de méthode distante comme si elle était locale. @WebRemote mycomponent=seam.compenent.getinstance(‘’mycomponent’’) 27
  • 28. Integration avec seam framework JBOSS server =>Weblogic, WebSphere,OC4J,Tomcat,Glassfish JSF =>Wicket, Tapestry, GWT, ou Flex EJB =>POJO, Composant Spring JExcelApi YARFRAW iText 28 Jboss-Seam-Mail
  • 29. CONCLUSION Seam a apporté une vraie valeur ajoutée à notre projet JSF/EJB3/JPA et nous a permis de gagner en productivité. 29
  • 30. * Merci pour votre attention * 30