Clearing out FileCopy Orders in dcm4chee2.x
Every now and then you might find your legacy dcm4chee2 instance inundated with FileCopy orders, due to a bug in one of your HSM copy command scripts or otherwise.
It happened to me a few weeks back, one instance had 15,000 messages which piled up due to a bug in an HSM copy script running over a couple of days. They would not clear on reset, or via any of the standard interfaces (jmx-console + dcm4chee-web3)
To clear them it seems you need to work directly with the database. Instructions are #1) Stop dcm4chee, and log into the database. #2) Run the following commands (here we have them for Postgres):
truncate jbm_msg; delete from jbm_msg_ref where message_id not in (select message_id from jbm_msg); delete from jbm_msg where message_id not in (select message_id from jbm_msg_ref);
These commands are for posgresql, adapt to your db accordingly.
Restart dcm4chee and you should be good to go again.