Only use the semaphore when using the jms bypass mode.