i am writing a bean for counter. I want to store the counter value when the server is stopped and reload it when server restarts.I am using JRUN 4 default web server for testing. my query is does JRUn automaticaly saves the object and reload it when we declare a class as implementing serializable? if not the how to achieve it?
the script i have written is as below. import java.io.*; import java.util.*; public class dgftcounter implements Serializable { private int visitnumber ; public int getVisitnumber() { visitnumber = visitnumber +1; return visitnumber; } } i found that the visitnumber becomes 0 wheneever the server stops and restart. it mean the bean is not getting serialized. how can i write the method to serialize the bean. and how these methods will get called by server when this bean is getting destroyed at the time of stopping of server. -avinash ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html