Using JBoss MQ in JBoss3.0.8 on Linux.
Is it necessary to call .delete() on the Temporary Queue, or will it be 'deleted' when the receiver is closed?
My calling sequence is:
tempQueue = session.createTemporaryQueue();
publisher = session.createSender(queue);
subscriber = session.createReceiver(tempQueue);
// do work...
Currently "tempQueue.delete();" is not called, so will this cause a leak?
If I call tempQueue.delete(); at point A above there is an exception, presumably because the "subscriber" would clean up the temporary queue? If I call tempQueue.delete(); at point B above there are no complaints, but I'm not sure if its necessary.
I can't find any sample code that shows .delete() being called.
A temporary destination belongs to the connection.
It is deleted when you close the connection unless you delete
it yourself first.