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
17
votes
1 answer

Load recursive object graph without N+1 Cartesian Product with JPA and Hibernate

When converting a project from Ibatis to JPA 2.1, I'm faced with a problem where I have to load a complete object graph for a set of objects, without hitting N+1 selects or using cartesian products for performance reasons. A users query will yield a…
Edvin Syse
  • 7,267
  • 18
  • 24
15
votes
3 answers

Which XML namespace to use with JSF 2.2 and up

I have migrated my application from JSF 1.2 to 2.2. It used XML namespaces on java.sun.com domain like xmlns:f="http://java.sun.com/jsf/core". However, Oracle's Java EE 7 tutorial is using XML namespaces on xmlns.jcp.org domain like…
Valsaraj Viswanathan
  • 1,473
  • 5
  • 28
  • 51
15
votes
2 answers

How to get an existing websocket instance

I'm working on an application that uses Websockets (Java EE 7) to send messages to all the connected clients asynchronously. The server (Websocket endpoint) should send these messages whenever a new article (an engagement modal in my app) is…
Aryan Venkat
  • 679
  • 1
  • 10
  • 34
14
votes
3 answers

error: No validator could be found for type: java.time.LocalDate

I'm working on a project that uses bean validation (Hibernate Validator 5.1.3.Final). My bean has a attribute with the @Past annotation. @Past(message = "A data deve estar no passado.") private LocalDate dataAbertura; But, when the validation…
14
votes
1 answer

How can I change default port number of Activemq

I am using Windows 7 OS. I downloaded apache-activemq-5.8.0.zip from these Link and extracted in C:\Users\Infratab Bangalore\Desktop\Queueing\apache-activemq-5.8.0 directory. While Activemq initialization time I read Pre-Installation Requirements…
Hanumath
  • 1,117
  • 9
  • 23
  • 41
14
votes
2 answers

Which is better: multiple web socket endpoints or single web socket endpoint in Java EE7

Java EE 7 allows you to create new endpoints very easily through annotations. However, I was wondering is having multiple endpoints one to handle each message type a good idea or should I have just one endpoint facade for everything? I am leaning…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
13
votes
1 answer

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS

I am using GlassFish Server 4.1/Java EE 7. In my web.xml file, I mentioned the following security constraints. UserConstraint Provide a…
Tiny
  • 27,221
  • 105
  • 339
  • 599
13
votes
1 answer

Difference betwen org.wildfly.bom and org.jboss.spec for Java EE7 with maven

I am working in a new project that is going to use Java EE 7 with WildFly, but I am still confused about which maven dependencies I should use. I have found these two groups that apparently I can use: org.wildfly.bom and org.jboss.spec They have the…
jonathan
  • 422
  • 4
  • 12
12
votes
1 answer

Notify only specific user(s) through WebSockets, when something is modified in the database

In order to notify all users through WebSockets, when something is modified in selected JPA entities, I use the following basic approach. @ServerEndpoint("/Push") public class Push { private static final Set sessions = new…
Tiny
  • 27,221
  • 105
  • 339
  • 599
12
votes
4 answers

JSR-356: How to abort a websocket connection during the handshake?

I need to be able to abort a websocket connection during the handshake in case the HTTP request does not meet certain criteria. From what I understand, the proper place to do that is inside the ServerEndpointConfig.Configurator.modifyHandshake()…
Célio
  • 563
  • 7
  • 16
12
votes
2 answers

Java EE 7 - Injection into Runnable/Callable object

Concurrency Utilities(JSR 236) has been introduced in Java EE 7. Is there any way how to inject my EJBs into Runnable/Callable object? Specifically I want something like this: ejb with business logic @LocalBean public class MyEjb { public void…
madox2
  • 49,493
  • 17
  • 99
  • 99
12
votes
3 answers

Configuring GlassFish 4 domain directory in Netbeans / Maven / Cargo plugin

I am trying to deploy the first example (hello1) from the Java 7/8 EE tutorial* using Netbeans and I am running into problems. The project compiles without problems but when deploying it gives an error: Failed to execute goal…
DeltaLima
  • 5,864
  • 1
  • 16
  • 32
11
votes
1 answer

CompletableFuture/parallelStream in JavaEE app server

Given the new Java8 we are getting really nice features for asynchronous tasks, e.g. CompletableFuture and .paralellStream(). If you run this in Java SE as I've understood it you will utilize the ForkJoinPool, but what happens if I run the following…
11
votes
1 answer

Deployment failed on Wildfly 9

I once had this issue with wildfly 8 but was solved include eclipselink.jar in $WILDFLY_HOME/modules/system/layers/base/org/eclipse/persistence/main and updating the module.xml with the resource root and…
Paullo
  • 2,038
  • 4
  • 25
  • 50
11
votes
1 answer

what is the purpose of @Nonbinding annotation in a Qualifier supposed to be in Java EE7?

I am reading through the CDI injections in JavaEE 7 particularly using @Qualifier and @Produces to inject a custom Data type into a bean. I have the following code taken from JBoss documentation towards ends of the…
brain storm
  • 30,124
  • 69
  • 225
  • 393
1
2
3
81 82