Questions tagged [java-ee-7]

Use this tag for questions relating specifically to Java Enterprise Edition 7.

Java Enterprise Edition 7 (JEE7) is a specification defining a collection of Java-based technologies and how they interoperate. JEE7 incorporates the features of technologies of JEE6, including EJB3, JPA, JSF, CDI, etc. and adding new features like WebSockets, etc.

Numerous implementations are available in the form of both commercial products and open source projects.

Information

This tag is specific for the Java EE 7 version. See the tag for general Java EE questions.

Useful links

1224 questions
213
votes
5 answers

What is WEB-INF used for in a Java EE web application?

I'm working on a Java EE web application with the following source code directory structure: src/main/java <-- multiple packages containing Java classes src/test/java <-- multiple packages containing JUnit…
Steve Chambers
  • 37,270
  • 24
  • 156
  • 208
117
votes
6 answers

How to get a method's annotation value from a ProceedingJoinPoint?

I have below annotation. MyAnnotation.java @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface MyAnnotation { } SomeAspect.java public class SomeAspect{ @Around("execution(public * *(..)) &&…
user755806
  • 6,565
  • 27
  • 106
  • 153
78
votes
10 answers

How to enable Cross domain requests on JAX-RS web services?

I developed a set of restful web services. I couldn't call any of these methods from remote clients due to the error No 'Access-Control-Allow-Origin' header is present on the requested resource. The services work perfectly on localhost. Is there…
Naili
  • 1,564
  • 3
  • 20
  • 27
63
votes
3 answers

What is the significance of @javax.persistence.Lob annotation in JPA?

When should I use @javax.persistence.Lob annotation in JPA? What datatypes can be annotated by this annotation?
Dev
  • 13,492
  • 19
  • 81
  • 174
49
votes
6 answers

Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint

Is it possible to get the HttpServletRequest inside a @ServerEndpoint? Primarily I am trying to get it so I can access the HttpSession object.
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
39
votes
2 answers

Spring vs Java EE 7

Now I am reading "Begining Java EE 7". And I was wondered that Java EE 7 is a good stack of technologies, it includes CDI, bean validation, JSF for web tier and other specifications. So I got a question: Why should I study Spring framework if Java…
Korobko Alex
  • 816
  • 1
  • 7
  • 10
36
votes
3 answers

Difference between javax.inject.Singleton and javax.ejb.Singleton

im little confused. What is the exact difference between javax.inject.Singleton and javax.ejb.Singleton?
Hakan Kiyar
  • 1,199
  • 6
  • 16
  • 26
35
votes
3 answers

Meaning of bean discovery mode annotated in CDI 1.1

I am migrating an application to Java EE 7 and would like to CDI 1.1. But I don't get the meaning of bean-discovery-mode="annotated". The CDI 1.1 specification is not very helpful. At least I have not found any useful paragraph. Did I miss it? This…
Oliver
  • 3,815
  • 8
  • 35
  • 63
30
votes
3 answers

Real time updates from database using JSF/Java EE

I have one application running in the following environment. GlassFish Server 4.0 JSF 2.2.8-02 PrimeFaces 5.1 final PrimeFaces Extension 2.1.0 OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 MySQL 5.6.11 JDK-7u11 There are several public pages…
Tiny
  • 27,221
  • 105
  • 339
  • 599
28
votes
4 answers

Getting a reference to EntityManager in Java EE applications using CDI

I'm using Java EE 7. I would like to know what is the proper way to inject a JPA EntityManager into an application scoped CDI bean. You can't just inject it using @PersistanceContext annotation, because EntityManager instances are not thread safe.…
Flying Dumpling
  • 1,294
  • 1
  • 11
  • 13
25
votes
2 answers

What is the difference between class and styleClass attributes in JSF?

I see, that in JSF most of the standard components that mapped to HTML tags, e.g. , have attributes class and styleClass. But no matter, which one I use, both is rendered as class attributes in markup. So why there are two…
east825
  • 909
  • 1
  • 8
  • 20
23
votes
4 answers

Intellij IDEA artifact 'XXXX:war exploded' has invalid extension

Every time I make even the tiniest change to my POM Intellij removes the .war extension for my exploded artifact in the Project Structure output directory setting. This causes an error in Intellij's Run/Debug configuration: Artifact 'XXXX:war…
Patrick Garner
  • 3,201
  • 6
  • 39
  • 58
23
votes
1 answer

Supported source version RELEASE_6 from annotation processor org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor less than source1.7

I have an enterprise application running in the following environment. Mojarra 2.2.7 PrimeFaces 5.0 final PrimeFaces Extension 2.0 final OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 GlashFish 4.0 NetBeans IDE 8.0 JDK 1.7 I have changed the…
Tiny
  • 27,221
  • 105
  • 339
  • 599
20
votes
2 answers

JAX-RS client: ResponseProcessingException handling

Some overloaded call request methods, such as: get() and post(Entity entity) (there are others) of SyncInvoker return a Response object, rather than the unmarshalled content. I noticed that in the case of get(), there is no documented…
Puce
  • 37,247
  • 13
  • 80
  • 152
20
votes
2 answers

Java EE 7: How-to inject an EJB into a WebSocket ServerEndpoint?

To sum up my failing project: My @ServerEndpoint class is packaged in a WAR together with the beans.xml file. My WAR in turn is packaged in a EAR and this EAR file is what gets deployed to a GlassFish 4 server that internally use Tyrus. Should it be…
Martin Andersson
  • 18,072
  • 9
  • 87
  • 115
1
2 3
81 82