Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

is it possible to create single instance of java class per
session in web application

Answer Posted / ananth

by using Singleton pattern we can achieve one instance per
class.

Public final class Singleton{

private static Singleton singleton;

public static Singleton getInstance()
{
if(singleton ==null)
{
singleton=new Singleton();
}
retuen singleton;
}

public void getvalue()
{

}

}

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is event and listener in java?

823


What is the use of method save()?

965


What is application client module?

994


Is java is a technology?

973


What is the best java application server?

991


Is c++ more secure than java?

906


Describe the ear, war, and jar.

926


What is authorization constraint?

947


How will you explain load() and get() methods?

1002


What is meant by applet in java?

1086


What is javac written?

922


Define the struts in the j2ee framework?

905


What are the main components of the j2ee application?

928


What is j2ee and j2se?

932


In DAO we are writting sql queries , how it is possible with creating and closing database connections.

1932