O'Reilly logo

Borland® JBuilder™ Developer’s Guide by Jeff Swisher, Saleem Siddiqui, Michael Landy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing a Client

The best way to learn how to use EJBs is to look at some examples. The process for a client to connect to a Bean is rather simple. For a client to work with an EJB, the client must perform the following:

  • Get a reference to a JNDI server.

  • Get a reference to the desired Bean’s home object.

  • Get a reference to a remote object by calling the create() method or a finder method.

  • Invoke the desired business method.

Now we’ll create a client that communicates to a weather Session Bean. This Bean simply connects to a Bean and returns to the client the current temperature. The following steps are required to create a client to connect to the weather Bean:

1.
Create a client application:
 package sessionbean; class WeatherClient { public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required