0

As per Oracle docs here

Local Clients A local client has these characteristics.

It must run in the same application as the enterprise bean it accesses.

It can be a web component or another enterprise bean.

To the local client, the location of the enterprise bean it accesses is not transparent.

As for :It must run in the same application as the enterprise bean it accesses. When it says 'same application, it means the EJb client and the EJB bean must be part of the same jar file? Or same EAR file? If it is part of the same jar file, why even use an EJB in the first place? We can just import the EJB bean in the client and use it like a utility class.

Victor
  • 16,609
  • 71
  • 229
  • 409

1 Answers1

0

It means the same EAR.

Regardless, the only reason to ever use EJB is because you want to delegate responsibility to the container (transactions, security, interceptors, resource injection, asynchronous methods, timers, etc.). There's nothing to stop you from implementing all the qualities of service yourself (e.g., Spring did it), but by using EJB, you don't have to worry about getting all the details right, and (in theory) you make it easier for many people to develop an application because they share a common understanding.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90