• 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

FKs not null - ejbPostCreate problem...

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know if WebSphere has a mechanism (like weblogic or jboss delay-database-insert-until )for delaying the database insert until after the ejbPostCreate has been called?

In my application I have a one-to-one relationship between (for example) Person and Address.
The PERSON_TABLE has a ADDRESS_ID FK not null, so when I create the Person entity I need to set the relative Address entity. All this in an ejbCreate, but the specification says that I can't access to other EJB in the ejbCreate and the relationships must be set in the ejbPostCreate...risulting in a CreateException because the violation of the constraint...

Help me please!
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With Websphere 5, database insert is done after ejbPostCreate is called, you set your address field in ejbPostCreate.
May be another problem ?
Mouloud
 
This is my favorite tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic