Questions tagged [jakarta-ee]

Jakarta EE (formerly known as Java Enterprise Edition, Java EE, and J2EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. This is the master tag. For more specific API questions, please use [jsf], [servlets], [jpa], [cdi], [ejb], etc.

Java Enterprise Edition (Java EE) is a specification defining a collection of Java-based technologies and how they interoperate. Java EE specifies server and client architectures and uses profiles to define technology sets targeted at specific classes of applications. Numerous implementations are available in the form of both commercial products and open source projects. It is also possible to assemble full or partial implementations using constituent components.

From the Java EE 6 specification:

All Java EE profiles share a set of common features, such as naming and resource injection, packaging rules, security requirements, etc. This guarantees a degree of uniformity across all products, and indirectly applications, that fall under the "Java EE platform" umbrella. This also ensures that developers who are familiar with a certain profile, or with the full platform, can move easily to other profiles, avoiding excessive compartmentalization of skills and experience.

Java EE is currently migrating to the Eclipse Foundation under the top-level project EE4J, with the intent of introducing a more open community process with a faster release cycle. Under this process, Java EE has been rebranded as Jakarta EE.


References

Specifications


Official documentation


Official tutorials


Java EE learning resources


Java EE version history


Java EE on Social Media

29439 questions
119
votes
1 answer

PowerMockito mock single static method and return object

I want to mock a static method m1 from a class which contains 2 static methods, m1 and m2. And I want the method m1 to return an object. I tried the following 1) PowerMockito.mockStatic(Static.class, new Answer() { @Override …
user1393653
  • 1,191
  • 2
  • 8
  • 3
118
votes
5 answers

When to use EntityManager.find() vs EntityManager.getReference() with JPA

I have come across a situation (which I think is weird but is possibly quite normal) where I use the EntityManager.getReference(LObj.getClass(), LObj.getId()) to get a database entity and then pass the returned object to be persisted in another…
SibzTer
  • 1,737
  • 4
  • 14
  • 18
116
votes
5 answers

Backing beans (@ManagedBean) or CDI Beans (@Named)?

I've just started reading through Core JavaServer Faces, 3rd Ed. and they say this (emphasis mine): It is a historical accident that there are two separate mechanisms, CDI beans and JSF managed beans, for beans that can be used in JSF pages. We…
Matt Ball
  • 354,903
  • 100
  • 647
  • 710
115
votes
31 answers

How to improve Netbeans performance?

Is there a real way to get Netbeans to load and work faster? It is too slow and gets worse when you have been coding for some time. It eats all my RAM. I am on a Windows machine, specifically Windows Server 2008 Datacenter Edition x64, 4Gb of RAM,…
yeradis
  • 5,235
  • 5
  • 25
  • 26
110
votes
2 answers

Problems with making a query when using Enum in entity

I have the following in a Question entity: @NamedQuery(name = "Question.allApproved", query = "SELECT q FROM Question q WHERE q.status = 'APPROVED'") and @Enumerated(EnumType.STRING) private Status status; // usual accessors I am getting this…
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434
110
votes
8 answers

Difference between web server, web container and application server

Please tell me the Difference between web server, web container and application server.
Gautam
  • 3,276
  • 4
  • 31
  • 53
109
votes
6 answers

JPA map collection of Enums

Is there a way in JPA to map a collection of Enums within the Entity class? Or the only solution is to wrap Enum with another domain class and use it to map the collection? @Entity public class Person { public enum InterestsEnum {Books, Sport,…
Gennady Shumakher
  • 5,637
  • 12
  • 40
  • 45
109
votes
3 answers

Java EE 6 @javax.annotation.ManagedBean vs. @javax.inject.Named vs. @javax.faces.ManagedBean

I feel there is a little mess in the Java EE 6 spec. There are several sets of annotations. We have javax.ejb annotations like @Stateful and @Stateless for creating EJBs. There is also a @javax.annotation.ManagedBean to create a managed bean. There…
Piotr Gwiazda
  • 12,080
  • 13
  • 60
  • 91
108
votes
13 answers

Access Enum value using EL with JSTL

I have an Enum called Status defined as such: public enum Status { VALID("valid"), OLD("old"); private final String val; Status(String val) { this.val = val; } public String getStatus() { return val; …
IaCoder
  • 12,300
  • 11
  • 37
  • 45
106
votes
6 answers

Get JSF managed bean by name in any Servlet related class

I'm trying to write a custom servlet (for AJAX/JSON) in which I would like to reference my @ManagedBeans by name. I'm hoping to map: http://host/app/myBean/myProperty to: @ManagedBean(name="myBean") public class MyBean { public String…
Konrad Garus
  • 53,145
  • 43
  • 157
  • 230
104
votes
5 answers

How to run a background task in a servlet based web application?

I'm using Java and I want to keep a servlet continuously running in my application, but I'm not getting how to do it. My servlet has a method which gives counts of the user from a database on a daily basis as well as the total count of the users…
104
votes
5 answers

Just what is Java EE really?

Java EE has this "mysterious shroud" around it for younger Java developers - one that I've been trying to lift myself for quite a while with little success. Confusion arises from: Java EE seems to be both a library and a platform - there are…
SnakeDoc
  • 13,611
  • 17
  • 65
  • 97
103
votes
5 answers

what is the difference between a portlet and a servlet?

I am asked to work on portlets and portals. I want to know the difference between a portlet and a servlet? How / where does a portlet differ (may be functionally) from a servlet?
Rajesh
  • 1,033
  • 2
  • 8
  • 6
103
votes
6 answers

Maven2: Best practice for Enterprise Project (EAR file)

I am just switching from Ant to Maven and am trying to figure out the best practice to set up a EAR file based Enterprise project? Let's say I want to create a pretty standard project with a jar file for the EJBs, a WAR file for the Web tier and the…
Maik
  • 1,057
  • 2
  • 8
  • 4
102
votes
7 answers

What to learn for making Java web applications in Java EE 6?

My goal is to make web applications! I finished reading the Books "Headfirst - Java" and "Headfirst - Servlets and JSP". Because this topic (web applications) is so big and complicated, I would like to ask what I should learn next. I feel…
creativz
  • 10,369
  • 13
  • 38
  • 35