HI All,
In special situation i want a set of data that has to be store in a .ser file,means some values that has to store if
tomcat is shutdown,and when tomcat restarted those values has to read from the file,so i use serialization of
java and store the data at "tomcat_home\webapps\axis2\WEB-INF\classes"=='SaveValue.ser'.
In my program i used
static {
Runtime.getRuntime().addShutdownHook(new
Thread() {
public void run() {
System.out
.println("---------------------Running Shutdown Hook-----------------------------");
writeObjects();
}
});
}
the writeObjects() will do the serialization as described here
http://www.javabeginner.com/uncategorized/java-serialization .
if i click close button or press cntl-C while tomcat is running the SaveValue.ser will created and store in the location tomcat_home\webapps\axis2\WEB-INF\classes ,
but when i click shutdown.bat the file is not creating .
what is the problem how can do serilization with tomcat restart in axis2 webservice.please help me
Thanks in advance