Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

June 20, 2012

InvalidMonitorStateException

This exception is thrown when we call wait(), notify() or notifyAll() methods from any object when we are not having lock on that object.

This exception is a sub-class of RuntimeException. So we donot need to handle this.
Also this is the reason why the signatures of  wait(), notify() or notifyAll() do not have this exception declared .

Thread.run() and Thread.start()

Thread.start() essentially calls run() method only.
If we call Thread.run() directly, it will be executed in the same thread and a new thread would not be created.
So the purpose of multithreading is not fulfilled.

May 24, 2012

Defining priority / order of advice in Spring AOP

We can use @Order annotation to define the Order of advice

February 22, 2012

Webservices - Basics

1. Service over web
2. Language independent
3. Communicate mostly over HTTP, but can communicate over other transfer protocols as well
4. Two types : SOAP(Simple Object Access Protocol) based and REST(representational State Transfer) style
5. The client of webservices is generally an application without any user interface.
6. In a SOAP based webservice, a client generally sends SOAP document as request and gets SOAP based document as response. In a REST style WS, a client might send a standard http request and get an XML document as response.
7. Java 6 supports JAX-WS which supports both REST and SOAP webservices.