Memcached tutorials

Memcached is an free open source object caching system which stores data in key value pair, used to reduce unnecessary DB or file server access.Memcached stores data like objects or file in RAM. It is always used with a database server because memcached stores data in RAM, so we generally cached only those data in Memcached, which is frequently used in application for read operation.

In production environment, commonly Memcached is installed at different server from database and hosting server, so whenever any insertion request comes, first data get inserted in db server and update Memcached server also. And next time when read request comes, application checks Memcached server first, if Memcached server has recent data, then application access data from memcached server and if not, then application fire db query to get data from database server and again update Memcached server with recent data for the next time read operation. Read More

Quartz Scheduler tutorials with example

Quartz is an open source production ready job scheduler,executes jobs at predefined intervals.It can easily integrate with java and provides no. of features like JTA transactions and clustering.
Before going to example part , lets understand, how it’s work :
There are 3 important keyword in quartz which we need to understand
1: Quartz Job: Job means what you want to execute (your java classes and codes)

2: Quartz Trigger : Quartz triggers execute your Quartz Jobs
Quartz supoorts two types of Triggers

  •     SimpleTrigger – In this , you can set start time, end time, repeat interval.
  •     CronTrigger – its work same as Unix cron.

3: Scheduler : It’s just connect your job with trigger and execute according to given time interva Read More

Sphinx search installation and uses with java

Sphinx is a full text search engine tool developed by Sphinx Technologies Inc in 2001.If your application use heavy search query, you can minimize query overhead by Sphinix.It has native support for sql indexing and can
communicate with database in own sql dialect.
In this tutorial first we will learn Sphinx installation on windows and linux and then will we see how can we integrate with java.
so lets start

 

Tags: ,

An introduction to DWR

What is DWR (Direct Web Remoting) ?

DWR stands for direct web remoting , is based on RPC (Remote procedure calls) technology. DWR  is used to access our java methods from javascript code.In struts,spring application where making ajax request is quite difficult we can use DWR.

DWR dynamic generates a javascript code for java backend classes.This javascript code use XMLHttpRequest to communicate with DwrServlet.It provides a callback function where we get response. Read More

Using DataGrid in JSP-Servlet

Using DataGrid in JSP-Servlet (Json)

In Jsp-Servlet , DataGrid can be implemented in many ways, you can write own method ,Here we are using Jquery EasyUI Datagrid in jsp-servlet project. Read More

Tags: , ,

Display heap status in Eclipse

Show heap status in Eclipse

You can view current heap status in Eclipse without installing any external plugins.To know heap status in Eclipse follow these steps;

Step1:Click the Window menu bar and select Preferences. Read More

Display heap status in MyEclipse

How to display heap status in MyEclipse ?

 MyEclipseDuring project development some time it is required to find out how much heap memory is being used by running programs.To view heap status in MyEclipse follow these steps:

Click the MyEclipse menu in menu bar and select show heap status under Utilities. Read More

An introduction to Struts2 JQuery Plugin

Struts2 Jquery Plugin Tutorial

struts2-jqueryIn Struts2 based application some time it is required to add custom theme on component.We can do this by changing Struts ftl file but it is very difficult because you have to learn freemarker and many others.but don’t worry there is an alternate solution you can use Struts 2 jquery plugin.This plugin internally use Javascript Jquery library.It makes your Struts component more attractive and stylish.Mostly all UI widget like model dialogbox,datatime picker,div etc all are available in this plugins. And one more thing it has powerful Ajax widgets.
This plugin is hosted at http://code.google.com/p/struts2-jquery-plugin/ where you will get all details.
Read More

Using Java Bean on JSP page

Implementing java bean on Jsp page

JSPJava Bean is simply a java class with setter and getter methods to visualize its properties.Bean class gives reusability and flexibility on jsp pages.

There are mainly three tags used to embedded a Java Bean into jsp pages :

1. <jsp:useBean id=”<an-id>” class=”<bean-class-name>” scope=”<scope-name>” />

where id is a local name of bean that is used to reference setter and getter properties and class is a Java bean class name and scope define life of a Java bean. Read More