title: WSO Identity server goes to unusable state when many request hits simultaneously
body: <p>Im using WSO Identity server to create SAML token. im facing an issue when many request hits the STS service simultaneously, Identity server throws a NPE and goes to a unusable state. 
  WSO site says it is fixed as part of 3.2, but it is happens in 5.0.0. any suggestion or fix to overcome this would be highly appreciated.</p>
  
  <p>attached stack trace below...</p>
  
  <blockquote>
    <p>java.lang.NullPointerException    at
    org.apache.axis2.handlers.addressing.AddressingOutHandler$WSAHeaderWriter.(AddressingOutHandler.java:166)
      at
    org.apache.axis2.handlers.addressing.AddressingOutHandler.doInvoke(AddressingOutHandler.java:131)
      at
    org.apache.axis2.handlers.AbstractTemplatedHandler.invoke(AbstractTemplatedHandler.java:44)
      at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)  at
    org.apache.axis2.engine.Phase.invoke(Phase.java:313)  at
    org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)    at
    org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)  at
    org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
      at
    org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
      at
    org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
      at
    org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
      at
    org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)     at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:848)  at
    org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
      at
    org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
      at
    org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)     at
    org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at
    org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
      at
    org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
      at
    org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
      at
    org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
      at
    org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
      at
    org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
      at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at
    org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619) TID: [0] [IS] [2015-06-24
    02:20:45,640] ERROR {org.apache.axis2.transport.http.AxisServlet} -<br>
    {org.apache.axis2.transport.http.AxisServlet}</p>
  </blockquote>
  
  <p>Thanks</p>