Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is CMP + Session Facade w/ BMT allowed?

 
Aaron Anders
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
according to the sequence diagram on Applying Enterprise JavaBeans, 2nd ed. page 213

"After invoking methods on an entity bean, the client attempts to commit the transaction by invoking the commit method on the UserTransaction interface" (which operates on a CMP)


i think it implies that CMP + Session Facade w/ BMT is allowed, so i've done an little experiment...

Session Facade's <transaction-type> = Bean

code listing simplified as below:



with JBoss 3.2.3, execution results in "java.lang.IllegalStateException: No transaction." on the ut.rollback() line, and the balance field becomes $20

is there anything wrong with the code?
[ August 08, 2004: Message edited by: Aaron Anders ]
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Aaron Anders:
according to the sequence diagram on Applying Enterprise JavaBeans, 2nd ed. page 213



with JBoss 3.2.3, execution results in "java.lang.IllegalStateException: No transaction." on the ut.rollback() line, and the balance field becomes $20

is there anything wrong with the code?

[ August 08, 2004: Message edited by: Aaron Anders ]


I can't see the beginning of the transaction (i.e. ut.begin() )
 
Aaron Anders
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marco Tedone:

I can't see the beginning of the transaction (i.e. ut.begin() )


UHHHHH! i forget to call ut.begin()!!!

the code works well on JBoss 3.2.3.

thanks for your reminding!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic