To be specific, let me illustrate the question with the Spring http-remoting example.
Suppose we have this simple interface implementation:
public SearchServiceImpl implements SearchService {
public SearchJdo processSearch(SearchJdo search) {
search.name = "a funky name";
return search;
}
}
SearchJdo is just a POJO.
Now, when we call the method from the client through http-remoting (Spring is a mechanism for calling remote objects like EJB that uses serialization), we get:
public class HTTPClient {
public static void main(final String[] arguments) {
final ApplicationContext context = new ClassPathXmlApplicationContext(
"spring-http-client-config.xml");
final SearchService searchService =
(SearchService) context.getBean("searchService");
SearchJdo search = new SearchJdo();
search.name = "myName";
SearchJdo search2 = searchService.processSearch(search);
System.out.println(search == search2);
}
}
The problem is that search objects differ due to serialization, although from the logical perspective they are the same.
The question is whether there is any method that allows you to support or emulate the identification of an object through virtual machines.