2 Replies Latest reply on Nov 8, 2012 4:58 AM by nickarls

    Disabling datasource at runtime

    nickarls

      When we upgrade our application during scheduled maintenance, we need the application to kick out existing users, prevent new logins and free the database from DS connections. I've implemented this with a flag in an application scoped bean and a filter + a REST interface for enabling/disabling the flag. The problem is that I'd also like to shut down the connection pool but disabling it requires a reload. Are there any other ways to drop the connections from a pool without a full reload?

        • 1. Re: Disabling datasource at runtime
          wdfink

          Does ':flush-all-connection-in-pool' do what you need? MIght be that you have to set min-pool-size=0 if you don't want to have openen connections after that, but this is also a attribute with reload-required.

          • 2. Re: Disabling datasource at runtime
            nickarls

            Yes, thanks, I think that will do. For some reason I managed to get a "success" without reload for setting both the min and max pool size. Not that it prevented connections from appearing after the flush, though. Hopefully, the filter should kick people out on next request before any more connection can be created...