title: servicelocator impl shutdown issue in jersey 2.22
body: <p>My Jersey Application container is shutdown with below exception message.</p>
  
  <pre><code>java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_0,0,1879131528) has been shut down
      at org.jvnet.hk2.internal.ServiceLocatorImpl.checkState(ServiceLocatorImpl.java:2288)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandleImpl(ServiceLocatorImpl.java:629)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandle(ServiceLocatorImpl.java:622)
      at org.jvnet.hk2.internal.ServiceLocatorImpl.getServiceHandle(ServiceLocatorImpl.java:640)
      at org.jvnet.hk2.internal.FactoryCreator.getFactoryHandle(FactoryCreator.java:103)
      ... 59 common frames omitted
  Wrapped by: org.glassfish.hk2.api.MultiException: A MultiException has 1 exceptions.  They are:
  1. java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_0,0,1879131528) has been shut down
  </code></pre>
  
  <p>Whenever the above error is coming the application is not able to process the request. It repeatedly showing the same message and also
      my spring application container also down.Below is the error message  i am getting repatedly.</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'daoQuery': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  
  java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
  </code></pre>
  
  <p>My Glassfish Jersey Version is 2.22.2.</p>
  
  <p>The above thing happens only in heavy load.</p>
  
  <p>We analyzed the issue and found that this issue happen in multiple scenarios.</p>
  
  <ol>
  <li>Load Balancer Time Out High</li>
  <li>Jersey Hk2 conflict</li>
  </ol>
  
  <p>We corrected those two points, but still we are getting the same error in heavy load.</p>
  
  <p>Is there any way to prevent or fix issue?</p>