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() […]

, , ,

Leave a comment

Spring Object/XML mapping example

In this tutorial we will look into Spring’s Object/XML mapping support. Spring provides an elegant way to convert Object to XML and then XML back to Object. Marshaller and Unmarshaller Spring abstracts all marshalling operations behind the org.springframework.oxm.Marshaller interface, which looks like this. The Marshaller interface has one main method, which marshals the given object […]

, , , ,

2 Comments

Spring 3 MVC and JSON Response

JSON stands for Javascript Object Notation, and is a good alternative of XML for data transfers these these days. To know more about JSON visit http://www.json.org/ In this tutorial we will explore generation of JSON response in Spring MVC. Tools Used Eclipse Tomcat Jackson 1.7.1 Spring 3.x Maven Project Structure This is a maven based […]

, ,

3 Comments

Follow

Get every new post delivered to your Inbox.

Join 55 other followers