Applet

Install Applet Client EJB Example

JBoss Applet EJB Example converted to Eclipse projects.

  1. Click File, click Import..., click Existing Project into Workspace, click Next, click Browse..., navigate to C:\eclipse\workspace\appletejb, click Finish.
  2. Click File, click Import..., click Existing Project into Workspace, click Next, click Browse..., navigate to C:\eclipse\workspace\appletclient, click Finish.
  3. From My Computer navigate to %JBOSS_DIST%\server\default\conf, open jboss-service.xml in Wordpad, go to line with:
        <attribute name="URLs">
        ./deploy
        </attribute>


    Right after ./deploy add ,C:\eclipse\workspace\appletejb\appletclient.ear so it should look like:

        <attribute name="URLs">
        ./deploy,
        C:\eclipse\workspace\appletejb\appletclient.ear
        </attribute>
  4. Save changes and exit Wordpad.
  5. From a command prompt create a certificate by entering keytool -genkey.
    1. Enter keystore password: testkey
    2. What is your first and last name? Test User
    3. What is the name of your organizational unit? Testing
    4. What is the name of your organization? Test
    5. What is the name of your City or Locality? Testsville
    6. What is the name of your State or Province? TestState
    7. What is the two-letter country code for this unit? US
    8. Is CN=Test User, OU=Testing, O=Test, L=Testsville, ST=TestState, C=US correct? yes
    9. Enter key password for <mykey>
      (RETURN if same as keystore password): Press Enter
  6. Expand appletejb project in Eclipse.
  7. Right click on build.xml, click Run Ant..., check appletclient-jar, ear-dir, jar-dir, war-dir and war-dir-jboss-jar, click Finish.
  8. Click appletejb project, click Project, click Rebuild Project.  If you are just working with just the EJB code you do not need to run the Ant script again.  If you want to update the deployment with the appletclient.jar steps 3 thru 5 again.

Working with the Applet Client EJB Example in Eclipse

  1. Run Eclipse, in Package Explorer you should see appletclient and appletejb.
    bulletappletejb contains all the EJBs for the Applet Client EJB Example.  It uses one source folder src, has two packages org.jboss.docs.appletclient.ejb and org.jboss.docs.appletclient.interfaces which contain the EJB source.  The output is directed to appletejb/appletclient.ear/appletclientejb.jar which allows hot editing of the EJBs  without having to deploy them.
    bulletappletclient contains the Applet  source.  It uses the project as the source folder, has one package org.jboss.docs.appletclient.applet which contains the Applet client source and an ant file build.xml to build the ear folder, copy the jars to the appletejb project and sign them.
  2. Click JBoss, Start JBoss (if not already started) and wait for:

    10:33:48,077 INFO [Server] JBoss (MX MicroKernel) [3.0.1RC1 Date:200206291622] Started in 0m:12s:125ms

    in the Console output.  This means JBoss is up and running.
  3. Open a web Browser and go to http://localhost:8080/appletclient, you should see the Applet load.  Click on Get server message.
Home | JBoss Examples Last updated on 08/07/2002