Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with EJB Spec

Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fig 5 of EJB 2.0 Spec Section 7.6 is the state diagram of stateful session bean(SFSB). It shows the "method ready in TX" state would give ERROR if "non-tx" or "different tx method called".
But the point is, under what condition can a "non-tx" method called in this
What I understand is an SFSB must implements SessionSynchronization
interface in order to get into this "method ready in TX" state . And according to Section 17.4.1, its method must with txn attributes either Required, RequiresNew or Mandatory. That is, must be involved in a txn. So, there would be no business method that can execute without a txn context, and there would be no such "non-tx" method available in this state.
Can anyone explain this contradiction?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic