OK. This actually comes down to how core Java works.
If you have code that uses other classes, those classes always have to be in the classpath.
So if I am a client, and I use your Domain object in my code, then the domain object class better be in my client side classpath. Same with if I use your interface, then the Interface better be in my classpath.
Ashwin Sridhar wrote:If I understand you correctly, should I have the interface and domain Object in my client side as well ?
Then any change on server, requires appropriate changes in the client as well ?
You should have whatever class files you need and use in any Java code running. Regardless.
I run java from the command line, and it runs some Java code, any class that that code uses has to have that class in the classpath. Plain and simple. Trying to figure out client side server side it just adding complexity to the question.
If both the server side and the client side are both using a class, then that class has to be in the classpath for both sides. not because it is client and server, but because each is using the class in their own jvm. That is why this is just a Java question and not related to Spring.