Submitted by heartin on Tue, 03/05/2013 - 22:56
This article lays down some of the best practices which you can use during your design or code reviews, and assumes that you are familiar with the basics of serialization in java. Consider using custom serialized form and don’t use the default serialized form provided by Java even if you have decided to design only the APIs perfectly for time being releasing a throwaway implementation and then replace it with a better one in future release.
Submitted by heartin on Fri, 03/01/2013 - 11:53
Follow the these steps to configure an apache tomcat server with eclipse, and use the server from within the eclipse and do start, stop, deploy etc.
Submitted by heartin on Tue, 02/05/2013 - 19:22
When several threads try to access a single resource, there is a chance that it might corrupt that data. Synchronization is the process which ensures that, when several threads want to access a single resource, only one thread can access it at any given time; other threads trying to access will have to wait for its turn.
Important points about Synchronization
-
A synchronized region is guarded by a lock object.
Submitted by heartin on Tue, 02/05/2013 - 19:06
Thread class has many important methods like init, start, stop, run, getName(), getPriority(), isAlive() and join(), and also few static methods like sleep(), yield() etc.
Submitted by heartin on Tue, 01/22/2013 - 09:47
The producer consumer problem describes two processes, the producer and consumer, who share a common fixed size buffer used as a queue. The producer generates data and put data into buffer continuously. At the same time, the consumer will be consuming the data continuously. The problem is to make sure that producer won’t try to add data into buffer if it is full and that the consumer won’t try to remove data from an empty buffer.
Pages