• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Create session bean stateless and stateful???

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I did not understand because this question is false and true ? they are changed ??

1) The statement is true or false: If a stateless session bean client invokes create() method on the bean's home interface then it is guaranteed that a new stateless session bean instance will be created.

Reply: The statement is false

2) The statement is true or false: If a stateful session bean client invokes create<METHOD>(...) method on the bean's home interface then it is guaranteed that a new stateful session bean instance will be created.

Reply: The statement is true

[ May 12, 2006: Message edited by: Oelison Sousa ]
[ May 12, 2006: Message edited by: Oelison Sousa ]
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answers are right.


Unlike the entity bean and stateful session bean, invoking the create() method for stateless bean does not result in a call to the bean's ejbCreate() method. In stateless session beans, calling the EJB home's create() method results in the creation of an EJB object for the client, but that is all. The ejbCreate() method of a stateless session bean is only invoked once in the life cycle of an instance--when it is transitioning from the Does Not Exist state to the Method-Ready Pool. It isn't reinvoked every time a client requests a remote reference to the bean.


[ UD: removed link to copyrighted material ]


[ May 12, 2006: Message edited by: wise owen ]
[ August 03, 2007: Message edited by: Ulf Dittmer ]
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When you call create() method on Stateless Session Bean, container wont create a new stateless session bean but it assigns an EJBObject to the client. So the answer is FALSE here.

But with Stateful session bean, when you call create method, the container actually creats a bean with the specied values in the create method's signature. So the answer in this case is TRUE.

Hope this helps.

Ugender Rekulampally.
 
A teeny tiny vulgar attempt to get you to buy our stuff
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic