On 9.1.14 4:00 , Marcel Reutegger wrote:
On Thu, Jan 9, 2014 at 5:31 AM,  <[email protected]> wrote:
+                if (repo instanceof JackrabbitRepository) {
+                    ((JackrabbitRepository) repo).shutdown();
+                }

This looks ugly. It would be nice if the JCR repository wrapper around
  was stateless, i.e. could simply be collected as normal garbage when
no longer used.

yes, this would indeed be cleaner and require to revisit the changes
for OAK-941. those changes actually introduced the issue with a
scheduled executor that needs to be shut down.

What's the purpose of having a shutdown method then?

JackrabbitRepository.shutdown() clearly states: "This method [...] <em>must</em> therefore be called by the client application once the repository instance is no longer used."

Michael


regards
  marcel

Reply via email to