I know that EJB is the de facto standard in enterprise business logic applications. However, osgi declarative services can do many things that AJB does. Both are container-managed, both can be used as singleton, both can be used with CDI. The differences I found are as follows:
- EJB already has an RMI engine, but no DS.
- EJB has a thread pool but DS is not
- DS may require only OSGi, but EJB requires a JavaEE container (for example, if we are developing a standalone application using a JavaEE container, it will be difficult. As this will result in either performance overhead or the need to extract the EJB container from the JavaEE implementation (exm glassfish) .
What are the other important benefits of EJB that explain its use as a standard?
EDIT:
The reason I asked this question is this: we want to develop some business logic that can be used for both the SE platform and EE. That's why DS seems like the best solution. However, EJB and DS are two universes, and we are afraid of losing something important.
source
share