Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic