SlideShare a Scribd company logo
Markos Fragkakis
JHUG meeting 20 Nov 2010
My experience with JBoss Seam and JSF:
•  Used plain JSF 1.2 for prototype (~1 month)
•  Used Seam 2.2 in actual implementation (~9
months)

What is this presentation about?
•  Common tasks where Seam makes life easier
    Separated business logic
     in:	
     ◦    JSF managed beans	
     ◦    Business components (EJBs)	



    EJB lookup	
Context context = new InitialContext();   	
context.lookup("java:comp/env/...");
  One kind of “stuff ”
  Seam Components
     ◦  POJOs
     ◦  EJB
     ◦  Entities
    Seam unifies Java EE:
     ◦    Dependency Injection
     ◦    Transactions
     ◦    Security

  No separation between front-
   end components and business
   components.
  Define your own architecture
faces-config.xml	
    JSF
                                        <managed-bean>	
     ◦  Through faces-config.xml           <managed-bean-name>myBean1</managed-bean-name>	
                                          <managed-bean-class>mypackage.MyBean1</managed-
                                          bean-class>	

    Java EE: @EJB                        <managed-bean-scope>application</managed-bean-
                                          scope>	
                                       </managed-bean>	
     ◦  Servlets, Filters, Listeners
                                       <managed-bean>	
     ◦  Tag handlers, tag library          <managed-bean-name>myBean2</managed-bean-name>	

        event listeners                   <managed-bean-class>mypackage.MyBean2</managed-
                                          bean-class>	
                                          <managed-bean-scope>request</managed-bean-scope>	
     … but not in JSF Managed              <managed-property>	
      beans (backing beans)                    <property-name>myBean1</property-name>	
                                               <value>#{myBean1}</value>	
                                           </managed-property>	
                                       </managed-bean>
    Injection of Seam
     components       @Name("myBean")	
                        @Scope(ScopeType.EVENT)	
     ◦  EJB             public class MyBean {	

     ◦  Entities           @In(create=true)	

     ◦  POJOs              private AccountFacadeRemote accountFacade;	


    Outjection            @In(scope=ScopeType.CONVERSATION)	
                           @Out(scope=ScopeType.CONVERSATION)	
                           private AccountEntity accountEntity;	

                           @In	
                           @Out	
                           private SomePojo somePojo;	
                           …
    State:
     ◦  Server (i.e. session)
     ◦  Client (i.e. hidden fields)
     ◦  Combination
    JSF
     ◦  Request parameters
        (i.e. hidden fields)
     ◦  Cookies
     ◦  URLs: http://jhug.gr/user/markos
    Maybe a problem:
     object != object
     JSF UI Component
      tree and state
     ◦  Tomahawk <t:saveState>
     ◦  Richfaces <a4j:keepAlive>
    If client-side state:
     object != object
    Session
     ◦  Problems:
         Increased memory usage
         Scalability problems
         Need to consider
          multiple tabs
    Seam scopes:
     ◦  Event (Request)
     ◦  Session
     ◦  Application
     ◦  Page
     ◦  Stateless
     ◦  Business Process
     ◦  Conversation
    What is a conversation?
     ◦  Lives for multiple requests
     ◦  Stateful, but not session
  Conversation end / timeout
  Aggressive management
    Application Security:
     ◦  Page-level security
     ◦  Component-level security
    JSF does not specify security
    Can a filter be used?
     ◦  Does View Handler use the
        Servlet Request Dispatcher?
          JSP:Yes
<filter-mapping> 	
     <filter-name>My Security Filter</filter-name> 	
     <url-pattern>/view2.jsp</url-pattern>	
     <dispatcher>REQUEST</dispatcher> 	
     <dispatcher>FORWARD</dispatcher> 	
</filter-mapping>
          Facelets: No
     Both Page-level and Component-level security
     Some examples:
      ◦  Page-level authentication / authorization
<pages login-view-id="/login.xhtml"> 	
  <page view-id=”admin*" login-required="true”>	
     	<restrict>#{s:hasRole('admin')}</restrict>	
 </page> 	
</pages>	


<security:identity authenticate-method="#{authManager.authenticate}"/>	

      ◦  Page customization	
<s:link view="/jhug/deleteMember.xhtml" value="Delete" rendered="#{s:hasRole('admin') ||	
s:hasRole(’usermanager')}"/> 	
      ◦  Component-level authorization	

@Name("myBean")	
@Scope(ScopeType.SESSION)	
@Restrict("#{s:hasRole('admin')}") 	
public class MyBean implements Serializable {	
…
<h:commandLink value="Click here” action="#{myBean.method}">	
  <f:setPropertyActionListener target="#{myBean.methodParameter}”
value="#{value}" />	
</h:commandLink>	

public class MyBean {	
    private String param;	

     public String method() {	
         if("something".equals(param)) {	
             return "ok";	
         }	
         return "notOk";	
     }	

     public String getParam() {	
         return param;	
     }	
     public void setParam(String param) {	
         this.param = param;	
     }	
}
<h:commandLink value="Click here” action="#{myBean.method(value)}” />	


@Name("myBean")	
public class MyBean {	

     public String method(String param) {	
         if("something".equals(param)) {	
             return "ok";	
         }	
         return "notOk";	
     }	

}
  Help:
  ◦  Good books
  ◦  Extensive, up-to-date documentation
  ◦  Old forum, somewhat inactive
  ◦  StackOverflow.com
  Issues:
  ◦  Works best on JBoss AS
  ◦  Seam 2 issues are resolved slowly
     (Focus on Seam 3)
?

More Related Content

What's hot

Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Ajin Abraham
 
Enterprise single sign on
Enterprise single sign onEnterprise single sign on
Enterprise single sign on
Archit Sharma
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
Zafar Shahid, PhD
 
Owasp zap
Owasp zapOwasp zap
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
Jollen Chen
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
n|u - The Open Security Community
 
Flutter vs xamarin vs react native - Mobile App Development Framework
Flutter vs xamarin vs react native - Mobile App Development FrameworkFlutter vs xamarin vs react native - Mobile App Development Framework
Flutter vs xamarin vs react native - Mobile App Development Framework
developeronrents
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
Mohammed Adam
 
Devops
DevopsDevops
Devops
Daniel Fikre
 
Owasp zap
Owasp zapOwasp zap
DevSecOps What Why and How
DevSecOps What Why and HowDevSecOps What Why and How
DevSecOps What Why and How
NotSoSecure Global Services
 
Web Application Firewall
Web Application FirewallWeb Application Firewall
Web Application Firewall
Chandrapal Badshah
 
Deployment model Blue Green deployment
Deployment model Blue Green deploymentDeployment model Blue Green deployment
Deployment model Blue Green deployment
jeetendra mandal
 
Debugging mule
Debugging   muleDebugging   mule
Debugging mule
Sindhu VL
 
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
Frederik Schweiger
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services
 
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...
SlideTeam
 
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdfKinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
Stringee JSC
 

What's hot (20)

Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
 
Enterprise single sign on
Enterprise single sign onEnterprise single sign on
Enterprise single sign on
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
 
Owasp zap
Owasp zapOwasp zap
Owasp zap
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
Flutter vs xamarin vs react native - Mobile App Development Framework
Flutter vs xamarin vs react native - Mobile App Development FrameworkFlutter vs xamarin vs react native - Mobile App Development Framework
Flutter vs xamarin vs react native - Mobile App Development Framework
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
 
Devops
DevopsDevops
Devops
 
Owasp zap
Owasp zapOwasp zap
Owasp zap
 
DevSecOps What Why and How
DevSecOps What Why and HowDevSecOps What Why and How
DevSecOps What Why and How
 
Web Application Firewall
Web Application FirewallWeb Application Firewall
Web Application Firewall
 
Deployment model Blue Green deployment
Deployment model Blue Green deploymentDeployment model Blue Green deployment
Deployment model Blue Green deployment
 
Debugging mule
Debugging   muleDebugging   mule
Debugging mule
 
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...
 
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdfKinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
Kinh nghiệm triển khai K8s tại Stringee - Mr Trần Tiến.pdf
 

Similar to JBoss Seam vs JSF

Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
Jini Lee
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
Skills Matter
 
EJB 3.0 course Sildes and matrial
EJB 3.0 course Sildes and matrialEJB 3.0 course Sildes and matrial
EJB 3.0 course Sildes and matrial
Mohamed Ali Ibrahim
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Arun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
Arun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Arun Gupta
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
Ankara JUG
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
phanleson
 
Securing Java EE apps using WildFly Elytron
Securing Java EE apps using WildFly ElytronSecuring Java EE apps using WildFly Elytron
Securing Java EE apps using WildFly Elytron
Jan Kalina
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Arun Gupta
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
Arun Gupta
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
Carol McDonald
 
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Atlassian
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
Ioan Eugen Stan
 
Jsf
JsfJsf
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
Rohit Kelapure
 
JBoss Seam 1 part
JBoss Seam 1 partJBoss Seam 1 part
JBoss Seam 1 part
Andrey Bratukhin
 
Session 3 Tp3
Session 3 Tp3Session 3 Tp3
Session 3 Tp3
phanleson
 
Spring frame work
Spring frame workSpring frame work
Spring frame work
husnara mohammad
 
Java EE Services
Java EE ServicesJava EE Services
Java EE Services
Abdalla Mahmoud
 

Similar to JBoss Seam vs JSF (20)

Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
 
EJB 3.0 course Sildes and matrial
EJB 3.0 course Sildes and matrialEJB 3.0 course Sildes and matrial
EJB 3.0 course Sildes and matrial
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
 
Securing Java EE apps using WildFly Elytron
Securing Java EE apps using WildFly ElytronSecuring Java EE apps using WildFly Elytron
Securing Java EE apps using WildFly Elytron
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
 
Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012Using JIRA to build a culture of innovation - Atlassian Summit 2012
Using JIRA to build a culture of innovation - Atlassian Summit 2012
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Jsf
JsfJsf
Jsf
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
JBoss Seam 1 part
JBoss Seam 1 partJBoss Seam 1 part
JBoss Seam 1 part
 
Session 3 Tp3
Session 3 Tp3Session 3 Tp3
Session 3 Tp3
 
Spring frame work
Spring frame workSpring frame work
Spring frame work
 
Java EE Services
Java EE ServicesJava EE Services
Java EE Services
 

Recently uploaded

“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 

Recently uploaded (20)

“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 

JBoss Seam vs JSF

  • 2. My experience with JBoss Seam and JSF: •  Used plain JSF 1.2 for prototype (~1 month) •  Used Seam 2.2 in actual implementation (~9 months) What is this presentation about? •  Common tasks where Seam makes life easier
  • 3.   Separated business logic in: ◦  JSF managed beans ◦  Business components (EJBs)   EJB lookup Context context = new InitialContext(); context.lookup("java:comp/env/...");
  • 4.   One kind of “stuff ”   Seam Components ◦  POJOs ◦  EJB ◦  Entities   Seam unifies Java EE: ◦  Dependency Injection ◦  Transactions ◦  Security   No separation between front- end components and business components.   Define your own architecture
  • 5. faces-config.xml   JSF <managed-bean> ◦  Through faces-config.xml <managed-bean-name>myBean1</managed-bean-name> <managed-bean-class>mypackage.MyBean1</managed- bean-class>   Java EE: @EJB <managed-bean-scope>application</managed-bean- scope> </managed-bean> ◦  Servlets, Filters, Listeners <managed-bean> ◦  Tag handlers, tag library <managed-bean-name>myBean2</managed-bean-name> event listeners <managed-bean-class>mypackage.MyBean2</managed- bean-class> <managed-bean-scope>request</managed-bean-scope> … but not in JSF Managed <managed-property> beans (backing beans) <property-name>myBean1</property-name> <value>#{myBean1}</value> </managed-property> </managed-bean>
  • 6.   Injection of Seam components @Name("myBean") @Scope(ScopeType.EVENT) ◦  EJB public class MyBean { ◦  Entities @In(create=true) ◦  POJOs private AccountFacadeRemote accountFacade;   Outjection @In(scope=ScopeType.CONVERSATION) @Out(scope=ScopeType.CONVERSATION) private AccountEntity accountEntity; @In @Out private SomePojo somePojo; …
  • 7.   State: ◦  Server (i.e. session) ◦  Client (i.e. hidden fields) ◦  Combination   JSF ◦  Request parameters (i.e. hidden fields) ◦  Cookies ◦  URLs: http://jhug.gr/user/markos   Maybe a problem: object != object
  • 8.   JSF UI Component tree and state ◦  Tomahawk <t:saveState> ◦  Richfaces <a4j:keepAlive>   If client-side state: object != object
  • 9.   Session ◦  Problems:   Increased memory usage   Scalability problems   Need to consider multiple tabs
  • 10.   Seam scopes: ◦  Event (Request) ◦  Session ◦  Application ◦  Page ◦  Stateless ◦  Business Process ◦  Conversation   What is a conversation? ◦  Lives for multiple requests ◦  Stateful, but not session
  • 11.
  • 12.   Conversation end / timeout   Aggressive management
  • 13.   Application Security: ◦  Page-level security ◦  Component-level security   JSF does not specify security   Can a filter be used? ◦  Does View Handler use the Servlet Request Dispatcher?   JSP:Yes <filter-mapping> <filter-name>My Security Filter</filter-name> <url-pattern>/view2.jsp</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>   Facelets: No
  • 14.   Both Page-level and Component-level security   Some examples: ◦  Page-level authentication / authorization <pages login-view-id="/login.xhtml"> <page view-id=”admin*" login-required="true”> <restrict>#{s:hasRole('admin')}</restrict> </page> </pages> <security:identity authenticate-method="#{authManager.authenticate}"/> ◦  Page customization <s:link view="/jhug/deleteMember.xhtml" value="Delete" rendered="#{s:hasRole('admin') || s:hasRole(’usermanager')}"/> ◦  Component-level authorization @Name("myBean") @Scope(ScopeType.SESSION) @Restrict("#{s:hasRole('admin')}") public class MyBean implements Serializable { …
  • 15. <h:commandLink value="Click here” action="#{myBean.method}"> <f:setPropertyActionListener target="#{myBean.methodParameter}” value="#{value}" /> </h:commandLink> public class MyBean { private String param; public String method() { if("something".equals(param)) { return "ok"; } return "notOk"; } public String getParam() { return param; } public void setParam(String param) { this.param = param; } }
  • 16. <h:commandLink value="Click here” action="#{myBean.method(value)}” /> @Name("myBean") public class MyBean { public String method(String param) { if("something".equals(param)) { return "ok"; } return "notOk"; } }
  • 17.   Help: ◦  Good books ◦  Extensive, up-to-date documentation ◦  Old forum, somewhat inactive ◦  StackOverflow.com   Issues: ◦  Works best on JBoss AS ◦  Seam 2 issues are resolved slowly (Focus on Seam 3)
  • 18. ?