1 Reply Latest reply on Jun 4, 2006 9:41 AM by markricard

    What happens if you wait too long for a connection?

    markricard

      Here is the scenario:

      Background:
      You have JBoss configured to handle a connection pool of 50 connections. JBoss gets 2000 requests at the same time for a connection. Obviously, not everyone will get a connection the first time because there are only 50, but it hands out the 50.

      Questions:
      1.) But what happens to the other 1950 requests that are waiting?
      2.) How long do they wait for a connection and then what happens?
      3.) Do you have to code for that and then just "try again" to get the connection if there is an exception?
      4.) What is the exception?

      Thanks in advance.

        • 1. Re: What happens if you wait too long for a connection?
          markricard

          Answers:

          1.) JBoss will attempt to handle all of the connections via the connection pool. But 2000 connections will most likely not be able to be handled and you will start getting exceptions.
          2.) Configurable
          3.) Yes. You should always code for a possible connection timeout or failure.
          4.) Depends. Could be timout exception, or some other goofy non-related exception.