• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless session bean remove() -- HFEBJ

 
Carlos Rubio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

I am reading HFEJB and at page 282 It says that Client will get an exception if he tries to use EJB object reference after removing the stateless bean.

If I am not wrong the call to remove() on a Stateless takes no effect as the bean will go to the pool as soon as the business method is over.

If the user calls remove() and then try to run other business method call so the container would provide a new bean from the pool (or the same bean but again from the pool) but no Exception would happen.

I tryed this with RI 1.3 and worked as I said...

errata? or I am wrong?
[ February 21, 2007: Message edited by: Carlos Rubio ]
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Carlos,

can you show us some code?

Herman
 
Carlos Rubio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure. there was no specific code there but I used the getadvice example to test. This is may stateless bean ("ejb/advisor").
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I guess you are right (that it is an error in the book).
Maybe they copied/pasted it from the section about stateFUL sessionbeans...

Herman
[ February 21, 2007: Message edited by: Herman Scheltinga ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic