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

Glassfish 4 - Using Concurrency API to create Managed Threads

I'm trying to use the new Concurrency API to inject a ManagedThreadFactory and use it per the Oracle tutorial. Here is an example of what I'm talking about: @Singleton @Startup public class Demo { …
bertag
  • 417
  • 1
  • 3
  • 10
4
votes
1 answer

Can implementing Java copy constructor result in same instance?

I've implemented a copy constructor in Java 8 and use it like this: User user = // some object LOG.debug("{}", user); this.userAccount = new User(user); LOG.debug("{}", this.userAccount); Output: User@2799061 User@2799061 It's the same object! How…
matsa
  • 346
  • 5
  • 16
4
votes
2 answers

Custom realm in Glassfish 4: login module not found

I am trying to create a custom realm and login module for Glassfish 4. I followed the procedure outlined in The glassfish 4 Application Development Guide p. 4-6, "Creating a Custom Realm". I also followed the steps in this article. I created a…
Rick
  • 362
  • 5
  • 16
4
votes
1 answer

Async Servlet - preferred implementation

Lately, during my research about asynchronous processing in Servlets, I came across at at least three ways to implement some functionality using this approach. The questions are: Which one is the best? Maybe some of these approaches are not…
pWoz
  • 1,649
  • 3
  • 20
  • 30
4
votes
1 answer

JSF "faces-redirect=true" redirects from https:// to http:// URL due to Apache ProxyPass

As I have an Apache Webserver which does ProxyPass to the Glassfish server, the latter does not know that the customers are talking "https". Thus when using things like return "shop.xhtml?faces-redirect=true"; the generated HTTP Location: header…
lathspell
  • 3,040
  • 1
  • 30
  • 49
4
votes
1 answer

Does a Java EE container automatically close an injected EntityManagerFactory?

Say that I have this code in a @Stateless Enterprise JavaBean: @PersistenceUnit EntityManagerFactory emf; Will the Java EE container automatically close my EntityManagerFactory sooner or later? What the specs say The Java Persistence specification,…
Martin Andersson
  • 18,072
  • 9
  • 87
  • 115
4
votes
2 answers

Create JsonArray from List

I'd need to create a javax.json.JsonArray object (Java EE 7 API) from a java.util.List of JsonObjects. Formerly, when using JSON API I used to do it simply with: JSONArray jsonArray = new JSONArray(list); But I can see there's no equivalent…
user2824073
  • 2,407
  • 10
  • 39
  • 73
4
votes
1 answer

Java EE 7 CDI - Injection doesn't work, sending NullPointerException

I have a problem with my injection, it's the first time I try it. I'm working with Wildfly and Java EE 7. I've got a NullPointerException when trying to access Authenticator instance in LoginController. I use maven, my beans.xml is found under…
Normegil
  • 157
  • 1
  • 2
  • 9
4
votes
1 answer

I can't fine the Java EE SDK to include it in my projects after installing

I'm head over heels here ! I downloaded Java EE 7 SDK from this link http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-7-downloads-1956236.html During the installation. I was forced to install GlassFish. Unlik the Java SE…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
4
votes
2 answers

Can't install tutorial content for javaee7 tutorial with updatetool

I downloaded the latest javaee7 tutorial and tried downloading the tutorial files with command updatetool. I did following steps: downloaded glassfish4 zip file and unzipped it I set the $AS_JAVA variable equal to $JAVA_HOME. JAVA_HOME was…
VaidAbhishek
  • 5,895
  • 7
  • 43
  • 59
4
votes
3 answers

Error with GlassFish 4 and Eclipse Juno JavaEE

I downloaded Eclipse Juno a while ago but until now used its Java SE perspective only. Today I downloaded GlassFish 4 for Windows and installed it. During installation I got a screen that showed that installation process didn't find Java JDK but…
PM 77-1
  • 12,933
  • 21
  • 68
  • 111
4
votes
2 answers

WELD-001408 Unsatisfied dependencies for type [Validator]

I'm unable to deploy my project after migrating it from Java EE 6 to Java EE 7. I already have CDI enabled (beans.xml with bean-discovery-mode="all" for backwards compatibility) The deployment error does not seem to be related to my code since it…
Juan
  • 467
  • 1
  • 5
  • 19
4
votes
2 answers

Java EE7/Glassfish Update Tool does not show up

I'm trying to do the Java EE 7 tutorials on my Windows 7 laptop. To use the tutorial, you have to run the Update Tool. You can run the Update Tool either by right-clicking on Glassfish 4 under Servers in the Services section of NetBeans. Or you…
Kyle Walker
  • 559
  • 3
  • 12
  • 25
3
votes
1 answer

JPA application managed persistence context data source configuration with java without persistence xml file

JPA specification defines two ways of how to configure and use it: Application-managed Persistence Context Container-managed Persistence Context With the Application-managed Persistence Context approach, the application code directly creates…
lapesunto59
  • 93
  • 1
  • 8
3
votes
1 answer

DataLoader batch loading bug (MyBatis, JavaEE)

I have graphql in my production, and it's forbidden to share the code. I'm using graphql-java-servlet, as ORM I use MyBatis. com.graphql-java-kickstart graphql-java-servlet
Konstantin
  • 117
  • 1
  • 5