

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper : Activatable Objects, Activationdesc, Activationgroup, Implementation Class, Client, Program, Interface, Helloworld Method, Chat Room, Register
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Semester 1 Examinations 2010/
Module Code: SOFT 8007
School: Mathematics & Computing
Programme Title: Bachelor of Science (Honours) in Software Development – Award
Programme Code: KSDEV_8_Y
External Examiner(s): Ms Deirdre Lawless Internal Examiner(s): Mr Denis Long
Instructions: Answer any THREE questions.
Duration: 2 Hours
Sitting: Winter 2010
Requirements for this examination:
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.
a) What are the advantages of using activatable objects? (6 Marks) b) Explain ( line by line ), what is happening in the following code:
package example; import java.rmi.; import java.rmi.activation.; import java.util.Properties; public class Setup { public static void main (String[] args) throws Exception {
System.setSecurityManager(new RMISecurityManager()); Properties props= new Properties(); props.put("java.security.policy","c:\arith\example\policy");
// ActivationGroupDesc.CommandEnvironment ace=null; ActivationGroupDesc group= new ActivationGroupDesc(props,ace); ActivationGroupID agid= ActivationGroup.getSystem().registerGroup(group);
// String src = "file:/example/"; MarshalledObject data = null; ActivationDesc desc= new ActivationDesc(agid,"example.BImpl",src,data);
// B stu = (B)Activatable.register(desc);
Naming.rebind("ActivatableB",stu); System.exit(0); } }
(12 Marks)
c) The object stu has one simple helloworld method, Show a sample interface and implementation class for the object. (9 Marks)
d) Write a Client program that can access this object. (6 Marks) Total for Q1 (33 Marks)