Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Discrepency in the order of creating a Stateful Session Bean

 
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
 
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
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic