Close Core Sessions or JMS Connections
17.1.1. Closing core sessions or JMS connections that you have failed to close As previously discussed, it's important that all core client sessions and JMS connections are always closed explicitly in a finally block when you are finished using them. If you fail to do so, HornetQ will detect this at garbage collection time, and log a warning similar to the following in the logs (If you are using JMS the warning will involve a JMS connection not a client session): [Finalizer] 20:14:43,244 WARNING [org.hornetq.core.client.impl.DelegatingSession] I'm closin g a ClientSession you left open. Please make sure you close all ClientSessions explicitly before let ting them go out of scope! [Finalizer] 20:14:43,244 WARNING [org.hornetq.core.client.impl.DelegatingSession] The sessi on you didn't close was created here: java.lang.Exception at org.hornetq.core.client.impl.DelegatingSession. (DelegatingSession.java:83) at org.acme.yourproject.YourClass (YourClass.java:666) HornetQ will then close the connection / client session for you. Note that the log will also tell you the exact line of your user code where you created the JMS connection / client session that you later did not close. This will enable you to pinpoint the error in your code and correct it appropriately.