Using local thread variables

Shared data is one of the most critical aspect of concurrent programming. When you create an instance of a class that implements Runnable interface or extends Thread class and use same object to create multiple Threads then all the threads share same attributes. This means if you change any attribute in one thread, all threads […]

, , ,

Leave a comment

Removing border from primefaces <p:layout>

Primefaces provides an excellent component <p:layout> to lay structure your website, but it has an annoying border which makes everything look cluttered. Here is how you can get rid of that (at least for now) I know it is bad, but i am no CSS guru! Just figured out that this works!

, ,

Leave a comment

Get source JARs and Javadoc from Maven repository

Sometimes you may want to use Javadoc feature of your eclipse IDE so that you may be able to refer the source code and javadoc while using some API. Option 1 Following maven commands come in handy for these purposes: First command attempts to download *-source.jar files for the dependencies listed in your pom.xml and […]

Leave a comment

Find running processes in Oracle

Use following query to find running processing in Oracle. The output shows Process id of the running process, Status whether it is ACTIVE or INACTIVE, username, Schema Name and the SQL query that is running under current process. Running following query gives a handful of useful information.

,

Leave a comment

SQL Index

Index in SQL is created on existing tables and is a way to boost up the data retrieval performance of table. Index should be created on the columns that are frequently used for searching data. An Index is an ordered list of contents of a column ( or a group of columns) of a table. […]

,

Leave a comment

Difference between Wait and Sleep in Java

I am listing here differences between wait() and sleep() methods in java. Please feel free to suggest if you can think of anything apart from those listed below. Wait Sleep Wait method release the acquired monitor while the thread waits Sleep method holds the monitor while the thread goes to sleep Wait method should be […]

,

Leave a comment

Returning Data from Java Threads

There are a couple of ways in which threads can be created. i.e. Implementing Runnable Interface and extending Thread Class (Example here). Further we need to implement run method and do our processing inside the run method. This would look like below. One thing to note about above snippet is the return type of run() […]

, , ,

3 Comments

Follow

Get every new post delivered to your Inbox.

Join 60 other followers