And when I try using an executor I created, I get this:
java.util.concurrent.ExecutionException:
javax.enterprise.concurrent.AbortedException: Module null is disabled
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.gsm.pe.util.ReportQueue.process(ReportQueue.java:436)
at com.gsm.lib.BatchRunner.processElements(BatchRunner.java:286)
at com.gsm.lib.BatchRunner.flushBatch(BatchRunner.java:164)
at com.gsm.lib.BatchRunner.run(BatchRunner.java:80)
Caused by: javax.enterprise.concurrent.AbortedException: Module null is
disabled
at
org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:146)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at
org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
Of course, ManagedFutureTask doesn't log the exception it got while setting
up context, nor it attaches it to the exception it throws when it can't run.
On Mon, May 11, 2015 at 3:57 PM, Pawel Veselov <pawel.veselov_at_gmail.com>
wrote:
>
> @Will - 4.1, sorry :)
>
> On Mon, May 11, 2015 at 3:18 PM, Phillip Ross <phillip.w.g.ross_at_gmail.com>
> wrote:
>
>> Hi Pawel... I have a feeling you're looking for JEE Concurrency Utilities.
>> This is "new" in JEE7/Glassfish4.x.
>>
>
> All right then.
>
> I found this : https://www.youtube.com/watch?v=JeE_L9VJ4E8
> There is info on how to configure the services in the "Administration
> Guide" GF 4.0 doc.
> I didn't find any info on this in the "Development Guide" GF 4.0 doc
>
> I assume the interfaces that I can use for returned objects are from
> java.util.concurrent package (so, JDK executor)
>
> I don't however, see any way to the executor to any GF thread pool. It
> seems that any created executor service will have a new thread pool
>
>
>> Hope that helps!
>> - Phillip
>>
>> On Mon, May 11, 2015 at 5:40 PM, Pawel Veselov <pawel.veselov_at_gmail.com>
>> wrote:
>> > Hi.
>> >
>> > What's the proper way of scheduling work on threads from existing GF
>> thread
>> > pools? I've been trawling the net for this, and I can find bits and
>> pieces
>> > saying it's sort of possible, but no direct references on how.
>> >
>> > E.g.
>> > - how to create JNDI reference to a specific (named) thread pool?
>> > - What is the API that the resource is compliant too (J2EE executor, JDK
>> > executor, GF specific)?
>>
>>
> Thank you,
> Pawel.
>
>
--
With best of best regards
Pawel S. Veselov