Your question is not about JMS. It is about synchronizing processing.
then where can i findmy help about this question? thank .
A training course on java synchronization/threads.
The JBoss examples (Chapter 4) include a countdown timer with a JMS send/receive, which may be of use if you are trying to do send/receive in same program to test.
Otherwise its thread synchronisation like the guy says.
In the longer term I would suppose that the two programs will be separate.