• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

stateless bean pooling

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in case where the container decides to have a pool of stateless bean objects then there is a possibility that the container will create the beans and set them up in the pool. and the clients are associated with the bean when the client makes a method call.

but as a client when i have to access the object then i have to first do JNDI look up and then using the home object stub i call the create method then get the instance of the bean. so, in this case what is happenning when we make a method call create on the home object? would my ejbCreate be called ?
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Murthy,

When you download Home proxy stub, then all the communication you do is with the Home Interface. When you issue ejbCreate(), then what actually happens is that Application container, creates EJBObject and picks one of the bean instances from the pool and assigns it to it. Afterwards, this EJBObject proxy stub is sent to the client and client can issue business methods on that bean. In most of the cases the container has sufficient quanitity of bean instances in the pool and its matter of assigning EJBobject with that bean. This rest of the course of actions change depending on the type of the bean, whether it is stateful or stateless. But this doesn't apply to enity beans as ejbCreate() in that case is actually creating a data row in the underlying database ( or storage medium ). So it has different roles in different scenarios.
 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic