title: ConnectionWaitTimeoutException in IBM Websphere
body: <p>The application we run on is based on Struts 2.0. Many of us access this application simultaneously. Every evening around the same time, the application comes to a haul. If we reload the application on the browser, it never moves ahead of the Login page. 
  Seeing the logs for the server, I can see that the last message was "thread sleep".</p>
  
  <p>On doing some research I came across the use of  annotation for Spring framework. Does the same work for Struts2 also?
  Can u please illustrate the use if possible in a struts file?</p>
  
  <pre><code>[4/25/12 15:20:19:595 GMT+05:30] 00000029 SystemOut     O 25 Apr 2012 15:20:19,595 DEBUG [Thread-64][GreeceSynchronizer] thread sleep
  action [cape.base.lbxoutclearing.ui.action.LoginAction@1f601f6]
  [4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] intercept '//doLogin' { 
  [4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] requested_locale=null
  [4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] before Locale=en_US
  [4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][InstantiatingNullHandler] Entering nullPropertyValue [target=[cape.base.lbxoutclearing.ui.action.LoginAction@1f601f6, com.opensymphony.xwork2.DefaultTextProvider@58605860], property=struts]
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][FileUploadInterceptor] Bypassing // doLogin
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][StaticParametersInterceptor] Setting static parameters {}
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][ParametersInterceptor] Setting params password =&gt; [ DEMO9 ] changePassword =&gt; [ false ] forgotPassword =&gt; [  ] username =&gt; [ DEMO9 ] 
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] Property: changePassword
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] Class: cape.base.lbxoutclearing.ui.action.LoginAction
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] field-level type converter for property [changePassword] = none found
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] global-level type converter for property [changePassword] = none found
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] falling back to default type converter [com.opensymphony.xwork2.util.XWorkBasicConverter@48c648c6]
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'forgotPassword' (no setter could be found).
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'password' (no setter could be found).
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'username' (no setter could be found).
  [4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][LoginAction] Validating login
  [4/25/12 15:20:26:295 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,295 DEBUG [WebContainer : 5][LoginAction] 1
  [4/25/12 15:20:31:256 GMT+05:30] 00000036 FreePool      E   J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource lockBoxDSJNDI.
  [4/25/12 15:20:31:292 GMT+05:30] 00000036 SystemOut     O 25 Apr 2012 15:20:31,289 ERROR [WebContainer : 8][BaseDAO] Exception in getConnection()
  com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180007
      at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1252)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:444)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:400)
      at cape.base.lbxoutclearing.ui.dao.BaseDAO.getConnection(BaseDAO.java:49)
  Caused by: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180007
      at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1496)
      at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2273)
      at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:903)
      at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:603)
      at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:431)
      ... 130 more
  </code></pre>