Creating the Enterprise Bean

An enterprise bean is a server-side component that contains the business logic of an application. At runtime, the application clients execute the business logic by invoking the enterprise bean’s methods. The enterprise bean in our example is a stateless session bean called ConverterEJB. The source code for ConverterEJB is in the j2eetutorial/examples/src/ejb/converter directory.

Coding the Enterprise Bean

The enterprise bean in this example requires the following code:

  • Remote interface

  • Home interface

  • Enterprise bean class

Coding the Remote Interface

A remote interface defines the business methods that a client may call. The business methods are implemented in the enterprise bean code. The source code for the Converter ...

Get J2EE™ Tutorial, The now with O’Reilly online learning.

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