I want java code for Shopware API call to clear all cache. Please help
Asked
Active
Viewed 76 times
-1
-
You say "new server": What sort of platform are you using? Spring? An EJB container? – chrylis -cautiouslyoptimistic- Mar 23 '19 at 07:09
1 Answers
0
You are already using a connection pool (assuming you are using org.apache.commons.dbcp.BasicDataSource
or from dbcp2
), the real problem is that you are creating a static Connection
and only ever return that one connection.
Don't do that, remove the static field connection
, make sure you create the data source once and assign it to a static field, and in getConn
call getConnection
on the data source unconditionally.

Mark Rotteveel
- 100,966
- 191
- 140
- 197