Pages

Thursday, February 27, 2014

Tomcat DOS attack vulnerability

Tomcat by default supports multipart mime types.  For this purpose it uses apache commons fileupload library. However when there is a request longer then approximately 4 kb, tomcat goes to an endless loop which finally causes a high usage of cpu resources. This vulnerability is present in tomcat 7 and 8 versions only and there are patches that can be applied manually.

http://www.javacodegeeks.com/2014/02/apache-tomcat-and-denial-of-service-vulnerability.html

Thursday, February 20, 2014

What is jenkins?

Read the article

https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins

Sunday, February 16, 2014

Optimistic locking

What is optimistic locking? Imagine two users read data at the same time and both of them do updates. Then the last to update will win. that is the normal situation.

So how would you handle this situation without compromising the concurrency of the system. The below article gives one solution to this using spring read it carefully.

http://camelcase.com.au/public/jpa/optimistic-locking-with-jpa-and-spring/

Wednesday, February 12, 2014

What is declarative security?

Declarative security is the means of securing an application by means of deployment descriptors.
In ejb world it could be in ejb-jar.xml which is in META-INF folder. In web applications it could be in web.xml file in WEB-INF folder.

Monday, February 10, 2014

java version configuration in ubuntu

to set default java version in your machine type in the terminal,

sudo update-alternatives --config java

there you will get a prompt and then you can set it.

to set java home globally follow the instructions add the following lines in the .barshrc file which is located in the /home/yourusername/ directory

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
PATH=$PATH:JAVA_HOME