Thursday, 12 July 2012

Spring Security authentication failure event


For security reasons you need to limit failure login attempts in your application, simply you can do it using counter, that updates a count in the DB. Next I will show how to handle this event in Spring Security

Tuesday, 26 June 2012

Java: MongoDB simple example


MongoDB - is an open source document-oriented NoSQL database system. Next I will create simple servlet example that's uses MongoDB. 

Friday, 8 June 2012

Java: Generate Microsoft Word document


First you need download Apache POI - the Java API for Microsoft Documents, and next this fragment of code

Wednesday, 11 April 2012

Java Concurrent Animated


This project is a series of animations each illustrating the coding and usage of a component in the java concurrent library.

Tuesday, 21 February 2012

C3P0 ConnectionPool: How To configure

C3P0 - is connection pool,  connection pool is a cache of database connections maintained, so that the connections can be reused when future requests to the database are required. 


The main question is how to cofigure it, because default values are not perfect. First of all I found oficial doc with description of the values. Next I found this one C3P0 ConnectionPool Configuration Rules of Thumb. After some performance testing of my application, I can confirm that configuring like in this article, can greatly increase your performance, in my case it was about twice. So bellow text of this article -  "