Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateful session bean + @Remove [EJB3]

 
Derick Potgieter
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,

I`m struggling understanding one of the @Remove annotation on a stateful session bean.

I have a servlet that creates an order + billing + shipping process over a few steps. When i`m done i call the place order method on my remote stateful session bean. This method is annotated with the @Remove tag.

On completion it removes the stateful session bean. This part is fine and dandy, but why when i initiate the process again from scratch (same session) i get an error :
NRU-za.co.test.ejb3.session.PlaceOrderBean: Cannot load from BACKUPSTORE FOR Key: <2d900a2300b91f-ffffffff8ec70191-0>

I understand that the current sessions stateful bean has been removed already, but shouldn`t it create a new stateful bean at this point and rebind it?

Thanks for the help
 
Fabian Gutierrez
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how are you getting the reference to that stateful? are you injecting it? o lookingup from an initial context?
 
Derick Potgieter
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I`m injecting it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic