• Post Reply Bookmark Topic Watch Topic
  • New Topic

Managed Beans and Session Beans

 
Thorsten Mueller
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I googled a lot but I still do not see the difference between beans that are annotated as "backing" managed beans like this:

[at]ManagedBean
[at]RequestScoped
versus
[at]Stateless

respectively

[at]ManagedBean
[at]SessionScoped
versus
[at]Stateful


Can you tell me the differences?

Best Regards,
Thorsten
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In stateless, the client state info are not maintained and its something similar to page-scoped... If the bean is in request scope attribute, it can be accessed by other page to which the request is forwarded to....


If in session scope, it is accessible by the pages involving the usage of sessions attributes provided that JSESSION id cookie is passed to the server in order to get the correct session object...

Likewise, in stateful, to get the correct Stateful bean, corresponding EJBObject stub has to be maintained in client side in order to contact the correct bean...
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're mixing JSF beans and Enterprise JavaBeans.

The JSF framework and the EJB container are two different things.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!