• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless Session Bean!! Things v can do.

 
Puneet Vashisht
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guyz,

According to HFEJB, Pg.No 227, "Session bean creation is not related to the client".
That means container has already made some stateless beans and put them in the pool, or the container may create those bean instances at the time when the client call the business methods. Bottom line is that it is upto to the container to make stateless bean instances and that happens at a completely different/unrelated time to when the client calls the create.

When client calls create only stub to EJB Object is returned.

Now my question is: How come you get a reference to the EJB Object in ejbCreate(), because it may b the case that the EJB Object isnt created boz the client hasnt called create() yet.

Thankz in advance!!

Puneet
SCJP1.4
 
Micheal Jacob
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Follow this link, (discussed for stateful session bean, but i think it is applicable for stateless bean also)

http://www.coderanch.com/t/161414/java-EJB-SCBCD/certification/setSessionContext-things-you-do

Hope it helps.

Micheal
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should help :

Bean Things are confusing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic