Thursday, January 23, 2014

2 instances of same autobean getting updated simultaneously

Have an autobean created after deserliazing the json response. Then I save it in two different files to the classmembers with getter and setter
Class A
MyBean bean = null;
public MyBean getBean()
public void setBean(MyBean beanVal)
   this.MyBean = beanVal;
Similarly in Class B. The reason to have the bean value at 2 places is :one bean value is referred as original or default and the other can be updated. So whenver user wants to Reset, default bean can be loaded. I am seeing a strange behaviour: when I update the bean from  class A, bean value in class B is also updated.
Please suggest how can I have 2 instance to solve my case.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment