• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serializable Question

 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

If I have a graph of objects that are being called, say for instance the following:


Will the class (Thingy) have to be serialized as well?

Curious, since this would mean for a large application, all objects
would have to be serialized?
Is there any patterns that address this?
Any solutions ?
Thanks

Zak
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, coz you are not returning the instance of Thingy class back to the client. Also, the business operation data is not passed by value to the client but the output of the business operation
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nischal is right... also, your Dodad reference doesn't have to be Serializable or Remote either. Your client gets a stub to whatever Remote object has remoteMethod(). When remoteMethod() on the stub is called, the stub calls the *real* remoteMethod() on your Remote class running on the server. Objects that are reference *inside* remoteMethod() don't have to be Serializable or Remote... only objects that are sent *into* the method as parameters, or that are sent *out of* the method as return values.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!