Question

I am using the Apache Chemistry API to create client sessions. The SessionFactory allows the creation of sessions but does not provide a way of closing them. What is the correct way to go about closing created sessions?

Was it helpful?

Solution

Not quite sure what you have in mind when you say close, but I assume you mean releasing resources.

The session is a stateful thing which amongst other things caches and holds authentication. It does not require any special clean up. If you want to get rid of it, just release the reference and let garbage collection kick in. There is no need to worry about network connections or (seriously sized) state on the server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top