• 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

question about weblogic batch statement

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran into a problem using ejb2.0 entity bean and weblogic 8.1.

I want to manupilate one to many relationship in one single transaction. For example, I have a customer vo representing a customer entity bean, and also inside the customer vo, i have a list of account vos representing the account entities that customer have. When a user work on the customer vo, he can add, update, delete account vos. Once he is done, he submits the customer vo to the back end. To maintain his accounts and also avoid too much coding, I use a simple mechanism to update the account. First, I delete all accounts in the db, then I add new accounts based on the account list in the customer vo. The db table has the unique constraint for customer id and account id. My problem is that each time I run the code to update the relationship, I get "unique constraint violation".
It seems that weblogic batches the statements and somehow it changes the order for optimization. This is my guess, can someone confirm for me.
Besides, I know if I remove the unique constraint or do the remove and add in two transactions, it will be ok, but that is really not what i want
 
Our first order of business must be this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic