COMP 655: Distributed/Operating Systems - Summer 2011
2024-03-29 07:22:57 UTC
Home
Lectures
Assignments
Books, web, tools
 
Turnitin.com
Guidelines
Writing help
Plagiarism
 
DiNo
Glassfish
RESTful client
Menu service
JAX-RS
JAXB
EJB
Java
 
Bulletin board
Contact
  Project: implementation
This page provides details on assignment 1-2-5. It is assigned in week 4 and due in week 12. It is worth 150 points. It is a group assignment.

This page provides miscellaneous information about DiNo implementations.

Packaging your DiNo implementation

DiNo's structure will be parallel to the EJB-based menu service example at the bottom of the EJB page. The notebook service will be in a WAR file, the directory service will be in an EJB JAR file. Consider this: how will the notebook service get the interface, transfer objects and exceptions that make up the notebook service interface? It has to have them to compile. Similarly, the notebook service has to have access to the classes in order to compile. Where do they come from? The answer is "the EJB client JAR" In the menu service example, the EJB client JAR is menu-ejb-client.jar, and in DiNo, it's in the DiNo directory client jar, which is also accessible from the DiNo interfaces page)

It's easy to make dino-directory-client.jar available to the notebook service: just include it in the WEB-INF/lib directory.

To make the classes in
dino-directory-client.jar available to your directory EJB, there are two ways to go:
  1. Include dino-directory-client.jar in your EJB JAR, and include the line

    Class-Path: dino-directory-client.jar

    in the META-INF/MANIFEST.MF file. This is easy to do with Ant, or if you are creating your ejb-jar by exporting from Eclipse. The DiNo directory reference implementation to uses this approach.

    Details on doing this in an Eclipse EJB-jar project:

    • open ejbModule/META-INF/MANIFEST.MF (it's just a text file)
    • add the classpath declaration line above to the file
    • if necessary, download dino-directory-client.jar
    • import dino-directory-client.jar into ejbModule
    • when you're ready to deploy, right-click the project and pick Export, then EJB > EJB JAR file

    Notes on this procedure

    • remember to check "Export source files" when you export. This isn't necessary to make your EJB work, of course. However, you have to include your source when you submit your DiNo implementation to the drop box, so you might as well do it routinely (set it and forget it)
    • if you called your source folder something different from Eclipse's default "ejbModule", use your source folder's name instead of "ejbModule" 
  2. Extract the .class files from dino-directory-client.jar and include them in the EJB JAR file. This is easy to do if you build your EJB JAR with Ant. (NOTE: do NOT add the .java files from dino-directory-client.jar to your DiNo directory project in your IDE. The IDE will compile them, which introduces a risk that your directory might not be usable by other teams' notebook services) I used this approach in the menu-ejb example.

Turning in your DiNo implementation

When you are ready to turn in your DiNo implementation after the integration test in week 12, do the following:

  • Create a jar or zip file containing
    • your notebook service implementation in a WAR file (the WAR file should include your source code)
    • your directory service implementation in an EJB-JAR file (the EJB-JAR file should include your souce code)
  • Submit this jar or zip file to the 655 drop box, in assignment 1-2-5

Only one member of each team needs to do this.