• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

EJB3 + JSF2

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!
I'm getting in touch with EJB3 and trying to figure out if it makes sense to use it with JSF and which is the best way to do it.
I'm new to EJB while I've been using JSF for a while (JsSF 2 now).

In particular I'm getting a little confused about the integration of JSF managed beans and EJB session beans. I know that I can inject an EJB session bean in a JSF managed bean; but it's also true that I actually could invoke EJB session bean's method directly from an xhtml page and just bypass managed beans. I mean, which is the best way to share responsibilities among them?

Also, I got a little confused about scopes. I set up a little app with a managed bean and a stateless session bean. I though that the stateless session bean was supposed not to maintain state but it does (a member variable value is kept among different invocations). And this is true both in case the managed bean has request scope and in case it has session scope. Is it just a coincidence? I mean, because of the fact that the container is responsible for creating and destroying beans so I cannot be sure that the stateless bean is actually reinitialized at each request?

Thanks for any help

Eve
 
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic