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
7
votes
2 answers

How can I get a cookie value inside websocket end-point

I'm using Websocket-API based on JavaEE 7, in my application. I'm required to access the values set in cookies inside my websocket endpoint [Annotated one : @ServerEndpoint ("/websocket") ]. How would I do that? @onOpen() method is there, which will…
Aryan Venkat
  • 679
  • 1
  • 10
  • 34
7
votes
2 answers

Interceptor issue with Java EE7

I'm testing / switching to Java EE7 (Glassfish 4) and one of the issues I have is with Interceptors, whenever I try to run the project I am getting the following error. SEVERE: Exception while loading the app : CDI deployment …
Mark-K
  • 126
  • 1
  • 5
6
votes
3 answers

JAX-RS Response for XML or JSON is not working

I have the following GenericRest class which I use to extend rest classes which are based on Entity classes annotated with @XmlRootElement. public class GenericRest { @Inject @Service GenericService service; …
Martijn Burger
  • 7,315
  • 8
  • 54
  • 94
6
votes
1 answer

Pass request scope data to async methods in CDI

Java EE 7 application is running on Wildfly 9.0.2.Final. There is a problem to access request scoped data from within @Asynchronous methods. In web filter data (e.g. token) is set into RequestScoped CDI bean. Later we want to access this data.…
yaroska
  • 375
  • 2
  • 5
6
votes
1 answer

AngularJS - Java EE REST security

I am using AngularJS along with REST API on Java EE 7 backend. The project is deployed on a Wildfly application server and I have some questions regrading securities: To Encrypt/decrypt data I am using CryptoJS to encrypt and decrypt on server side…
jihedMaster
  • 331
  • 1
  • 3
  • 11
6
votes
0 answers

use endorsed standard override mechanism for xerces in GlassFish 4.0

How do I use the endorsed standard mechanism to use xerces in a GlassFish 4.0 WAR application? According to the documentation*, you should put it into domain-dir/lib/endorsed. However, when I put xercesImpl, xml-apis as well as xml-resolver there,…
Yogu
  • 9,165
  • 5
  • 37
  • 58
6
votes
2 answers

How to run a JSF 2.2 page in Java EE 7 environment without web.xml?

What is wrong with my very very simple web app: web app successfully deployed to app server but hello bean did not inject to index.xhtml page (page shows just Hello from Facelets: #{hello.value})? (this is first time when I am working with JSF, so…
dwz
  • 377
  • 1
  • 3
  • 13
6
votes
2 answers

How to set Locale in Bean Validation

By default Bean Validation gets Locale based on Locale.getDefault(), which is common to whole JVM. How to change BeanValidation's Locale for current EJB method call? I'm using JavaEE7 and want to get benefits from integration of JPA and Bean…
user2512686
6
votes
1 answer

Mapping WebSocketEndpoints in a web.xml file

I am trying to develop a Java EE 7 web application that uses a websocket endpoint and deploy it on a Jetty server. The application has the following structure: Game/ src/ main/ java/ game/ WebSocketEndpoint.java …
Kyle
  • 893
  • 1
  • 9
  • 20
6
votes
9 answers

Mocking javax.mail.Transport

Without creating another class that I can inject. Is it possible to mock javax.mail.Transport so I can do some mock testing of the Transport.send() method on Java EE 7?
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
6
votes
2 answers

Unable to Generate enum type in MySql from JPA entity

I am using JPA 2.1. I want to genrate mysql enum type column like: gender enum('male','female'). My Enum class is public enum Gender { MALE, FEMALE } In JPA entity class @Enumerated private Gender gender;//generate int type…
Masudul
  • 21,823
  • 5
  • 43
  • 58
6
votes
4 answers

Java EE 7 First Cup Tutorial errors in Maven: Could not find artifact org.glassfish.javaeetutorial.firstcup:firstcup:pom:7.0.1-SNAPSHOT

I'm following along with the Java EE 7 updated version of FirstCup. I have glassfish 4 installed and am using NetBeans 7.3. I'm working on the very first example and I'm getting maven issues. I generated the archetypes and am able to create the…
Adam
  • 212
  • 2
  • 8
5
votes
0 answers

How to make Concurrency utilities (JSR 236) work in plain non-EE Tomcat 8?

My technical stack includes Tomcat 8.5.47 (plain, not EE) Weld 2.4.8.Final (as a reference implementation of CDI 1.2) To be able to use ManagedExecutorService and manage threads more wisely and in a safer manner, I would like to include this…
Andrew Tobilko
  • 48,120
  • 14
  • 91
  • 142
5
votes
1 answer

Do suspended transactions timeout?

I have an JEE application which runs on a JBOSS EAP 7. There is a long running asynchronous method which does import data into another system. After beeing triggered it runs into transactions problems after 5 minutes which is the JBOSS default…
Lonzak
  • 9,334
  • 5
  • 57
  • 88
5
votes
1 answer

What is the difference between Enterprise Java Bean(EJB) and Entity Java Bean?

Can anyone explain me the difference between Enterprise Java Beans and Entity Java Bean? I know what EJB is but I don't understand their difference in regard to persistence. We use the same annotations to save it, but then why call it different?
Pritam Banerjee
  • 17,953
  • 10
  • 93
  • 108