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.
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. […]
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 […]
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() […]
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 […]
Here is a simple sample code to downloads a file in jsf 2.x. Inside your Form Bean you write a method that basically either reads a file from file system or creates it dynamically and writes the file to HttpServletResponse instance obtained using FacesContext.getCurrentInstance().getExternalContext().getResponse();