I have a JavaEE code that they gave me and I am trying to make it run to create a module from there, among the various libraries that are being imported are the following:
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
The javax package is not being recognized for me, and I understand that this package is purely JavaEE, I haven't had much time working with JavaEE, what's going on? JavaEE APIs don't come in the JDK? none of these libraries are recognized by the IDE, I'm using Eclipse, and I have JDK 6 and 7, I've already tried both and it doesn't recognize it. I am using Weblogic 11gR1 server and WebLogic 12c for programming.
Java EE refers to Java Enterprise Edition, which is made up of a set of standards, as indicated on the official Oracle page . To see the specifications covered by Java EE 8, you can visit this site
When specification is mentioned, it can be technically translated to a set of interfaces that you can use in your application to obtain a particular functionality. Some examples of the specifications that are part of Java EE are: Servlets, JSP, JPA, JSF, JAX-WS, JAX-RS, EJB, CDI, JCache, among others.
The community provides a reference implementation, which is made up of several frameworks that provide an implementation of each specification. For example, the current reference implementation is Glassfish 5 . This implementation is free and its source code can be found on github . On this site it indicates the frameworks it uses for its implementation, not directly, that can be reviewed in the link in the RI (reference implementation) column. For example, the Java Persistence API here is implemented with EclipseLink.
Note that application servers implement a specific version of Java EE. For example, Wildfly 11 supports/implements Java EE 7. That is, Wildfly 11 provides implementations for Servlets, JSP, JPA, JSF, and the other specifications that make up Java. EE 7. It doesn't mean you have to use the same frameworks/classes from the reference implementation, i.e. from Glassfish. An example is JPA, which Glassfish implements with EclipseLink (as mentioned above) while Wildfly uses Hibernate. Lo and behold, there are performance differences between application servers.
With this base, it should be noted that if you want to use the powers of Java EE, you must create a project that runs on an application server. For this, you will have to download an application server, to your preference.
Some free application servers:
Some paid application servers:
The short answer is that the libraries you need are part of your application server, or servlet container (Weblogic) in your case.
You should have a folder, probably lib, with the jars.
You should add those jars to your class path, but not export them as part of your project.