Hi Simone, The update does not raise any exceptions. I have no version on the entity, and not configured locking. I read alittle about locking, does it also apply outside a transaction, the update operations is in a transactions but the read is not.
cheers, Håkon 2010/1/12 Simone Gianni <simo...@apache.org> > Hi Håkon, > is the update of the entity on the database raising any exception? Or it > silently refuses updating the database? > > Are you using a version field for optimistic locking? > > Simone > > > Håkon Sagehaug wrote: > >> Hi all, >> >> I've got a problem I'm not sure how to solve. The problems is as follows. >> We got a web service that can grab files from a ftp or http site, we use >> openjpa to store metadate about the resource, like name, when inserted >> etc. >> After this we write this information to the db and a new thread is started >> to download the file, after this is finished the db entry is retrieved and >> updated, with a status message, saying that the download was complete. >> >> We then have a client the after it sends a request, will poll the service >> using a operation called getResource(id), to see if the state is the to >> finished. The problem we see is that when the client issue a getResource >> we >> can't update the entry in the database. The file is downloaded, but the >> information in db isn't updated. If we issue the request getresource after >> a >> delay(2sec), on the client side everything works fine. >> >> Is there some synchonization needed, the web services used the same >> EntityManagerFactoryFactory but each method has it's own EntityManager >> object, also the thread downloaded the file. >> >> Have anyone experienced this? >> >> cheers, Håkon >> >> >> > > > -- > Simone Gianni CEO Semeru s.r.l. Apache Committer > http://www.simonegianni.it/ > >