• Post Reply Bookmark Topic Watch Topic
  • New Topic

UniCastRemoteObject vs Activatable  RSS feed

 
David Duran
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know the advantages between a UnitCaseRemote RMI object over an Activatable RMI object and vice versa? I'm looking more in terms of overhead and performance wise.
Thanks.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UnicastRemoteObject and Activatable are intended for different purposes, not necessarily performance related. You'd extend Activatable to create a remote service that can be persisted in between uses, whereas UnicastRemoteObject extensions are always up and available.
Looking at it from a performance perspective, Activatable objects would require less continous overhead, since they can be serialized.
 
David Duran
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"They can be serialized"
Meaning they are created and executed when needed or do you mean something else? "Serialization" is somewhat of a black box term to me. Sounds important, just don't know what it's used for
 
Abdul Salam
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serialization refers to storing the 'state' of an 'object'(not class) to some persistant storage(database,file etc).
Look at the following simple code.This does not show you how to do serialization,but is to explain the concept.


...Now create a 'Pen' object with ink color blue.

I want to store the data of myPen(here value 'blue' associated with property 'inkColor')to some permenant storage,and use this data to recreate 'myPen' object at a later time(Even after a machine power failure).
This is what serialisation is all about.

Recreate myPen now.

We will get a pen object with it's ink color 'blue'.The value 'blue' is retained from the persistant storage.This is different from executing the following code again,which creates another object.

Hope this helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!