Should I use @EJB or @Inject

The @EJB is used to inject EJB’s only and is available for quite some time now. @Inject can inject any managed bean and is a part of the new CDI specification (since Java EE 6). In simple cases you can simply change @EJB to @Inject. In more advanced cases (e.g. when you heavily depend on … Read more

What is an EJB, and what does it do?

Why really use them? (Why not just stick to POJO?) IF you need a component that accesses the database, or accesses other connectivity/ directory resources, or is accessed from multiple clients, or is intended as a SOA service, EJBs today are usually “bigger, stronger, faster (or at least more scalable) and simpler” than POJOs. They … Read more

What exactly is Java EE?

(Updated Feb 2022) First of all, “Java EE” has since Sep 2019 been renamed to “Jakarta EE“, starting with version 8. Historically, there was also the term “J2EE” which covered versions 1.2 until 1.4. The term “Java EE” covered versions 5 until 8. See also Jakarta EE, History on Wikipedia. Is Jakarta EE just a … Read more