Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbCreate() call for a Stateless Session Bean

 
BalajiNityaa Varadharajan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have read in so many books that ejbCreate() need not be neccesarily called for a Stateless Session Bean when the client calls the create method as the Container would have created the Beans before hand and have them in the bean pool...

I have used Weblogic,Websphere and JBoss and in all the three every time the ejbCreate() is been called when the client calls the create method.

I know it is purely the Containers decision if it wants to have the beans created and be kept in the pool... but still i would like to know if any one has come across a situation where the ejbCreate() not being called, if so in which server...
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is entirely possible to set up a pool containing no instances on server startup. This would account for what you have seen.
 
BalajiNityaa Varadharajan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May i Know how to make sure that the bean instances are created during server startup...
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is vendor-specific. Typically, an XML file or GUI is used to specify the number of bean instances to be created on server startup.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic