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

Java Web Socket ServerEndpoint Thread Safety

Are individual ServerEndpoints thread safe or do they belong to all clients who are interacting with them at a given time? Or another way to ask the same question: Are global objects in the ServerEndpoint class in danger of creating concurrency…
adv
  • 357
  • 5
  • 18
5
votes
2 answers

What are the available Java EE Websockets implementations?

For the JSR 356 - Java API for WebSocket i know the reference implementation is Tyrus. Are there any others? If not, then i guess Tyrus is the implementation in all Application Servers (Glassfish, JBossAS/Wildfly etc...)
SoftwareDeveloper
  • 1,094
  • 2
  • 15
  • 26
5
votes
1 answer

Controlling number of Threads for ManagedExecutorServices / Java EE 7

In Java SE one can use constructs like ExecutorService es1 = Executors.newSingleThreadExecutor(); ExecutorService es2 = Executors.newFixedThreadPool(10); to control the number of threads available to the executor service. In Java EE 7 it's…
user120513
  • 531
  • 4
  • 12
5
votes
2 answers

From JSON String to Java Object using javax.json

I'm using the com.google.gson.Gson API to convert a JSON string to a Java object: Gson gson = new Gson(); User u = gson.fromJson(jsonString, User.class); I'd like to know if there's an equivalent API in javax.json api to do the equivalent. Thanks!
user2824073
  • 2,407
  • 10
  • 39
  • 73
5
votes
1 answer

Find websocket session by id in Java EE 7

I've read Java EE documentation and for me is unclear one thing. According to API, the only way to find another Session is a code like this: (assuming that we've identifier of other session): import javax.websocket.Session; ... private static…
Ihromant
  • 163
  • 2
  • 8
5
votes
1 answer

How to instantiate more CDI beans for one class?

Note: The similar question has been already asked three years ago, in time of EE 6, see how to instantiate more then one CDI/Weld bean for one class? Has something changed in EE 7? In Spring there is possible to instantiate any class by defining the…
banterCZ
  • 1,551
  • 1
  • 22
  • 37
5
votes
1 answer

Java EE7 websocket initialization - implement logic before first @OnOpen

I think this is more a design specific question, than direct coding issue. I want to implement a websocket service which serves an updated dataset from a foreign http:// resource to the clients. but i want to have the data available before the first…
raptaML
  • 140
  • 8
5
votes
1 answer

Java EE7 REST server no longer returning List as JSON

The following example works in a Java EE6 (Glassfish3) project of mine but failed after I switched to Java EE7 (Glassfish4). The HTTP request returns "500 Internal Error" without any message in the Glassfish server log. The project was setup using…
lathspell
  • 3,040
  • 1
  • 30
  • 49
5
votes
2 answers

How to configure spring security 3.2 to use dao authentication and custom authentication filter using java config

I have googled spring security examples using dao authentication and custom authentication filter, but which are I found, all the examples are using xml file configuration, My question is how to configure custom filter i.e.…
Abhishek Nayak
  • 3,732
  • 3
  • 33
  • 64
5
votes
1 answer

Is it safe to inject @Resource UserTransaction to EJB Singleton bean

Q1: I am writing an EJB Singleton bean that use BMT so I need to use UserTransaction in my bean. I was wondering that IS IT SAFE to inject @Resource UserTransaction to my EJB singleton bean. I don't know whether container will inject a Proxy of…
user3078555
5
votes
1 answer

What happens when stateful bean is destroyed during @Asynchronous method call?

I have a stateful EJB with a transactional @Asynchronous method returning Future. It's being called from web-tier (@SessionScoped CDI bean) as shown below: @SessionScoped @Named public class SessionBean { @EJB EjbService service public…
andbi
  • 4,426
  • 5
  • 45
  • 70
5
votes
2 answers

Nested Transaction and EJBContext's setRollbackOnly()

I am reading the Transaction Management of Java EE 7 and I get confused by the concept of nested transaction and the functionality of EJBContext#setRollbackOnly(). Say I have two Session Beans, Bean1Impl and Bean2Impl and their signatures…
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
5
votes
1 answer

force glassfish 4 to use jackson 2.3

I wrote an maven application which should run on Glassfish 4. The Standard ApplicationConfig looks like this: @javax.ws.rs.ApplicationPath("resources") public class ApplicationConfig extends Application { @Override public Set>…
Laokoon
  • 1,241
  • 4
  • 24
  • 47
5
votes
1 answer

Run Java EE 7 WebSockets in Tomcat 7

Java EE 7 is out and one the features that I like is the standard Websockets. Currently I work in Tomcat 7, Is there a way to integrate Java EE 7 Websockets in my Tomcat 7? I searched for it in the documentation of Tyrus Websocket with no…
Nestor Hernandez Loli
  • 1,412
  • 3
  • 21
  • 26
5
votes
3 answers

CDI not working after migration to Java EE 7

I recently migrated a simple Java EE 6 project to Java EE 7. In detail this means I just changed the dependency from javax:javaee-api:6.0 to javax:javaee-api:7.0 and deployed it to Glassfish 4 instead of Glassfish 3. Afterwards the application did…
raeffs
  • 595
  • 5
  • 17