• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ejb question

 
Walter Vetrivel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An instance of the Person class, whose definition is given below, is returned from a remote method invocation in RMI. An exception is thrown. Why? public class Person extends Object { private String name; public String getName() { return name; } public String setName(String newName) { name = newName; } }

a) Person does not implement the java.io.Serializable interface

b) Person does not implement the RemotePerson interface

c) The class was not precompiled with rmic

d) The class does not extend java.rmi.server.UnicastRemoteObject}


Single Select - Please select the best answer (one and only one choice must be selected).
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is a. To be passed via RMI the class, and its components, must be serializable.
John
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree totally with John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic