Problem 1
Fill in the blanks in each of the following statements: a) The JavaSpaces technology is an ______ queue b) Objects placed in the JavaSpaces service must implement the ______ interface. c) Two methods of the JavaSpace interface that read an Entry from the JavaSpaces service are ______ and ______ . d) Creating a transaction, requires a ______ . e) Method ______ can be used to avoid unnecessary serializations of an Entry.
Problem 2
State whether each of the following is true or false. If \(f\) alse, explain why. a) Entrys may have private fields that are used for template matching. b) Method take can remove all matching Entrys from the JavaSpaces service. c) To modify an Entry in a JavaSpaces service, we need to take the Entry away from the JavaSpaces service, change the values of the Entry and put the Entry back to the JavaSpaces service. d) Objects stored in a JavaSpaces service cannot have primitive type fields. e) When writing an Entry to a JavaSpaces service, if the Entry already exists, the new Entry overwrites the old Entry.
Problem 8
In our examples, we use class JavaSpaceFindex to find a JavaSpaces service and class TransactionManagerFinder to find a transaction manager. These two classes are similar. Write a program called ServiceFinder that takes the Class object (i.e., Javaspace \(\cdot\) class) as input and returns the service object (i.e., JavaSpace object). Does SexvicePindex return the same JavaSpace object if you have multiple JavaSpaces services running? If not, how can you fix it so that ServicePindex always returns the JavaSpaces service you wanted. [Hint: set the name for each JavaSpaces service instance using the com \(.\) sun \(.\) J In \(.\) outriggex. spaceName property when running the JavaSpaces service from the commandline. This property will register the corresponding JavaSpace stub in the Jini lookup service with the Name Entry set to the value specified.