• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

is CMP + Session Facade w/ BMT allowed?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic