Java 8 in a JEE Environment

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Apr 15 01:11:09 PDT 2013


On 04/15/2013 11:46 AM, Ian Clough wrote:
> I am wondering how the parallel mode operations will play in a JEE 
> environment where the container is largely responsible for the threading 
> behaviour of the application. Suppose we have a statistics package which 
> uses parallel operations, we would want this to operate in parallel mode 
> for a single user and possible in lightly loaded JEE server environments 
> but would want sequential mode in heavily loaded JEE environment. I am 
> assuming, possibly wrongly, that parallel mode is significantly less 
> efficient than sequential.

IIRC, the Java EE concurrency folks had been already talked through
this, and the current outcome is that FJP will gracefully degrade to
single-threaded (even caller-context) execution when running from within
the EE container. That will automatically mean the parallel stream
operations are effectively sequential.

And no, the overhead of doing parallel decomposition right should not be
drastically slower than doing the same thing sequentially; this is due
pending research.

-Aleksey.



More information about the lambda-dev mailing list