Pojo = plain old java object.
public class MyClass{
private int value;
public MyClass(int val){
value = val;
}
public void setValue(int val){
Type: Posts; User: copeg
Pojo = plain old java object.
public class MyClass{
private int value;
public MyClass(int val){
value = val;
}
public void setValue(int val){
One option would be to re-write the function: create a pojo (plain old java object) class that wraps the data, then pass an instance of this class to the function as a parameter and let the method do...
I guess the more important question is what you want to do? If you are worried about threading, then synchronize access to the instance variable. If you want the data to survive server shutdowns,...
Did you try the code you posted? The servlet life cycle might give you what you want...