Hi there I am currently working on a project that has a JMS listener that takes an object from the queue and writes content to the a text file. In the Spring bean definition file i have created a listenerContainer which uses the DefaultMessageListenerContainer class. I want to create another process that takes the file and performs some processing based on the content of the file. Now I'm not sure whether this should be done using JMS. For example I thought I would create a sender which took the file and put it in a queue. Have another listener that takes the file from the queue and processes it. The problem I am having is this: I don;t want the sender to take the file unless all the content has been written to the file. Not sure if this more of a Java question or a JMS question. Is there anyway for the sender to wait for the file to be completely written?