Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Discrepency in the order of creating a Stateful Session Bean

 
John Liang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
On page 92-95 of Stateful Session Bean (Assume AdviceBean is a Stateful Bean according to the heading):
Step 5 shows that the actual bean is created first, and then Step 6 shows that an EJBObject is created after. I realize that the order may not matter in this case, however on page 100 of "Creating a Stateful Session Bean":
Step 4 shows an EJBObject is created first, then Step 5 shows the actual bean is created after. This is confusing, then I try to find out what's going on with the Spec, I realize that:
In EJB2.0 Spec, on page 83, it is shown in a sequence diagram that an EJBObject is created first, then the actual Bean is created after. In between them "SessionContext" is created. Thus, I think this is the correct behaviour, right?
Let me know, thanks,
John
 
Vladas Razas
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that's not it yet. Wait till you read about entity beans... In short it will say, that EJBObject is not your business, and except for it's interface you cannot make any assumptions what it actually is, how many and when they are created. It will even describe you possibility of entity bean EJBObject, where there is single EJBObject for every entity your bean describes.
Muahahaha!
 
John Liang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
May be you have missed the point here. I am talking about Stateful Session Bean only.
May be my title is confusing, sorry. Kathy, please confirm my finding.
Thanks in advance,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic