JavaTechie

Its all about Technology

Memory Problems with Mysql Connector August 23, 2008

Filed under: Mysql — javatechie @ 4:14 am
Tags:

GOOD:

mysql.jar (221 kb, 10/7/2003)
mysql-connector-java-3.0.16-ga-bin.jar (231 kb, 11/16/2004)
mysql-connector-java-3.0.17-ga-bin.jar (241 kb, 6/22/2005)

BAD (memory leak):

mysql-connector-java-3.1.10-bin.jar (409 kb, 6/23/2005)
mysql-connector-java-3.1.14-bin.jar (449 kb, 10/18/2006)
… (other versions)
mysql-connector-java-5.1.6-bin.jar (687 KB, 3/5/2008)

So – does anyone know what the major change was between 3.0.17 and 3.1.10 that would have such a dramatic effect?

 

java.lang.IllegalStateException August 8, 2008

Filed under: Java — javatechie @ 6:11 am
Tags: , ,

It is caused by the fact that response.sendRedirect is not the last statement in Servlet to be executed and its embedded in between your business logic i:e after that some function or business logic is continued. So, it should be the last statement otherwise it should return null after redirecting.

eg.

response.sendRedirect(“abc.jsp”);

return;