• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange commit behavior appears to violate transaction itegrity

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello...

I'm using JBoss 3.2.3, and encountering strange behavior involving the interaction between two EJB2.x entity beans and two session beans - it seems to be violating transactional integrity and not meeting EJB specs. Perhaps someone can point out where I'm going wrong?

Let's call the four beans Session1, Sesson2, Cmp1, and Cmp2. Here are the interactions:


Method2() and Method3() have transaction semantics of "Requires", Method4() is "NotSupported".

So here's the deal... after the transaction fails and rolls back, the changes made before the call to Method3() remain. They were apparently committed when Method4() was called. This was confirmed by querying the database from a client outside of JBoss while I single-stepped through the EJB code - the changes appeared in the database, in the middle of the transaction, immediately after Method4() returned.

What is Method4()? A finder on an entity's home interface, defined entirely by a line of HQL in an ejb xdoclet tag. Yet calling that finder appears to commit all work done to that point in the transaction.

This is so blatantly weird that I figure I must be making some fundamental error. Anyone recognize what that error might be?
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic