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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.