• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB stateless bean lifecycle ?

 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

SessionBean life cycle:

1)Creates bean instances using default constructor
2)injects resources (@PostConstruct)
3)Puts instances in a manged pool
4)pulls an idle bean out of the pool when an invocation reaquest is received from the client.
etc...etc..

now my question is, does first 3 steps happens automatically when EJB is deployed ? i have written an example to see this happening , but it doesn't

Once after i send a request then the above order is happening, but my understanding is before user request for session bean, some set of bean objects should be ready in pool ? but i can't see this happening in my example, could you please clarify when it actually happens ?

Thanks
Ravi
 
Pallav Bora
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you already have not done so you may try setting a minimum initial pool size > 0. That way beans will be created even before any request arrives.
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any annotation to increase EJB pool size ? or do i need to write weblogic-ejb-jar.xml, i couldn't find any option to increase EJB pool size through weblogic10.3 console.
looks like we can't escape deployment descriptor ?
please clarify.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!