Accessing an EJB from an Applet

EJBs can be accessed from a number of different application clients. Here we will see how an EJB can be accessed from an Applet. Applets are still used extensively to provide a richer browser interface than that provided using standard HTML. This includes the use of graphics and animations. Knowing how to access an EJB from an applet gives the applet developer even more opportunities.

Getting ready

Accessing an EJB from an applet uses three steps:

  1. Creating an EJB for the actual functionality
  2. Creating a remote interface
  3. Using JNDI in the applet to obtain a reference to the EJB

    The remote interface determines which methods are available to the Applet.

How to do it...

Create two different applications. The first application ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.