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