• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when is a bean considered created.

 
Walter Vetrivel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At what point, precisely, in the life-cycle is a stateful session bean considered created?
before ejbcreate method and after setsessioncontext method, since identity is available in the ejbcreate method.
At what point, precisely, in the life-cycle is a stateless session bean considered created?
after the ejbcreate method since the bean gains identity at this point.

Please correct me if Iam wrong.
 
scott irwin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Walter,
I would say "created" is when when the bean is promoted to the ready state. In that case, the container calls newInstance, setSessionContext and then ejbCreate in both cases. After ejbCreate completes, the bean is promoted to the ready state.
Back to what you stated, my understanding is the reverse. The Stateless bean has no identity (are equivalent) and the stateful bean gains identity after ejbCreate (user state).
Scott
 
Walter Vetrivel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant security context identity.
Anyway I think u are right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic