Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About serialization objects

 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone

Firstly, I test the alone mode. It directly uses the Contractor class which doesn’t implement Serializable interface and works fine. The user can book a record.
But in the server mode, the Contractor class must have the following signature, or the JTable doesn’t obtain any data at all.



If I also use this class in the alone mode, can I break the requirements that The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.

Or Serializable is just a marker interface, so it only indicates that the class which implements it can be serialized, rather than it actually is.

In other words, as long as I don’t use loopback networking, I can freely use the class Contractor which has implemented Serializable interface in the alone mode. right?

Thanks in advance!
Regards,Ailsa Cape
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11854
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ailsa,

You are correct - Serializable is just a marker interface. As long as you do not actively serialize your class you should be fine.

Regards, Andrew
 
Ailsa Cape
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrew

Thank you again for confirming my idea!

Best Regards, Ailsa Cape
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the way to perform the application in both networked mode and non-networked mode.
Basically the assignments says that it should work in same VM and also across the network. I plan to use RMI as it takes away most of the implementation issues.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic