Re: TomEE performance

2017-01-25 Thread Mark Struberg
To give you a bit of perspective. I did have a public internet application written in JSF which _easily_ took 5 Mio page hits / day from about 70.000 unique users. Or another application which makes up to 20k requests per minute for about 7k users. Quick enough? ;) LieGrue, strub > Am 23.01

JavaEE Spec confusion

2017-01-25 Thread Svetlin Zarev
Hello, I've stumbled upon a contradiction in the JEE spec: 1. The UserTransaction javadoc [1] states that if the thread is already associated with a transaction and the Transaction Manager implementation does not support nested transactions, a NotSupportedException will be thrown. 2. On the othe

Re: JavaEE Spec confusion

2017-01-25 Thread Jean-Louis Monteiro
The JIRA @java.net is definitely a good way to ask and track the comments. And possibly fix the javadoc if it's not clear or wrong. -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Wed, Jan 25, 2017 at 10:58 AM, Svetlin Zarev < svetlin.angelov.za...@gmail.com>

MDC and @Asynchronous

2017-01-25 Thread cocorossello
Hi, I'm using logback's MDC to setup some logging info accross my application (jsessionid and other stuff). Our application uses lots of @Asynchronous methods. Since logback 1.1.3 MDC context is not propagated to child threads. Is there any way to customise the asynchronous thread pool executor s

RE: TomEE performance

2017-01-25 Thread David Villacampa Rodriguez
Thanks!! We are going to perform a load performance test -Mensaje original- De: Mark Struberg [mailto:strub...@yahoo.de.INVALID] Enviado el: martes, 24 de enero de 2017 16:14 Para: users@tomee.apache.org Asunto: Re: TomEE performance To give you a bit of perspective. I did have a public

Re: MDC and @Asynchronous

2017-01-25 Thread Romain Manni-Bucau
Hello with @Asynchronous it can be tricky and highly container dependent but if you migrate to ManagedExecutor service (it is quite trivial to do a cdi interceptor implementing @Async to make it smoother) then you can submit ManagedTask which can have task listener which would allow when creating

Re: MDC and @Asynchronous

2017-01-25 Thread cocorossello
I'll go that way, thank you very much. If you have that sample it would be very useful. I'm trying to build my own but it's not trivial (for me) -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/MDC-and-Asynchronous-tp4680927p4680930.html Sent from the TomEE Users mail

Re: MDC and @Asynchronous

2017-01-25 Thread cocorossello
I got it, this is the code just in case anyone needs it. @InterceptorBinding @Target({TYPE, METHOD}) @Retention(RUNTIME) @Inherited public @interface Async { } @Async @Interceptor public class AsyncInterceptor implements Serializable { @Resource(name = "TravelcAsynchronousPool") priv

Re: MDC and @Asynchronous

2017-01-25 Thread Romain Manni-Bucau
Does it work? shouldn't it be: @AroundInvoke public Object submitAsync(InvocationContext ctx) throws Exception { return executor.submit(new FutureDelegator(() -> { // in the constructor capture current MDC and (re)set it ManagedTaskListener hooks return ctx.proceed();

Re: MDC and @Asynchronous

2017-01-25 Thread cocorossello
It's not, my bad. The interceptor was not being applied and I thought it was OK. The problem I have now is that the excutor is not being inyected. @Resource(name = "TravelcAsynchronousPool") private ManagedExecutorService executor; And it is declared in resources.xml Core

Re: MDC and @Asynchronous

2017-01-25 Thread Romain Manni-Bucau
add @Priority on it or declare it in beans.Xml Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn

Re: TomEE performance

2017-01-25 Thread Steve Goldsmith
I this one of those your app is bigger than my app deals? :) On Tue, Jan 24, 2017 at 10:13 AM, Mark Struberg wrote: > To give you a bit of perspective. > I did have a public internet application written in JSF which _easily_ > took 5 Mio page hits / day from about 70.000 unique users. > Or anoth

Re: MDC and @Asynchronous

2017-01-25 Thread cocorossello
I finally went without the managedTask, simpler (I couldn't get the resource inyection, I don't know why, with priority and declaring it in beans.xml) @InterceptorBinding @Target({TYPE, METHOD}) @Retention(RUNTIME) @Inherited public @interface Async { } @Async @Interceptor public class AsyncIn