I have a query regarding connection pooling. Am using a data source for the EJB interface. And it uses 50 connections minimum. While the running it reuses the connection (as per pooling technique) but in every transaction some data’s were updated on the database. How come the new data will reflect on the interface application with old connection object.
Whether we need to refresh the database everytime before the transaction starts
When you close the connection, it commits (updates the database) and returns to the pool for another transaction. There isn't overlap between multiple requests. Everytime you request a connection from the pool, you start out clean.