Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Beans  RSS feed

 
David Fahy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What is the difference programatically between a stateless session bean and a stateful session bean. ie just by looking at the code how would you know whether a bean is stateful or stateless. Thanks in advance.
 
Vani Yama
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You could know the type of bean by looking at
the tag '<session-type>' in ejb-jar.xml.
-dimbaka
 
Ming Hu
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Home interface: if there is only one create() with no args, it might be stateful or stateless; Otherwise, it must be stateful.
 
Mike Firkser
Ranch Hand
Posts: 249
Java Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, a stateful bean holds information, whereas a stateless bean just processes it - so look at what the bean does.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To summarize the above points :
1. Number and type of the create() methods defined in the bean.
2. Member variables that hold client-specific state information across
the business methods.
3. Non-Empty ejbActivate() and ejbPassivate() methods - SFSB
4. If the bean implements SessionSynchronization, it is SFSB
5. Type of the bean mentioned in the DD.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!