| |
Install Applet Client EJB Example
JBoss Applet
EJB Example converted to Eclipse projects.
- Click File, click Import..., click Existing Project into Workspace, click
Next, click Browse..., navigate to C:\eclipse\workspace\appletejb, click
Finish.
- Click File, click Import..., click Existing Project into Workspace, click
Next, click Browse..., navigate to C:\eclipse\workspace\appletclient, click
Finish.
- 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>
Save changes and exit Wordpad.
From a command prompt create a certificate by entering keytool -genkey.
- Enter keystore password: testkey
- What is your first and last name? Test User
- What is the name of your organizational unit? Testing
- What is the name of your organization? Test
- What is the name of your City or Locality? Testsville
- What is the name of your State or Province? TestState
- What is the two-letter country code for this unit? US
- Is CN=Test User, OU=Testing, O=Test, L=Testsville, ST=TestState, C=US
correct? yes
- Enter key password for <mykey>
(RETURN if same as keystore password): Press Enter
Expand appletejb project in Eclipse.
Right click on build.xml, click Run Ant..., check appletclient-jar,
ear-dir, jar-dir, war-dir and war-dir-jboss-jar, click Finish.
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
- Run Eclipse, in Package Explorer you should see appletclient and appletejb.
| appletejb 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. |
| appletclient 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. |
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.
Open a web Browser and go to
http://localhost:8080/appletclient, you should see the Applet load. Click
on Get server message.
|