Own thread in a Java EE server - State of the art

Leonardo

I know this is considered bad practice, and forbidden in some case (ejb).

So, there are three distinct questions:

  1. what is the state of the art, specifically with JSR 236 that should address the question. Is that already included in some application server ?

  2. The forbidden rule talks about a Java EE container. What about Tomcat ? That it is not a fully featured Java EE container.

  3. I already searched the web and found many resources talking about the matter, but they are mainly blogs and posts about experience, and all of them are quite old. Do you have some links, an official one from Sun/Oracle would be better, that explains in great detail what is going on with threads and Java EE. Or at least, if it is not forbidden by SO policy, a good book.

[UPDATE]

For 'own thread' I mean to use either the java concurrency or the classic runnable interface with start, wait etc.

Arjan Tijms

what is the state of the art, specifically with JSR 236 that should address the question. Is that already included in some application server?

JSR 236 (Concurrency utils for Java EE) has eventually became part of Java EE 7. Java EE 7 is currently implemented by GlassFish 4, and it's expected that Wildfly 8 (formerly JBoss AS/EAP) will implement it early next year.

A current disadvantage of JSR 236 is that you cannot define your own thread pool; you have to do with the one provided by the application server which (IMHO) seriously affects the usability of the specification. You may be able to work around this limitation using proprietary methods, e.g. perhaps by interacting with a graphical UI or by modifying some file in the installation directory of your application (which you are typically not allowed to do in bigger companies).

See this for some additional resources about JSR 236.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

EntityManager thread safety and Java EE

From Dev

Java - Get thread state

From Dev

Java EE @Schedule and server down

From Dev

Java EE Server Independent Security

From Dev

deploy java EE application on the server

From Dev

Java Thread - Make a clock and own clock

From Dev

Android Java object with own thread using looper

From Dev

Java newSingleThreadExecutor vs own thread with Queue

From Dev

How to secure Websocket Server in Java EE 7

From Dev

Java-ee REST server with IntelliJ and Tomcat

From Dev

Deploying Java EE application on clustered app server

From Dev

Java EE: Does EntityManager get method changing state in DB

From Dev

Java thread state transition, WAITING to BLOCKED, or RUNNABLE?

From Dev

new to java/android - understanding thread inconsistent state

From Dev

State of thread while in run() method (Java)

From Dev

new to java/android - understanding thread inconsistent state

From Dev

How to debug Java Thread in WAITING state

From Dev

Thread pool in a web server in Java

From Dev

Thread pool in a web server in Java

From Dev

How do I use a MessageEndPoint in JCA in a Java EE compliant server?

From Dev

Java EE 7 SDK with JDK Ubuntu Server 12.04

From Dev

Dealing with uncaught exceptions in Java EE 7 Server API relying on CORS

From Dev

Single page application with Java EE/Wildfly: server-side configuration

From Dev

Are Retrofit and OkHttp suitable for Java EE/Server-side use?

From Dev

Is JAAS security in Java EE based web application server dependent?

From Dev

Check during runtime which persistence provider a Java EE server is using?

From Dev

Dealing with uncaught exceptions in Java EE 7 Server API relying on CORS

From Dev

kNN state-of-the-art implementation

From Dev

NetBeans EE includes Java EE?

Related Related

  1. 1

    EntityManager thread safety and Java EE

  2. 2

    Java - Get thread state

  3. 3

    Java EE @Schedule and server down

  4. 4

    Java EE Server Independent Security

  5. 5

    deploy java EE application on the server

  6. 6

    Java Thread - Make a clock and own clock

  7. 7

    Android Java object with own thread using looper

  8. 8

    Java newSingleThreadExecutor vs own thread with Queue

  9. 9

    How to secure Websocket Server in Java EE 7

  10. 10

    Java-ee REST server with IntelliJ and Tomcat

  11. 11

    Deploying Java EE application on clustered app server

  12. 12

    Java EE: Does EntityManager get method changing state in DB

  13. 13

    Java thread state transition, WAITING to BLOCKED, or RUNNABLE?

  14. 14

    new to java/android - understanding thread inconsistent state

  15. 15

    State of thread while in run() method (Java)

  16. 16

    new to java/android - understanding thread inconsistent state

  17. 17

    How to debug Java Thread in WAITING state

  18. 18

    Thread pool in a web server in Java

  19. 19

    Thread pool in a web server in Java

  20. 20

    How do I use a MessageEndPoint in JCA in a Java EE compliant server?

  21. 21

    Java EE 7 SDK with JDK Ubuntu Server 12.04

  22. 22

    Dealing with uncaught exceptions in Java EE 7 Server API relying on CORS

  23. 23

    Single page application with Java EE/Wildfly: server-side configuration

  24. 24

    Are Retrofit and OkHttp suitable for Java EE/Server-side use?

  25. 25

    Is JAAS security in Java EE based web application server dependent?

  26. 26

    Check during runtime which persistence provider a Java EE server is using?

  27. 27

    Dealing with uncaught exceptions in Java EE 7 Server API relying on CORS

  28. 28

    kNN state-of-the-art implementation

  29. 29

    NetBeans EE includes Java EE?

HotTag

Archive