Like i created a connection poling with 25 connections.all are being engaged with 25 users,now what happens when 26 users wants to the connection.?
That depends on the pool implementation. It might throw an exception, or it might wait until another thread hands back a connection to the pool, and then allow the code to continue.
2.What is the default connections number in connection pooling.?
Each implementation has a different default, but just about all of them allow that number to be configured, so the default doesn't mean much. You should change it to something that suits your need anyway.
Can you explain more about your application and How do you find out that all 25 connections are in use?
Usually we keep the connection pool size to let usual number of concurrent operation get a connection without waiting for a connection to be released.
when all 25 connections are in use your database operation should wait until a connection get returned to the pool, then the datasource will pick this connection and return it to your application in order to continue the pending operation.
In case that no connection get returned to the pool after some specific time which you determined in the connection pool preference, your datasource.getConnection will return an exception and your client thread future will depend on how you handle the exception.