Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RemoveException(): Illegal attempt to remove a stateful session bean...  RSS feed

will boyd
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i'm new to ejbs; new to weblogic server/workshop. going through the e-docs tutorials and playing around with things. i got a custom java control that wraps (delegates to) an ejb control that in turn wraps a stateful session bean. i structured it this way as a workaround to the issue described in this dev2dev article:

Control Lifetime Considerations when Invoking Controls from Page Flows

i need the ejb's operations to be transactional. i'm using container-managed transactions. i got a page flow that calls the custom java control within the page flow's default transaction context:

the pageFlowAction() method returns successfully. there are no other actions taking place in the page flow after pageFlowAction() successfully returns. however, i get a
javax.ejb.RemoveException(): Illegal attempt to remove a stateful session bean while it is participating in a transaction
error (see full stack trace below). here are my questions:

  • what can i do to achieve a _legal_ removal of the stateful session bean instance?
  • would an empty ejbRemove() on the sfsb have any effect?
  • is SessionSynchronization appropriate here?
  • would bean-managed transactions using javax.transaction.UserTransaction make a difference?
  • is the sfsb's remove() method being called by a default onRelease() life cycle method of either the ejb control or the custom java control?

  • what i have already done to get rid of the RemoveException is to use an slsb instead. but i think an sfsb is more appropriate for the particular use case i am addressing.

    thanks for your help.

    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!