I have an application in development in Java using Hibernate and PrimeFaces, in the list of items I have the option to do a search for some information in real time using several filters.
However when I run the application and perform some tests I get the following return on the output of my development console.
WARN: SQL Error: 1040, SQLState: 08004
ERROR: Data source rejected establishment of connection, message from server: "Too many connections"
Informações: javax.el.ELException: /listaProduto.xhtml @45,83 value="#{produtoBean.pesquisa()}": org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
javax.el.ELException: /listaProduto.xhtml @45,83 value="#{produtoBean.pesquisa()}": org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIData.getValue(UIData.java:732)
at org.primefaces.component.datatable.DataTable.getValue(DataTable.java:1002)
at org.primefaces.component.api.UIData.getDataModel(UIData.java:629)
at org.primefaces.component.api.UIData.setRowModel(UIData.java:436)
at org.primefaces.component.api.UIData.setRowIndex(UIData.java:428)
at org.primefaces.component.api.UIData.visitTree(UIData.java:717)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
...
Can I clean up searches as I make new ones?