• 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

Does not save the deleted record

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using weblogic 5.1.0 with service pack 9. I am using entity beans to add a record in the database. It is adding without any problem. But when I try to manually delete a record in the table while the weblogic server is running and from my front end i again try to add the same record it does not allow me to do so. It does not throw any expection. Everytime I try to add a new record I do a checking for its existence by find by primary key.
This is true when i delete the record manually from the database when the weblogic server is running. If i shutdown the server and redo it once again then it accepts the data. Can you just tell me how to overcome this situation.
Thank you in advance
Savitha
 
Saloon Keeper
Posts: 27856
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A DBMS should not be expected to do a general notification of all applications when a record is deleted, whether they're simple C programs or advanced EJB app servers. That's just not part of what they're expected to do. Normally a DBMS relies on record locking. WebLogic isn't locking EJB-correspondent records, so an external delete simply confuses it.
I can't complain about that, since record locking is extra overhead, and as long as your records are updated and deleted within WebLogic, the EJB transaction management services will ensure data integrity at the WebLogic level with a lot less fuss.
There are two possible solutions.
1. Replace your present external deletion actions with EJB client applications so that everything is managed in one place. I recommend doing this if possible.
2. Check the WebLogic docs for info on how to ensure that held/cached EJB data can be locked against external actions.
BMP beans are more likely to cause trouble than CMP beans, since that pretty much puts the responsibility of locking on your code.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic