• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Updated Objects Are Not Being Persisted

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

i'm runing a printing queue web service on glassfish v2, the clients ask for thier printing jobs and the server send it to them. After each successful print the client invoke a web service method to flag that certain job as being "done" so that the client will not have it sent to him again the next round when it askes for available printg jobs...

it hapens many times that the new status "done" will not persist to the data base which leads to the pritnig job being sent over and over again.

i tried container managed transactions and bean managed transaction with the same result. i even tried em.flush(), but no luck.....

i'm using oracle toplink..

here is how the code looks like .....


also the clients are asking for jobs every 30 seconds
another question, is there any other aproach to these queues and jobs?


please help
 
Elia Bolg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just wanted to add that i can recreate the problem simply by changing the status of a job manualy form "SQL Developer" for example from "Done" to "pending" and the job will keep beibg sent and will never be set to "Done" again....
[ July 09, 2008: Message edited by: Ali Bohlaiqh ]
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic