University of Cincinnati logo and link  
Creating an EJB Deployment
 
  UC ingot
  • First, compile your classes.
  • Create the archives:
    • Put the EJB in a Java ARchive, or JAR file.
    • All of the files for the client, including the interface and home classes, go in a Web ARchive, or WAR file.  You make it the same way you make a jar file, you simply specify a filename ending in .war.
    • manifest: copied from the example.
    • xml descriptors: altered from the example.
      • jbosscmp-jdbc.xml: we don't need this, since we're not doing any persistence.
      • jaws.xml: we don't need this either.
      • jboss.xml: eliminate all entity and message parts.  Keep one session and alter it for our purposes.
      • ejb-jar.xml: Clear out references to entity and message beans.  Also delete transactions references at the bottom.  Look through the file and replace entities as needed.
  • Jar it up with the jar tool.
    • I used this line: 

    • C:\30-IT-398\simpleexample>C:\j2sdk1.4.1_02\bin\jar cvfm simple.jar META-INF\manifest.mf .
    • Which means:
      • directory C:\30-IT-398\simpleexample>: the directory which serves as the root for my projects.  This has a META-INF directory and a simplejb directory, which is the package for my beans and interfaces.
      • directory and file C:\j2sdk1.4.1_02\bin\jar: the absolute path to jar.exe, since it is not in my PATH environment variable.
      • cvfm: create new archive, generate verbose output, specify archive file name, include manifest information with specified manifest file.
      • META-INF\manifest.mf: the manifest file.
      • . everything
    • The resulting jar. Note the file structure.

 Deploying your EJB