• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

non-network mode serialization?

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In non-network mode, my requirement doc say:

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.

I'm confused with must not involve the serialization of any objects
what this means? Does it mean I can not define and use any class which implement serialize interface in non-network mode.
because I'm going to wrap the data as a class object.In network mode, I have to implement serialize interface to make this class can be delivered from server side to client side.

but , In non-network mode can I use the same object ? i mean I use it just for local .

thank you very much.
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Does it mean I can not define and use any class which implement serialize interface in non-network mode.



No it does not or you wouldn't even be able to use a simple String. java.lang.String implements Serializable also

Regards,
Ronald Wouters
 
mark ken
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right.
thank you Ronald.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I also have same problem and i still not sure what should i do for coding.

"must not involve the serialization of any objects" in non-networked mode.

My guestion is that client will ask the Data class directly(i.e. data.read(recordNumber) ) and will return Srting array or any other return value.
If String array will be retruned, it would be serialization object. isn't it? because String is serialization object.

am i right?

if so, what can i do?
how can i avoid it? what kind of return value are valid?
 
Ronald Wouters
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If String array will be retruned, it would be serialization object. isn't it? because String is serialization object.



Hi,

it is important to understand that just because an object implements the java.io.Serializable interface, does NOT necessarily mean that "serialization" will ALWAYS occur. It just means that the object, say like a String or a custom made value object, CAN be serialized/deserialized.

When everything is happening locally, in a single VM, as is the case when you run the application in standalone mode, when no RMI stuff is happening what so ever, then obviously there is no need to "serialize" (send over the network) anything at all. The fact that the objects you are using as parameters and return values implement the java.io.Serializable interface is irrelevant in this case.

I hope this clears things up.

Regards,
Ronald Wouters
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic